Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1567)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html

Issue 2836233002: Upstream service worker `fetch` tests to WPT (Closed)
Patch Set: Extend "-expected.txt" file with reference to new sub-test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html
deleted file mode 100644
index 33b47e78a349dfda70f9dc9a230a34152305640c..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<script>
-function fetch_url(url) {
- return new Promise(function(resolve, reject) {
- var request = new XMLHttpRequest();
- request.addEventListener('load', function(event) {
- resolve();
- });
- request.addEventListener('error', function(event) {
- reject();
- });
- request.open('GET', url);
- request.send();
- });
-}
-
-function make_test(testcase) {
- var name = testcase.name;
- return fetch_url(window.location.href + '?' + name)
- .then(
- function() {
- if (testcase.expect_load)
- return Promise.resolve();
- return Promise.reject(new Error(
- name + ': expected network error but loaded'));
- },
- function() {
- if (!testcase.expect_load)
- return Promise.resolve();
- return Promise.reject(new Error(
- name + ': expected to load but got network error'));
- });
-}
-
-function run_tests() {
- var tests = [
- { name: 'response-object', expect_load: true },
- { name: 'response-promise-object', expect_load: true },
- { name: 'other-value', expect_load: false },
- ].map(make_test);
-
- Promise.all(tests)
- .then(function() {
- window.parent.notify_test_done('PASS');
- })
- .catch(function(error) {
- window.parent.notify_test_done('FAIL: ' + error.message);
- });
-}
-
-if (!navigator.serviceWorker.controller)
- window.parent.notify_done('FAIL: no controller');
-else
- run_tests();
-</script>

Powered by Google App Engine
This is Rietveld 408576698