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

Side by Side Diff: LayoutTests/http/tests/serviceworker/registration.html

Issue 546353003: ServiceWorker: Change worker script fetch error code(1/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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: Registration</title> 2 <title>Service Worker: Registration</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 src="resources/test-helpers.js"></script> 5 <script src="resources/test-helpers.js"></script>
6 <script> 6 <script>
7 (function() { 7 (function() {
8 var t = async_test('Registering normal pattern'); 8 var t = async_test('Registering normal pattern');
9 t.step(function() { 9 t.step(function() {
10 var scope = '/registration/'; 10 var scope = '/registration/';
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 }), 90 }),
91 t.step_func(function(reason) { 91 t.step_func(function(reason) {
92 assert_equals(reason.name, 'AbortError', 92 assert_equals(reason.name, 'AbortError',
93 'Registration of plain text script should fail.'); 93 'Registration of plain text script should fail.');
94 t.done(); 94 t.done();
95 }) 95 })
96 ); 96 );
97 }); 97 });
98 }()); 98 }());
99 99
100 (function() {
101 var t = async_test('Registering redirected script');
102 t.step(function() {
103 navigator.serviceWorker.register(
104 'resources/redirect.php?Redirect=' +
105 encodeURIComponent('/resources/registration-worker.js')
106 ).then(
107 t.step_func(function(registration) {
108 assert_unreached('Registration of redirected script should fail. ');
109 }),
110 t.step_func(function(reason) {
111 assert_equals(reason.name, 'AbortError',
nhiroki 2014/09/12 07:57:28 This 'AbortError' is ephemeral and will be replace
xiang 2014/09/16 05:47:41 Right, I will move it to 3rd patch.
112 'Registration of redirected script should fail.');
113 t.done();
114 })
115 );
116 });
117 }());
118
100 </script> 119 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698