summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/xpinstall/browser_bug611242.js
blob: 4f3cd087f47b9762de0984ec17903aca3ff87bf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// ----------------------------------------------------------------------------
// Test whether setting a new property in InstallTrigger then persists to other
// page loads
add_task(function* test() {
  yield BrowserTestUtils.withNewTab({ gBrowser, url: TESTROOT + "enabled.html" }, function* (browser) {
    yield ContentTask.spawn(browser, null, () => {
      content.wrappedJSObject.InstallTrigger.enabled.k = function() { };
    });

    BrowserTestUtils.loadURI(browser, TESTROOT2 + "enabled.html");
    yield BrowserTestUtils.browserLoaded(browser);
    yield ContentTask.spawn(browser, null, () => {
      is(content.wrappedJSObject.InstallTrigger.enabled.k, undefined, "Property should not be defined");
    });
  });
});
// ----------------------------------------------------------------------------