From 8671425970d5f93d86cc669edad6fca4a6b93871 Mon Sep 17 00:00:00 2001 From: Doug Turner Date: Thu, 16 Aug 2012 16:14:37 -0700 Subject: [PATCH] Bug 782676 - Enable test_stat.html on mac and windows. r=khuey --HG-- extra : rebase_source : fc7025df9a48d2b942054b511694440a59c241bb --- dom/devicestorage/test/test_stat.html | 42 ++++++++++----------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/dom/devicestorage/test/test_stat.html b/dom/devicestorage/test/test_stat.html index 933d8adc96b..c6495110898 100644 --- a/dom/devicestorage/test/test_stat.html +++ b/dom/devicestorage/test/test_stat.html @@ -35,36 +35,26 @@ function statError(e) { 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"); - - request.onsuccess = statSuccess; - request.onerror = statError; - } - - request = storage.addNamed(createRandomBlob(), "a/b"); - request.onsuccess = addSuccess; - request.onerror = addError; - } +function addSuccess(e) { + request = storage.stat(); + ok(request, "Should have a non-null request"); + + request.onsuccess = statSuccess; + request.onerror = statError; +} + +request = storage.addNamed(createRandomBlob(), "a/b"); +request.onsuccess = addSuccess; +request.onerror = addError; +