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

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: 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..0b1bbf96770ad9ea1478642d4d57c07349d7cd28
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/sandbox-iframe-register-link-element.html
@@ -0,0 +1,22 @@
+<!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>
+ var t = async_test('Sandboxed iframe should not be able to register service worker with link rel');
+ 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');
+ });
+ }
+ });
falken 2016/09/23 01:22:33 Since this is serviceworker/ it should use the som
jww 2016/09/23 04:34:47 Yikes! I had no idea. I tried to update to match t
+ </script>
+ <iframe src="resources/iframe-register-link-element.html" sandbox="allow-scripts"></iframe>
+</body>

Powered by Google App Engine
This is Rietveld 408576698