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

Unified Diff: LayoutTests/http/tests/serviceworker/registration.html

Issue 448063002: ServiceWorker: Add layout test for worker script MIME type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: simple rebase Created 6 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/resources/plain-text-worker.php » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/registration.html
diff --git a/LayoutTests/http/tests/serviceworker/registration.html b/LayoutTests/http/tests/serviceworker/registration.html
index 512edfbb008cb4dee148dc887c8101a721ff06cb..63ccc1ddd3aae8574fd86b1dd1a7c4258aea22d6 100644
--- a/LayoutTests/http/tests/serviceworker/registration.html
+++ b/LayoutTests/http/tests/serviceworker/registration.html
@@ -79,4 +79,22 @@
});
}());
+(function() {
+ var t = async_test('Registering script without correct MIME type');
+ t.step(function() {
+ navigator.serviceWorker.register(
+ 'resources/plain-text-worker.php'
+ ).then(
+ t.step_func(function(registration) {
+ assert_unreached('Registration of plain text script should fail.');
+ }),
+ t.step_func(function(reason) {
+ assert_equals(reason.name, 'AbortError',
+ 'Registration of plain text script should fail.');
+ t.done();
+ })
+ );
+ });
+}());
+
</script>
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/resources/plain-text-worker.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698