6 <script src=
"../../resources/js-test.js"></script>
8 description("This tests that cookie access throws exceptions with reasonable messages inside 'data:' URLs.");
10 window
.jsTestIsAsync
= true;
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.");
20 <iframe src=
"data:text/html,<script>try { document.cookie; } catch(e) { window.top.postMessage(e.message, '*'); };</script>"></iframe
>