dom/indexedDB/test/test_globalObjects_other.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/indexedDB/test/test_globalObjects_other.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
     1.6 +<?xml-stylesheet type="text/css" href="/tests/SimpleTest/test.css"?>
     1.7 +<!--
     1.8 +  Any copyright is dedicated to the Public Domain.
     1.9 +  http://creativecommons.org/publicdomain/zero/1.0/
    1.10 +-->
    1.11 +<window title="Mozilla Bug 832883"
    1.12 +        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.13 +        onload="runTest();">
    1.14 +  <script type="application/javascript"
    1.15 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
    1.16 +
    1.17 +  <script type="application/javascript;version=1.7">
    1.18 +  <![CDATA[
    1.19 +  function testSteps() {
    1.20 +    // Test for IDBKeyRange and indexedDB availability in bootstrap files.
    1.21 +    let test = Cc["@mozilla.org/dom/indexeddb/GlobalObjectsComponent;1"].
    1.22 +               createInstance(Ci.nsISupports).wrappedJSObject;
    1.23 +    test.ok = ok;
    1.24 +    test.finishTest = continueToNextStep;
    1.25 +    test.runTest();
    1.26 +    yield undefined;
    1.27 +
    1.28 +    Cu.import("resource://gre/modules/AddonManager.jsm");
    1.29 +    AddonManager.getAddonByID("indexedDB-test@mozilla.org",
    1.30 +                              grabEventAndContinueHandler);
    1.31 +    let addon = yield undefined;
    1.32 +    addon.uninstall();
    1.33 +
    1.34 +    Cu.import("resource://gre/modules/Services.jsm");
    1.35 +    for each (var stage in [ "install", "startup", "shutdown", "uninstall" ]) {
    1.36 +      for each (var symbol in [ "IDBKeyRange", "indexedDB" ]) {
    1.37 +        let pref;
    1.38 +        try {
    1.39 +          pref = Services.prefs.getBoolPref("indexeddbtest.bootstrap." + stage +
    1.40 +                                            "." + symbol);
    1.41 +        }
    1.42 +        catch(ex) {
    1.43 +          pref = false;
    1.44 +        }
    1.45 +        ok(pref, "Symbol '" + symbol + "' present during '" + stage + "'");
    1.46 +      }
    1.47 +    }
    1.48 +
    1.49 +    finishTest();
    1.50 +    yield undefined;
    1.51 +  }
    1.52 +
    1.53 +  window.runTest = function() {
    1.54 +    SimpleTest.waitForExplicitFinish();
    1.55 +
    1.56 +    testGenerator.next();
    1.57 +  }
    1.58 +  ]]>
    1.59 +  </script>
    1.60 +
    1.61 +  <script type="text/javascript;version=1.7" src="chromeHelpers.js"></script>
    1.62 +
    1.63 +  <body xmlns="http://www.w3.org/1999/xhtml">
    1.64 +  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=832883"
    1.65 +     target="_blank">Mozilla Bug 832883</a>
    1.66 +  </body>
    1.67 +</window>

mercurial