Set initialLoadComplete to true only in test mode

This commit is contained in:
Antonio Scandurra 2015-11-13 18:01:21 +01:00 committed by Nathan Sobo
parent 3b4fc84fea
commit 62de930b03
2 changed files with 3 additions and 2 deletions

View File

@ -117,7 +117,7 @@ class AtomEnvironment extends Model
# Call .loadOrCreate instead
constructor: (params={}) ->
{@blobStore, @applicationDelegate, @window, @document, configDirPath, @enablePersistence} = params
{@blobStore, @applicationDelegate, @window, @document, configDirPath, @enablePersistence, loadBaseStylesheetsOnly} = params
@state = {version: @constructor.version}
@ -183,7 +183,7 @@ class AtomEnvironment extends Model
@themes.loadBaseStylesheets()
@initialStyleElements = @styles.getSnapshot()
@themes.initialLoadComplete = true
@themes.initialLoadComplete = true if loadBaseStylesheetsOnly
@setBodyPlatformClass()
@stylesElement = @styles.buildStylesElement()

View File

@ -70,6 +70,7 @@ module.exports = ({blobStore}) ->
buildAtomEnvironment = (params) ->
params = cloneObject(params)
params.blobStore = blobStore unless params.hasOwnProperty("blobStore")
params.loadBaseStylesheetsOnly = true unless params.hasOwnProperty("loadBaseStylesheetsOnly")
new AtomEnvironment(params)
promise = testRunner({