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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-xhr-sync.https.html

Issue 2907443002: Upstream service worker "XHR" test to WPT (Closed)
Patch Set: Created 3 years, 6 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 <title>Service Worker: Synchronous XHR doesn't deadlock</title>
falken 2017/05/29 04:22:15 is intercepted
mike3 2017/05/29 16:14:21 Done.
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.sub.js"></script>
6 <script>
7 'use strict';
8
9 promise_test(function(t) {
10 var url = 'resources/fetch-request-xhr-sync-worker.js';
11 var scope = 'resources/fetch-request-xhr-sync-iframe.html';
12
13 return service_worker_unregister_and_register(t, url, scope)
14 .then(function(registration) {
15 t.add_cleanup(function() {
16 registration.unregister();
17 });
18
19 return wait_for_state(t, registration.installing, 'activated');
20 })
21 .then(function() { return with_iframe(scope); })
22 .then(function(frame) {
23 t.add_cleanup(function() {
24 frame.remove();
25 });
26
27 return new Promise(function(resolve, reject) {
28 setTimeout(function() {
29 try {
30 frame.contentWindow.performSyncXHR();
31 resolve();
32 } catch (err) {
33 reject(err);
34 }
35 }, 0);
36 });
37 });
38 }, 'Verify SyncXHR does not deadlock');
falken 2017/05/29 04:22:15 Verify SyncXHR is intercepted
mike3 2017/05/29 16:14:21 Done.
39 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698