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

Unified Diff: LayoutTests/http/tests/serviceworker/chromium/resources/sandboxed-iframe-navigator-serviceworker-iframe.html

Issue 1199183002: Throw a SecurityError when navigator.serviceWorker is accessed in a sandboxed iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use ASSERT_NO_EXCEPTION Created 5 years, 6 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/chromium/sandboxed-iframe-navigator-serviceworker.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/chromium/resources/sandboxed-iframe-navigator-serviceworker-iframe.html
diff --git a/LayoutTests/http/tests/serviceworker/chromium/resources/sandboxed-iframe-navigator-serviceworker-iframe.html b/LayoutTests/http/tests/serviceworker/chromium/resources/sandboxed-iframe-navigator-serviceworker-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..114dc4b8c383048d112b3f1ff0eb41c6c43ddd1f
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/chromium/resources/sandboxed-iframe-navigator-serviceworker-iframe.html
@@ -0,0 +1,12 @@
+<script>
+window.onmessage = function (e) {
+ var id = e.data['id'];
+ try {
+ var sw = window.navigator.serviceWorker;
+ } catch (e) {
+ window.top.postMessage({id: id, result:e.toString()}, '*');
+ return;
+ }
+ window.top.postMessage({id: id, result:'ok'}, '*');
+};
+</script>
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698