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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/sandbox-iframe-register-link-element.html

Issue 2358993003: Service worker creation from <link> leads to nullptr dereference (Closed)
Patch Set: Formatting 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/serviceworker/sandbox-iframe-register-link-element.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/sandbox-iframe-register-link-element.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/sandbox-iframe-register-link-element.html
new file mode 100644
index 0000000000000000000000000000000000000000..cb1b3b5b5cd0cfbdd50dc2a29a0c13b0010890d6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/sandbox-iframe-register-link-element.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="resources/test-helpers.js"></script>
+<script src="resources/registration-tests.js"></script>
+<body>
+<script>
+async_test(function(t) {
+ window.addEventListener('message', function(e) {
+ if (e.data == 'error') {
+ t.step(function() {
+ t.done();
+ });
+ } else {
+ t.step(function() {
+ assert_unreached('iframe successfully loaded service worker');
+ });
+ }
+ });
+ }, 'Sandboxed iframe should not be able to register service worker with link rel');
+</script>
+<iframe src="resources/iframe-register-link-element.html" sandbox="allow-scripts"></iframe>
+</body>

Powered by Google App Engine
This is Rietveld 408576698