mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-09 00:37:32 +09:00
44 lines
No EOL
1.7 KiB
XML
44 lines
No EOL
1.7 KiB
XML
<?xml version="1.0"?>
|
|
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
|
|
|
<window title="Test disableglobalhistory attribute on remote browsers"
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
onload="run_test();">
|
|
<script type="application/javascript"
|
|
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script type="application/javascript"
|
|
src="chrome://mochikit/content/tests/SimpleTest/SpawnTask.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;version=1.7">
|
|
const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
|
|
|
|
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);
|
|
});
|
|
}
|
|
|
|
function run_test() {
|
|
spawn_task(function*() {
|
|
yield expectUseGlobalHistory("inprocess_disabled", false);
|
|
yield expectUseGlobalHistory("inprocess_enabled", true);
|
|
|
|
yield expectUseGlobalHistory("remote_disabled", false);
|
|
yield expectUseGlobalHistory("remote_enabled", true);
|
|
window.opener.done();
|
|
});
|
|
};
|
|
|
|
</script>
|
|
</window> |