Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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> |
| OLD | NEW |