Bug 1182094 Fix wpt sandboxed-iframes.https.html test to expect rejected promises. r=jgraham
authorBen Kelly <ben@wanderview.com>
Tue, 15 Sep 2015 08:04:13 -0700
changeset 295216 9abb92bb199c469095d150e7b438a7f968bba990
parent 295215 8e4da0532d8f3bdaafd38163a39925e69b08531f
child 295217 6a44ecd7c0481ab144c1b4fa528d9552e097499c
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1182094
milestone43.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 1182094 Fix wpt sandboxed-iframes.https.html test to expect rejected promises. r=jgraham
testing/web-platform/meta/service-workers/cache-storage/window/__dir__.ini
testing/web-platform/meta/service-workers/cache-storage/window/cache-add.https.html.ini
testing/web-platform/meta/service-workers/cache-storage/window/cache-delete.https.html.ini
testing/web-platform/meta/service-workers/cache-storage/window/cache-storage-keys.https.html.ini
testing/web-platform/meta/service-workers/cache-storage/window/cache-storage.https.html.ini
testing/web-platform/meta/service-workers/cache-storage/window/sandboxed-iframes.https.html.ini
testing/web-platform/tests/service-workers/cache-storage/resources/iframe.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/service-workers/cache-storage/window/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [dom.caches.enabled:true]
deleted file mode 100644
--- a/testing/web-platform/meta/service-workers/cache-storage/window/cache-add.https.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[cache-add.https.html]
-  type: testharness
-  prefs: [dom.caches.enabled:true]
deleted file mode 100644
--- a/testing/web-platform/meta/service-workers/cache-storage/window/cache-delete.https.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[cache-delete.https.html]
-  type: testharness
-  prefs: [dom.caches.enabled:true]
deleted file mode 100644
--- a/testing/web-platform/meta/service-workers/cache-storage/window/cache-storage-keys.https.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[cache-storage-keys.https.html]
-  type: testharness
-  prefs: [dom.caches.enabled:true]
deleted file mode 100644
--- a/testing/web-platform/meta/service-workers/cache-storage/window/cache-storage.https.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[cache-storage.https.html]
-  type: testharness
-  prefs: [dom.caches.enabled:true]
deleted file mode 100644
--- a/testing/web-platform/meta/service-workers/cache-storage/window/sandboxed-iframes.https.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[sandboxed-iframes.https.html]
-  type: testharness
-  prefs: [dom.caches.enabled:true]
-  [Sandboxed iframe without allow-same-origin is denied access]
-    expected: FAIL
-
--- a/testing/web-platform/tests/service-workers/cache-storage/resources/iframe.html
+++ b/testing/web-platform/tests/service-workers/cache-storage/resources/iframe.html
@@ -1,13 +1,18 @@
 <!DOCTYPE html>
 <title>ok</title>
 <script>
 window.onmessage = function(e) {
     var id = e.data.id;
     try {
-        self.caches;
-        window.parent.postMessage({id: id, result: 'allowed'}, '*');
+        var name = 'checkallowed';
+        self.caches.open(name).then(function (cache) {
+            self.caches.delete(name);
+            window.parent.postMessage({id: id, result: 'allowed'}, '*');
+        }).catch(function(e) {
+            window.parent.postMessage({id: id, result: 'denied', name: e.name, message: e.message}, '*');
+        });
     } catch (e) {
-        window.parent.postMessage({id: id, result: 'denied', name: e.name, message: e.message}, '*');
+        window.parent.postMessage({id: id, result: 'unexpecteddenied', name: e.name, message: e.message}, '*');
     }
 };
 </script>