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.
michael@0 | 1 | /* vim: set ts=2 et sw=2 tw=80: */ |
michael@0 | 2 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 4 | |
michael@0 | 5 | const TESTCASE_URI = TEST_BASE + "longload.html"; |
michael@0 | 6 | |
michael@0 | 7 | |
michael@0 | 8 | function test() |
michael@0 | 9 | { |
michael@0 | 10 | waitForExplicitFinish(); |
michael@0 | 11 | |
michael@0 | 12 | // launch Style Editor right when the tab is created (before load) |
michael@0 | 13 | // this checks that the Style Editor still launches correctly when it is opened |
michael@0 | 14 | // *while* the page is still loading. The Style Editor should not signal that |
michael@0 | 15 | // it is loaded until the accompanying content page is loaded. |
michael@0 | 16 | |
michael@0 | 17 | addTabAndCheckOnStyleEditorAdded(function(panel) { |
michael@0 | 18 | content.location = TESTCASE_URI; |
michael@0 | 19 | }, testEditorAdded); |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | function testEditorAdded(event, editor) |
michael@0 | 23 | { |
michael@0 | 24 | let root = gPanelWindow.document.querySelector(".splitview-root"); |
michael@0 | 25 | ok(!root.classList.contains("loading"), |
michael@0 | 26 | "style editor root element does not have 'loading' class name anymore"); |
michael@0 | 27 | |
michael@0 | 28 | let button = gPanelWindow.document.querySelector(".style-editor-newButton"); |
michael@0 | 29 | ok(!button.hasAttribute("disabled"), |
michael@0 | 30 | "new style sheet button is enabled"); |
michael@0 | 31 | |
michael@0 | 32 | button = gPanelWindow.document.querySelector(".style-editor-importButton"); |
michael@0 | 33 | ok(!button.hasAttribute("disabled"), |
michael@0 | 34 | "import button is enabled"); |
michael@0 | 35 | |
michael@0 | 36 | finish(); |
michael@0 | 37 | } |