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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/serviceworker/registration.html
diff --git a/LayoutTests/http/tests/serviceworker/registration.html b/LayoutTests/http/tests/serviceworker/registration.html
index 63ccc1ddd3aae8574fd86b1dd1a7c4258aea22d6..43cdbe4e36858fb92bc9f7871fb8238cd44b4ee7 100644
--- a/LayoutTests/http/tests/serviceworker/registration.html
+++ b/LayoutTests/http/tests/serviceworker/registration.html
@@ -97,4 +97,23 @@
});
}());
+(function() {
+ var t = async_test('Registering redirected script');
+ t.step(function() {
+ navigator.serviceWorker.register(
+ 'resources/redirect.php?Redirect=' +
+ encodeURIComponent('/resources/registration-worker.js')
+ ).then(
+ t.step_func(function(registration) {
+ assert_unreached('Registration of redirected script should fail.');
+ }),
+ t.step_func(function(reason) {
+ 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.
+ 'Registration of redirected script should fail.');
+ t.done();
+ })
+ );
+ });
+}());
+
</script>

Powered by Google App Engine
This is Rietveld 408576698