Bug 782676 - Enable test_stat.html on mac and windows. r=khuey
authorDoug Turner <dougt@dougt.org>
Thu, 16 Aug 2012 16:14:37 -0700
changeset 102617 a74b11baf961f93a0ce422204aa08cf63d7ee577
parent 102616 2d036225c7ba68772acaf9b6bb7e03da81b649e4
child 102618 431d680e9e2f0e0c410ee3bd6d422960d5637276
push id23297
push useremorley@mozilla.com
push dateFri, 17 Aug 2012 12:22:28 +0000
treeherdermozilla-central@e1cd9fb39dd7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs782676
milestone17.0a1
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
Bug 782676 - Enable test_stat.html on mac and windows. r=khuey
dom/devicestorage/test/test_stat.html
--- a/dom/devicestorage/test/test_stat.html
+++ b/dom/devicestorage/test/test_stat.html
@@ -30,43 +30,33 @@ function statSuccess(e) {
   devicestorage_cleanup();
 }
 
 function statError(e) {
   ok(false, "statError was called");
   devicestorage_cleanup();
 }
 
-var isMac = /Mac/.test(navigator.platform);
-var isWin = /Win/.test(navigator.platform);
+var storage = navigator.getDeviceStorage("testing");
+ok(navigator.getDeviceStorage, "Should have getDeviceStorage");
 
-if (isMac || isWin) {
-  todo(false, "stat is not available on mac or windows yet. see bug xxxx");
+function addError(e) {
+  ok(false, "addError was called : " + e.target.error.name);
   devicestorage_cleanup();
-} else {
-  var storage = navigator.getDeviceStorage("testing");
-  ok(navigator.getDeviceStorage, "Should have getDeviceStorage");
-
+}
 
-  function addError(e) {
-    ok(false, "addError was called : " + e.target.error.name);
-    devicestorage_cleanup();
-  }
-
-  function addSuccess(e) {
-    request = storage.stat();
-    ok(request, "Should have a non-null request");
+function addSuccess(e) {
+  request = storage.stat();
+  ok(request, "Should have a non-null request");
 
-    request.onsuccess = statSuccess;
-    request.onerror = statError;
-  }
+  request.onsuccess = statSuccess;
+  request.onerror = statError;
+}
 
-  request = storage.addNamed(createRandomBlob(), "a/b");
-  request.onsuccess = addSuccess;
-  request.onerror = addError;
-
-}
+request = storage.addNamed(createRandomBlob(), "a/b");
+request.onsuccess = addSuccess;
+request.onerror = addError;
 
 </script>
 </pre>
 </body>
 </html>