Backout 756fcc79ab98 due to bustage on OS X
authorKyle Machulis <kyle@nonpolynomial.com>
Wed, 10 Jun 2015 23:49:20 -0700
changeset 248263 4b0acc875712213509627ae3fc0c1a1c62bfc447
parent 248262 6fd48f8bf7b4e2006bb66062ac3986030023b216
child 248264 136d0f3fe47c010f6205e0cbe84458f71555c997
push id28893
push userkwierso@gmail.com
push dateFri, 12 Jun 2015 00:02:58 +0000
treeherdermozilla-central@8cf9d3e497f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone41.0a1
backs out756fcc79ab987564c1795a0941e7359ca32c7c50
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout 756fcc79ab98 due to bustage on OS X
CLOBBER
browser/installer/package-manifest.in
dom/settings/moz.build
dom/settings/tests/mochitest.ini
dom/settings/tests/test_settings_service.js
--- a/CLOBBER
+++ b/CLOBBER
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 1012403 - Update SettingsService tests (requires clobber due to package manifest change)
+Bug 1165422 - Updated the Android SDK versions
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -530,18 +530,16 @@
 @RESPATH@/components/TelemetryStartup.js
 @RESPATH@/components/TelemetryStartup.manifest
 @RESPATH@/components/XULStore.js
 @RESPATH@/components/XULStore.manifest
 @RESPATH@/components/messageWakeupService.js
 @RESPATH@/components/messageWakeupService.manifest
 @RESPATH@/components/SettingsManager.js
 @RESPATH@/components/SettingsManager.manifest
-@BINPATH@/components/SettingsService.js
-@BINPATH@/components/SettingsService.manifest
 @RESPATH@/components/Webapps.js
 @RESPATH@/components/Webapps.manifest
 @RESPATH@/components/AppsService.js
 @RESPATH@/components/AppsService.manifest
 @RESPATH@/components/recording-cmdline.js
 @RESPATH@/components/recording-cmdline.manifest
 @RESPATH@/components/htmlMenuBuilder.js
 @RESPATH@/components/htmlMenuBuilder.manifest
--- a/dom/settings/moz.build
+++ b/dom/settings/moz.build
@@ -4,17 +4,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 EXTRA_COMPONENTS += [
     'SettingsManager.js',
     'SettingsManager.manifest',
 ]
 
