mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Restore initial styles in AtomEnvironment::reset
This commit is contained in:
@@ -19,7 +19,10 @@ TextEditorComponent = require '../src/text-editor-component'
|
||||
pathwatcher = require 'pathwatcher'
|
||||
clipboard = require '../src/safe-clipboard'
|
||||
|
||||
atom.themes.requireStylesheet '../static/jasmine'
|
||||
jasmineStyle = document.createElement('style')
|
||||
jasmineStyle.textContent = atom.themes.loadStylesheet(atom.themes.resolveStylesheet('../static/jasmine'))
|
||||
document.head.appendChild(jasmineStyle)
|
||||
|
||||
atom.themes.initialLoadComplete = true
|
||||
|
||||
fixturePackagesPath = path.resolve(__dirname, './fixtures/packages')
|
||||
@@ -96,7 +99,6 @@ beforeEach ->
|
||||
assert: atom.assert.bind(atom)
|
||||
})
|
||||
atom.themes.workspace = atom.workspace
|
||||
atom.styles.restoreSnapshot(styleElementsToRestore)
|
||||
atom.views.clearDocumentRequests()
|
||||
|
||||
atom.workspaceParentSelectorctor = '#jasmine-content'
|
||||
|
||||
@@ -156,6 +156,7 @@ class AtomEnvironment extends Model
|
||||
packageManager: @packages, configDirPath, resourcePath, safeMode, @config,
|
||||
styleManager: @styles, notificationManager: @notifications, viewRegistry: @views
|
||||
})
|
||||
@initialStyleElements = @styles.getSnapshot()
|
||||
|
||||
MenuManager = require './menu-manager'
|
||||
@menu = new MenuManager({resourcePath, keymapManager: @keymaps, packageManager: @packages})
|
||||
@@ -242,6 +243,8 @@ class AtomEnvironment extends Model
|
||||
@commands.clear()
|
||||
registerDefaultCommands(this)
|
||||
|
||||
@styles.restoreSnapshot(@initialStyleElements)
|
||||
|
||||
###
|
||||
Section: Event Subscription
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user