Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / cookies / cookies-disabled-in-data-url.html
blob69610526a6950b691b187492a088922d5fa65145
1 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body>
6 <script src="../../resources/js-test.js"></script>
7 <script>
8 description("This tests that cookie access throws exceptions with reasonable messages inside 'data:' URLs.");
10 window.jsTestIsAsync = true;
12 var exceptionMessage;
13 window.addEventListener('message', function (e) {
14 exceptionMessage = e.data;
15 shouldBeEqualToString('exceptionMessage', "Failed to read the 'cookie' property from 'Document': Cookies are disabled inside 'data:' URLs.");
16 finishJSTest();
17 });
19 </script>
20 <iframe src="data:text/html,<script>try { document.cookie; } catch(e) { window.top.postMessage(e.message, '*'); };</script>"></iframe>
21 </body>
22 </html>