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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/cachestorage/common.html

Issue 1926813004: Replace assert_promise_rejects with upstream promise_rejects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove all testharness-helpers.js references Created 4 years, 7 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Cache Storage: Verify that Window and Workers see same storage</title> 2 <title>Cache Storage: Verify that Window and Workers see same storage</title>
3 <link rel="help" href="https://slightlyoff.github.io/ServiceWorker/spec/service_ worker/#cache-storage"> 3 <link rel="help" href="https://slightlyoff.github.io/ServiceWorker/spec/service_ worker/#cache-storage">
4 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 <script src="/resources/testharness-helpers.js"></script>
7 <script> 6 <script>
8 7
9 function wait_for_message(worker) { 8 function wait_for_message(worker) {
10 return new Promise(function(resolve) { 9 return new Promise(function(resolve) {
11 worker.addEventListener('message', function listener(e) { 10 worker.addEventListener('message', function listener(e) {
12 resolve(e.data); 11 resolve(e.data);
13 worker.removeEventListener('message', listener); 12 worker.removeEventListener('message', listener);
14 }); 13 });
15 }); 14 });
16 } 15 }
(...skipping 25 matching lines...) Expand all
42 assert_equals(bodies[0], 'a', 41 assert_equals(bodies[0], 'a',
43 'Body should match response put by worker'); 42 'Body should match response put by worker');
44 assert_equals(bodies[1], 'b', 43 assert_equals(bodies[1], 'b',
45 'Body should match response put by worker'); 44 'Body should match response put by worker');
46 assert_equals(bodies[2], 'c', 45 assert_equals(bodies[2], 'c',
47 'Body should match response put by worker'); 46 'Body should match response put by worker');
48 }); 47 });
49 }, 'Window sees cache puts by Worker'); 48 }, 'Window sees cache puts by Worker');
50 49
51 </script> 50 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698