Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / frames / sandboxed-iframe-scripting-02.html
blob3689adb1d5e509bba60e36b3e8f72bf916c6e677
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 window.jsTestIsAsync = true;
8 var allowedExecuted = 0;
9 var disallowedExecuted = 0;
10 window.addEventListener('message', function () {
11 allowedExecuted++;
13 finish();
14 });
16 function finish() {
17 shouldBe("disallowedExecuted", "0");
18 shouldBe("allowedExecuted", "1");
20 finishJSTest();
22 </script>
23 </head>
24 <body>
25 <iframe sandbox="allow-same-origin allow-scripts"
26 src="data:text/html,<script>console.log('PASS: Executed script in data URL');window.parent.postMessage({'pass': true}, '*');</script>">
27 </iframe>
28 <script>
29 description("Verify that sandboxed frames with sandbox='allow-scripts' can execute script from data: URLs.");
30 </script>
31 </body>
32 </html>