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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/rejections.https.html

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 years, 2 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>Service Worker: Rejection Types</title> 2 <title>Service Worker: Rejection Types</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 6
7 (function() { 7 (function() {
8 var t = async_test('Rejections are DOMExceptions'); 8 var t = async_test('Rejections are DOMExceptions');
9 t.step(function() { 9 t.step(function() {
10 10
11 navigator.serviceWorker.register('http://example.com').then( 11 navigator.serviceWorker.register('http://example.com').then(
12 t.step_func(function() { assert_unreached('Registration should fail' ); }), 12 t.step_func(function() { assert_unreached('Registration should fail' ); }),
13 t.step_func(function(reason) { 13 t.step_func(function(reason) {
14 assert_true(reason instanceof DOMException); 14 assert_true(reason instanceof DOMException);
15 assert_true(reason instanceof Error); 15 assert_true(reason instanceof Error);
16 t.done(); 16 t.done();
17 })); 17 }));
18 }); 18 });
19 }()); 19 }());
20 20
21 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698