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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/malformed-worker.php

Issue 697833004: ServiceWorker: Registering a malformed script should fail [3/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@install_malformed_script
Patch Set: add more tests Created 6 years, 1 month 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 | « LayoutTests/http/tests/serviceworker/registration.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/resources/malformed-worker.php
diff --git a/LayoutTests/http/tests/serviceworker/resources/malformed-worker.php b/LayoutTests/http/tests/serviceworker/resources/malformed-worker.php
new file mode 100644
index 0000000000000000000000000000000000000000..d4277b144b3c0b7922cb7b0bb370f5b8c0fff1cb
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/resources/malformed-worker.php
@@ -0,0 +1,23 @@
+<?php
+header('Content-Type:application/javascript');
+switch ($_SERVER['QUERY_STRING']) {
+ case 'parse-error':
+ echo 'var foo = function() {;';
+ exit;
+ case 'undefined-error':
+ echo 'foo.bar = 42;';
+ exit;
+ case 'uncaught-exception':
+ echo 'throw new Error;';
+ exit;
+ case 'caught-exception':
+ echo 'try { throw new Error; } catch(e) {}';
+ exit;
+ case 'import-malformed-script':
+ echo 'importScripts("malformed-worker.php?parse-error");';
+ exit;
+ case 'import-no-such-script':
+ echo 'importScripts("no-such-script.js");';
+ exit;
+}
+?>
« no previous file with comments | « LayoutTests/http/tests/serviceworker/registration.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698