Backed out changeset e28e73446d88 (bug 1018169) for Android & B2G xpcshell failures in worker_test_constants.js; CLOSED TREE
authorEd Morley <emorley@mozilla.com>
Fri, 06 Jun 2014 11:59:22 +0100
changeset 206304 445724f95b28d87ce1fb820dbedc341140d66b0b
parent 206303 c1809b4d88265e554a6de36e462a2a7f437b3cb6
child 206305 3c0151397b51eb5dad7a30e1aa0ede4fb726c055
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1018169
milestone32.0a1
backs oute28e73446d88c5d9bd56465916a26eab0a0e43ac
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
Backed out changeset e28e73446d88 (bug 1018169) for Android & B2G xpcshell failures in worker_test_constants.js; CLOSED TREE
toolkit/components/osfile/tests/xpcshell/data/chrome.manifest
toolkit/components/osfile/tests/xpcshell/data/worker_test_constants.js
toolkit/components/osfile/tests/xpcshell/test_constants.js
toolkit/components/osfile/tests/xpcshell/xpcshell.ini
deleted file mode 100644
--- a/toolkit/components/osfile/tests/xpcshell/data/chrome.manifest
+++ /dev/null
@@ -1,1 +0,0 @@
-content workers ./
\ No newline at end of file
deleted file mode 100644
--- a/toolkit/components/osfile/tests/xpcshell/data/worker_test_constants.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-onmessage = function(e) {
-    // send the OS.Constants as a stringified JSON
-    postMessage(JSON.stringify({'OS_Constants': OS.Constants, 'OS_Constants_Win': OS.Constants.Win,
-        'OS_Constants_Path': OS.Constants.Path, 'OS_Constants_Sys': OS.Constants.Sys,
-        'OS_Constants_libc': OS.Constants.libc, 'OS_Constants_Sys_DEBUG': OS.Constants.Sys.DEBUG,
-        'OS_Constants_Sys_Name': OS.Constants.Sys.Name}));
-};
\ No newline at end of file
--- a/toolkit/components/osfile/tests/xpcshell/test_constants.js
+++ b/toolkit/components/osfile/tests/xpcshell/test_constants.js
@@ -1,64 +1,26 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
 "use strict";
 
-Components.utils.import("resource://gre/modules/Promise.jsm", this);
 Components.utils.import("resource://gre/modules/osfile.jsm");
+Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm", this);
-let isDebugBuild = Components.classes["@mozilla.org/xpcom/debug;1"].getService(Components.interfaces.nsIDebug2).isDebugBuild;
-// import the worker using a chrome uri
-let worker_url = "chrome://workers/content/worker_test_constants.js";
-do_load_manifest("data/chrome.manifest");
 
 function run_test() {
   run_next_test();
 }
 
 // Test that OS.Constants is defined correctly.
 add_task(function* check_definition() {
   do_check_true(OS.Constants!=null);
   do_check_true(!!OS.Constants.Win || !!OS.Constants.libc);
   do_check_true(OS.Constants.Path!=null);
   do_check_true(OS.Constants.Sys!=null);
-  // check system name
+  //check system name
   do_check_eq(OS.Constants.Sys.Name, Services.appinfo.OS);
-  // check if using DEBUG build
-  if (isDebugBuild) {
+
+  //check if using DEBUG build
+  if (Components.classes["@mozilla.org/xpcom/debug;1"].getService(Components.interfaces.nsIDebug2).isDebugBuild == true) {
     do_check_true(OS.Constants.Sys.DEBUG);
   } else {
     do_check_true(typeof(OS.Constants.Sys.DEBUG) == 'undefined');
   }
-});
-
-function test_worker(worker) {
-  var deferred = Promise.defer();
-  worker.onmessage = function (e) {
-    // parse the stringified data
-    var data = JSON.parse(e.data);
-    try {
-      // perform the tests
-      do_check_true(data.OS_Constants != null);
-      do_check_true(!!data.OS_Constants_Win || !!data.OS_Constants_libc);
-      do_check_true(data.OS_Constants_Path != null);
-      do_check_true(data.OS_Constants_Sys != null);
-      do_check_eq(data.OS_Constants_Sys_Name, Services.appinfo.OS);
-      if (isDebugBuild) {
-        do_check_true(data.OS_Constants_Sys_DEBUG);
-      } else {
-        do_check_true(typeof(data.OS_Constants_Sys_DEBUG) == 'undefined');
-      }
-    }  finally {
-       // resolve the promise
-       deferred.resolve();
-    }
-  };
-  // start the worker
-  worker.postMessage('Start tests');
-  return deferred.promise;
-}
-
-add_task(function* check_worker() {
-  // create a new ChromeWorker
-  return test_worker(new ChromeWorker(worker_url));
 });
\ No newline at end of file
--- a/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
+++ b/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
@@ -1,14 +1,11 @@
 [DEFAULT]
 head = head.js
 tail =
-support-files =
-  data/worker_test_constants.js
-  data/chrome.manifest
 
 [test_available_free_space.js]
 [test_osfile_closed.js]
 [test_path.js]
 [test_osfile_async.js]
 [test_osfile_async_append.js]
 [test_osfile_async_bytes.js]
 [test_osfile_async_copy.js]