michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: const TESTCASE_URI = TEST_BASE + "longload.html"; michael@0: michael@0: michael@0: function test() michael@0: { michael@0: waitForExplicitFinish(); michael@0: michael@0: // launch Style Editor right when the tab is created (before load) michael@0: // this checks that the Style Editor still launches correctly when it is opened michael@0: // *while* the page is still loading. The Style Editor should not signal that michael@0: // it is loaded until the accompanying content page is loaded. michael@0: michael@0: addTabAndCheckOnStyleEditorAdded(function(panel) { michael@0: content.location = TESTCASE_URI; michael@0: }, testEditorAdded); michael@0: } michael@0: michael@0: function testEditorAdded(event, editor) michael@0: { michael@0: let root = gPanelWindow.document.querySelector(".splitview-root"); michael@0: ok(!root.classList.contains("loading"), michael@0: "style editor root element does not have 'loading' class name anymore"); michael@0: michael@0: let button = gPanelWindow.document.querySelector(".style-editor-newButton"); michael@0: ok(!button.hasAttribute("disabled"), michael@0: "new style sheet button is enabled"); michael@0: michael@0: button = gPanelWindow.document.querySelector(".style-editor-importButton"); michael@0: ok(!button.hasAttribute("disabled"), michael@0: "import button is enabled"); michael@0: michael@0: finish(); michael@0: }