6 document.getElementById(
"sidebar").addEventListener(
"load",
delayedOpenUrl,
true);
7 toggleSidebar(
"viewWebPanelsSidebar",
true);
11 ok(
true,
"Ran delayedOpenUrl");
16 ok(!document.getElementById(
"sidebar-box").hidden,
"Sidebar showing");
18 var
sidebar = document.getElementById(
"sidebar");
19 var root = sidebar.contentDocument.documentElement;
20 ok(root.nodeName !=
"parsererror",
"Sidebar is well formed");
24 sidebar.contentDocument.addEventListener(
"load",
delayedRunTest,
true);
25 var
url =
'data:text/html,<div%20id="test_bug409481">Content!</div>';
26 sidebar.contentWindow.loadWebPanel(url);
30 ok(
true,
"Ran delayedRunTest");
35 var
sidebar = document.getElementById(
"sidebar");
36 sidebar.contentDocument.removeEventListener(
"load",
delayedRunTest,
true);
38 var
browser = sidebar.contentDocument.getElementById(
"web-panels-browser");
39 var div = browser && browser.contentDocument.getElementById(
"test_bug409481");
40 ok(div && div.textContent ==
"Content!",
"Sidebar content loaded");
42 toggleSidebar(
"viewWebPanelsSidebar");
44 ok(document.getElementById(
"sidebar-box").hidden,
"Sidebar successfully hidden");
function delayedOpenUrl()
aWindow setTimeout(function(){_this.restoreHistory(aWindow, aTabs, aTabData, aIdMap);}, 0)
function openPanelUrl(event)
function delayedRunTest()