mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
24 lines
934 B
JavaScript
24 lines
934 B
JavaScript
// ----------------------------------------------------------------------------
|
|
// Test whether passing a simple string to InstallTrigger.install throws an
|
|
// exception
|
|
function test() {
|
|
waitForExplicitFinish();
|
|
|
|
var triggers = encodeURIComponent(JSON.stringify(TESTROOT + "unsigned.xpi"));
|
|
gBrowser.selectedTab = gBrowser.addTab();
|
|
gBrowser.selectedBrowser.addEventListener("load", function() {
|
|
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
|
// Allow the in-page load handler to run first
|
|
executeSoon(page_loaded);
|
|
}, true);
|
|
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
|
}
|
|
|
|
function page_loaded() {
|
|
var doc = gBrowser.contentDocument;
|
|
is(doc.getElementById("return").textContent, "exception", "installTrigger should have failed");
|
|
gBrowser.removeCurrentTab();
|
|
finish();
|
|
}
|
|
// ----------------------------------------------------------------------------
|