mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Pass explicit window global into AtomEnvironment on construction
This commit is contained in:
@@ -213,7 +213,7 @@ describe "AtomEnvironment", ->
|
||||
|
||||
describe "::unloadEditorWindow()", ->
|
||||
it "saves the serialized state of the window so it can be deserialized after reload", ->
|
||||
atomEnvironment = new AtomEnvironment(applicationDelegate: atom.applicationDelegate)
|
||||
atomEnvironment = new AtomEnvironment({applicationDelegate: atom.applicationDelegate, window})
|
||||
spyOn(atomEnvironment, 'saveStateSync')
|
||||
|
||||
workspaceState = atomEnvironment.workspace.serialize()
|
||||
@@ -231,7 +231,7 @@ describe "AtomEnvironment", ->
|
||||
|
||||
describe "::destroy()", ->
|
||||
it "unsubscribes from all buffers", ->
|
||||
atomEnvironment = new AtomEnvironment(applicationDelegate: atom.applicationDelegate)
|
||||
atomEnvironment = new AtomEnvironment({applicationDelegate: atom.applicationDelegate, window})
|
||||
|
||||
waitsForPromise ->
|
||||
atomEnvironment.workspace.open("sample.js")
|
||||
|
||||
@@ -18,7 +18,7 @@ module.exports = ({logFile, headless, testPaths, buildAtomEnvironment}) ->
|
||||
applicationDelegate = new ApplicationDelegate()
|
||||
applicationDelegate.setRepresentedFilename = ->
|
||||
applicationDelegate.setWindowDocumentEdited = ->
|
||||
window.atom = buildAtomEnvironment({applicationDelegate})
|
||||
window.atom = buildAtomEnvironment({applicationDelegate, window})
|
||||
|
||||
require './spec-helper'
|
||||
disableFocusMethods() if process.env.JANKY_SHA1 or process.env.CI
|
||||
|
||||
@@ -18,7 +18,7 @@ describe "WindowEventHandler", ->
|
||||
loadSettings.initialPath = initialPath
|
||||
loadSettings
|
||||
atom.project.destroy()
|
||||
windowEventHandler = new WindowEventHandler({atomEnvironment: atom, applicationDelegate: atom.applicationDelegate})
|
||||
windowEventHandler = new WindowEventHandler({atomEnvironment: atom, applicationDelegate: atom.applicationDelegate, window})
|
||||
projectPath = atom.project.getPaths()[0]
|
||||
|
||||
afterEach ->
|
||||
|
||||
Reference in New Issue
Block a user