-if CONFIG['MOZ_B2G'] or CONFIG['ENABLE_TESTS']:
+if CONFIG['MOZ_B2G']:
     EXTRA_COMPONENTS += [
         'SettingsService.js',
         'SettingsService.manifest',
     ]
 
     MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
 
 EXTRA_JS_MODULES += [
--- a/dom/settings/tests/mochitest.ini
+++ b/dom/settings/tests/mochitest.ini
@@ -1,9 +1,10 @@
 [DEFAULT]
+skip-if = (toolkit == 'gonk' && debug) #debug-only failure, bug 932878
 support-files =
   file_loadserver.js
   file_bug1110872.js
   file_bug1110872.html
 
 [test_settings_basics.html]
 [test_settings_permissions.html]
 [test_settings_blobs.html]
--- a/dom/settings/tests/test_settings_service.js
+++ b/dom/settings/tests/test_settings_service.js
@@ -13,114 +13,109 @@ Cu.import("resource://gre/modules/Servic
 
 SimpleTest.waitForExplicitFinish();
 
 XPCOMUtils.defineLazyServiceGetter(this, "SettingsService",
                                    "@mozilla.org/settingsService;1",
                                    "nsISettingsService");
 
 let tests = [
-      /* Callback tests */
-      function() {
-        let callbackCount = 10;
+  /* Callback tests */
+  function() {
+    let callbackCount = 10;
 
-        let callback = {
-          handle: function(name, result) {
-            switch (callbackCount) {
-              case 10:
-              case 9:
-                is(result, true, "result is true");
-                break;
-              case 8:
-              case 7:
-                is(result, false, "result is false");
-                break;
-              case 6:
-              case 5:
-                is(result, 9, "result is 9");
-                break;
-              case 4:
-              case 3:
-                is(result, 9.4, "result is 9.4");
-                break;
-              case 2:
-                is(result, false, "result is false");
-                break;
-              case 1:
-                is(result, null, "result is null");
-                break;
-              default:
-                ok(false, "Unexpected call: " + callbackCount);
-            }
+    let callback = {
+      handle: function(name, result) {
+        switch (callbackCount) {
+        case 10:
+        case 9:
+          is(result, true, "result is true");
+          break;
+        case 8:
+        case 7:
+          is(result, false, "result is false");
+          break;
+        case 6:
+        case 5:
+          is(result, 9, "result is 9");
+          break;
+        case 4:
+        case 3:
+          is(result, 9.4, "result is 9.4");
+          break;
+        case 2:
+          is(result, false, "result is false");
+          break;
+        case 1:
+          is(result, null, "result is null");
+          break;
+        default:
+          ok(false, "Unexpected call: " + callbackCount);
+        }
 
-            --callbackCount;
-            if (callbackCount === 0) {
-              next();
-            }
-          },
-
-          handleError: function(name) {
-            ok(false, "error: " + name);
-          }
-        };
-
-        let lock = SettingsService.createLock();
-        let lock1 = SettingsService.createLock();
-
-        lock.set("asdf", true, callback, null);
-        lock1.get("asdf", callback);
-        lock.get("asdf", callback);
-        lock.set("asdf", false, callback, null);
-        lock.get("asdf", callback);
-        lock.set("int", 9, callback, null);
-        lock.get("int", callback);
-        lock.set("doub", 9.4, callback, null);
-        lock.get("doub", callback);
-        lock1.get("asdfxxx", callback);
+        --callbackCount;
+        if (callbackCount === 0) {
+          next();
+        }
       },
 
-      /* Observer tests */
-      function() {
-        const MOZSETTINGS_CHANGED   = "mozsettings-changed";
-        const TEST_OBSERVER_KEY     = "test.observer.key";
-        const TEST_OBSERVER_VALUE   = true;
-        const TEST_OBSERVER_MESSAGE = "test.observer.message";
+      handleError: function(name) {
+        ok(false, "error: " + name);
+      }
+    };
+
+    let lock = SettingsService.createLock();
+    let lock1 = SettingsService.createLock();
 
-        var obs = {
-          observe: function (subject, topic, data) {
+    lock.set("asdf", true, callback, null);
+    lock1.get("asdf", callback);
+    lock.get("asdf", callback);
+    lock.set("asdf", false, callback, null);
+    lock.get("asdf", callback);
+    lock.set("int", 9, callback, null);
+    lock.get("int", callback);
+    lock.set("doub", 9.4, callback, null);
+    lock.get("doub", callback);
+    lock1.get("asdfxxx", callback);
+  },
+
+  /* Observer tests */
+  function() {
+    const MOZSETTINGS_CHANGED   = "mozsettings-changed";
+    const TEST_OBSERVER_KEY     = "test.observer.key";
+    const TEST_OBSERVER_VALUE   = true;
+    const TEST_OBSERVER_MESSAGE = "test.observer.message";
 
-            if (topic !== MOZSETTINGS_CHANGED) {
-              ok(false, "Event is not mozsettings-changed.");
-              return;
-            }
-            // Data is now stored in subject
-            if ("wrappedJSObject" in subject) {
-              ok(true, "JS object wrapped into subject");
-              subject = subject.wrappedJSObject;
-            }
-            function checkProp(name, type, value) {
-              ok(name in subject, "subject." + name + " is present");
-              is(typeof subject[name], type, "subject." + name + " is " + type);
-              is(subject[name], value, "subject." + name + " is " + value);
-            }
+    function observer(subject, topic, data) {
+
+      if (topic !== MOZSETTINGS_CHANGED) {
+        ok(false, "Event is not mozsettings-changed.");
+        return;
+      }
+
+      data = JSON.parse(data);
+      function checkProp(name, type, value) {
+        ok(name in data, "data." + name + " is present");
+        is(typeof data[name], type, "data." + name + " is " + type);
+        is(data[name], value, "data." + name + " is " + value);
+      }
 
-            checkProp("key", "string", TEST_OBSERVER_KEY);
-            checkProp("value", "boolean", TEST_OBSERVER_VALUE);
-            checkProp("isInternalChange", "boolean", true);
+      checkProp("key", "string", TEST_OBSERVER_KEY);
+      checkProp("value", "boolean", TEST_OBSERVER_VALUE);
+      checkProp("isInternalChange", "boolean", true);
 
-            Services.obs.removeObserver(this, MOZSETTINGS_CHANGED);
-            next();
-          }
-        };
+        Services.obs.removeObserver(this, MOZSETTINGS_CHANGED);
+        next();
+      }
 
-        Services.obs.addObserver(obs, MOZSETTINGS_CHANGED, false);
+    Services.obs.addObserver(observer, MOZSETTINGS_CHANGED, false);
 
-        let lock = SettingsService.createLock();
-        lock.set(TEST_OBSERVER_KEY, TEST_OBSERVER_VALUE, null);
-      }
+    let lock = SettingsService.createLock();
+    lock.set(TEST_OBSERVER_KEY, TEST_OBSERVER_VALUE, null);
+  }
 ];
 
 function next() {
   let step = tests.shift();
   if (step) {
     try {
       step();
     } catch(e) {