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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-link-rel.php

Issue 2358993003: Service worker creation from <link> leads to nullptr dereference (Closed)
Patch Set: Created 4 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: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-link-rel.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-link-rel.php b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-link-rel.php
new file mode 100644
index 0000000000000000000000000000000000000000..a0c906605c4261d49f4169d38d5f7669823a25aa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-link-rel.php
@@ -0,0 +1,23 @@
+<?php
+header("Suborigin: foobar");
+?>
+<!DOCTYPE html>
+<html>
+<head>
+<title>Service Worker link rel fails from a suborigin</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<script>
+var link = document.createElement('link');
+link.setAttribute('rel', 'serviceworker');
+link.setAttribute('href', 'resources/sw-reject-all-with-error.js');
falken 2016/09/23 01:22:33 I think this file doesn't exist? The test could be
jww 2016/09/23 04:34:47 It does exist, from a prior CL (see https://cs.chr
+link.onload = function() {
+ assert_unreached('Service worker was successfully registered with a <link> element');
+}
+link.onerror = function() {
+ done();
+}
+document.getElementsByTagName('head')[0].appendChild(link);
+</script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698