dom/indexedDB/test/browser_bug839193.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 let gTestRoot = getRootDirectory(gTestPath);
     6 let gBugWindow = null;
     7 let gIterations = 5;
     9 function onLoad() {
    10   gBugWindow.close();
    11 }
    13 function onUnload() {
    14   if (!gIterations) {
    15     gBugWindow = null;
    16     Services.obs.removeObserver(onLoad, "bug839193-loaded");
    17     Services.obs.removeObserver(onUnload, "bug839193-unloaded");
    19     window.focus();
    20     finish();
    21   } else {
    22     gBugWindow = window.openDialog(gTestRoot + "bug839193.xul");
    23     gIterations--;
    24   }
    25 }
    27 // This test is about leaks, which are handled by the test harness, so
    28 // there are no actual checks here. Whether or not this test passes or fails
    29 // will be apparent by the checks the harness performs.
    30 function test() {
    31   waitForExplicitFinish();
    32   Services.obs.addObserver(onLoad, "bug839193-loaded", false);
    33   Services.obs.addObserver(onUnload, "bug839193-unloaded", false);
    35   gBugWindow = window.openDialog(gTestRoot + "bug839193.xul");
    36 }

mercurial