Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <?xml-stylesheet type="text/css" href="chrome://global/skin"?> |
michael@0 | 3 | <?xml-stylesheet type="text/css" href="/tests/SimpleTest/test.css"?> |
michael@0 | 4 | <!-- |
michael@0 | 5 | Any copyright is dedicated to the Public Domain. |
michael@0 | 6 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 7 | --> |
michael@0 | 8 | <window title="Mozilla Bug 832883" |
michael@0 | 9 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 10 | onload="runTest();"> |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> |
michael@0 | 13 | |
michael@0 | 14 | <script type="application/javascript;version=1.7"> |
michael@0 | 15 | <![CDATA[ |
michael@0 | 16 | function testSteps() { |
michael@0 | 17 | // Test for IDBKeyRange and indexedDB availability in bootstrap files. |
michael@0 | 18 | let test = Cc["@mozilla.org/dom/indexeddb/GlobalObjectsComponent;1"]. |
michael@0 | 19 | createInstance(Ci.nsISupports).wrappedJSObject; |
michael@0 | 20 | test.ok = ok; |
michael@0 | 21 | test.finishTest = continueToNextStep; |
michael@0 | 22 | test.runTest(); |
michael@0 | 23 | yield undefined; |
michael@0 | 24 | |
michael@0 | 25 | Cu.import("resource://gre/modules/AddonManager.jsm"); |
michael@0 | 26 | AddonManager.getAddonByID("indexedDB-test@mozilla.org", |
michael@0 | 27 | grabEventAndContinueHandler); |
michael@0 | 28 | let addon = yield undefined; |
michael@0 | 29 | addon.uninstall(); |
michael@0 | 30 | |
michael@0 | 31 | Cu.import("resource://gre/modules/Services.jsm"); |
michael@0 | 32 | for each (var stage in [ "install", "startup", "shutdown", "uninstall" ]) { |
michael@0 | 33 | for each (var symbol in [ "IDBKeyRange", "indexedDB" ]) { |
michael@0 | 34 | let pref; |
michael@0 | 35 | try { |
michael@0 | 36 | pref = Services.prefs.getBoolPref("indexeddbtest.bootstrap." + stage + |
michael@0 | 37 | "." + symbol); |
michael@0 | 38 | } |
michael@0 | 39 | catch(ex) { |
michael@0 | 40 | pref = false; |
michael@0 | 41 | } |
michael@0 | 42 | ok(pref, "Symbol '" + symbol + "' present during '" + stage + "'"); |
michael@0 | 43 | } |
michael@0 | 44 | } |
michael@0 | 45 | |
michael@0 | 46 | finishTest(); |
michael@0 | 47 | yield undefined; |
michael@0 | 48 | } |
michael@0 | 49 | |
michael@0 | 50 | window.runTest = function() { |
michael@0 | 51 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 52 | |
michael@0 | 53 | testGenerator.next(); |
michael@0 | 54 | } |
michael@0 | 55 | ]]> |
michael@0 | 56 | </script> |
michael@0 | 57 | |
michael@0 | 58 | <script type="text/javascript;version=1.7" src="chromeHelpers.js"></script> |
michael@0 | 59 | |
michael@0 | 60 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 61 | <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=832883" |
michael@0 | 62 | target="_blank">Mozilla Bug 832883</a> |
michael@0 | 63 | </body> |
michael@0 | 64 | </window> |