-
Notifications
You must be signed in to change notification settings - Fork 54
/
browser_disableglobalhistory.xul
40 lines (31 loc) · 1.5 KB
/
browser_disableglobalhistory.xul
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window title="Test disableglobalhistory attribute on remote browsers"
onload="run_test()"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<browser id="inprocess_disabled" src="about:blank" type="content" disableglobalhistory="true" />
<browser id="inprocess_enabled" src="about:blank" type="content" />
<browser id="remote_disabled" src="about:blank" type="content" disableglobalhistory="true" />
<browser id="remote_enabled" src="about:blank" type="content" />
<script type="text/javascript">
Cu.import("resource://testing-common/ContentTask.jsm");
ContentTask.setTestScope(window.opener.wrappedJSObject);
function expectUseGlobalHistory(id, expected) {
let browser = document.getElementById(id);
return ContentTask.spawn(browser, {id, expected}, function({id, expected}) {
Assert.equal(docShell.useGlobalHistory, expected,
"Got the right useGlobalHistory state in the docShell of " + id);
});
}
async function run_test() {
await expectUseGlobalHistory("inprocess_disabled", false);
await expectUseGlobalHistory("inprocess_enabled", true);
await expectUseGlobalHistory("remote_disabled", false);
await expectUseGlobalHistory("remote_enabled", true);
window.opener.done();
ok(true);
}
</script>
</window>