dom/indexedDB/test/browser_bug839193.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial