Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / security / cross-frame-access-get-custom-property-cached.html
blob85b95ac8c1e2cff331e8935eabb83b928b16b2f8
1 <html>
2 <head>
3 <script src="resources/cross-frame-access.js"></script>
4 <script>
5 window.onload = function()
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.waitUntilDone();
12 window.addEventListener('message', function ()
14 runTest();
15 if (window.testRunner)
16 testRunner.notifyDone();
17 });
20 function customPropertyAccessThrowsException(o)
22 try {
23 var x = o.customProperty;
24 return false;
25 } catch (e) {
26 return true;
30 runTest = function()
32 window.targetWindow = frames[0];
34 shouldBeTrue("customPropertyAccessThrowsException(targetWindow)");
35 shouldBeTrue("customPropertyAccessThrowsException(targetWindow)");
36 shouldBeTrue("customPropertyAccessThrowsException(targetWindow)");
38 </script>
39 </head>
40 <body>
41 <p>This test checks that caching of property accesses doesn't allow for illegal cross-frame access of a custom property. It also checks for an assertion failure that once occurred in this situation.</p>
42 <iframe src="http://localhost:8000/security/resources/cross-frame-access-get-custom-property-cached-iframe.html" style=""></iframe>
43 <pre id="console"></pre>
44 </body>
45 </html>