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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/preload/fetch_destination.https.html

Issue 2697453005: Import wpt@758b3b4cfa805067f36121333ba031e583d3a62c (Closed)
Patch Set: Add -expected.txt files. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <script src="../service-workers/service-worker/resources/test-helpers.sub.js"></ script>
5 <script>
6 async_test(function(t) {
7 var worker_url = 'resources/fetch-destination-worker.js';
8 var scope = 'resources/empty.html';
9 var registration;
10
11 service_worker_unregister_and_register(t, worker_url, scope)
12 .then(t.step_func(function(r) {
13 registration = r;
14 return wait_for_state(t, r.installing, 'activated');
15 }))
16 .then(t.step_func(function() {
17 return with_iframe(scope);
18 }))
19 .then(t.step_func(function(frame) {
20 var link = frame.contentWindow.document.createElement("link");
21 link.as = "fetch";
22 link.href = "resources/dummy.xml";
23 link.rel = "preload";
24 link.addEventListener("load", t.step_func_done(function() { registrati on.unregister(); }));
25 link.addEventListener("error", t.step_func_done(function() {
26 registration.unregister();
27 assert_unreached("Fetch destination preload errored");
28 }));
29 frame.contentWindow.document.body.appendChild(link);
30 }))
31 .catch(unreached_rejection(t));
32 }, 'Fetch destination preload');
33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698