Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* vim: set ts=2 et sw=2 tw=80: */
2 /* Any copyright is dedicated to the Public Domain.
3 http://creativecommons.org/publicdomain/zero/1.0/ */
5 const TESTCASE_URI = TEST_BASE + "nostyle.html";
8 function test()
9 {
10 waitForExplicitFinish();
12 // launch Style Editor right when the tab is created (before load)
13 // this checks that the Style Editor still launches correctly when it is opened
14 // *while* the page is still loading. The Style Editor should not signal that
15 // it is loaded until the accompanying content page is loaded.
17 addTabAndCheckOnStyleEditorAdded(function(panel) {
18 panel.UI.once("stylesheets-reset", testDocumentLoad);
20 content.location = TESTCASE_URI;
21 }, () => {});
22 }
24 function testDocumentLoad(event)
25 {
26 let root = gPanelWindow.document.querySelector(".splitview-root");
27 ok(!root.classList.contains("loading"),
28 "style editor root element does not have 'loading' class name anymore");
30 ok(root.querySelector(".empty.placeholder"), "showing 'no style' indicator");
32 let button = gPanelWindow.document.querySelector(".style-editor-newButton");
33 ok(!button.hasAttribute("disabled"),
34 "new style sheet button is enabled");
36 button = gPanelWindow.document.querySelector(".style-editor-importButton");
37 ok(!button.hasAttribute("disabled"),
38 "import button is enabled");
40 finish();
41 }