chromium/third_party/blink/web_tests/fast/cookies/cookies-disabled-in-data-url.html

<!DOCTYPE html>
<html>
<head>
</head>
<body>
    <script src="../../resources/js-test.js"></script>
    <script>
        description("This tests that cookie access throws exceptions with reasonable messages inside 'data:' URLs.");

        window.jsTestIsAsync = true;

        var exceptionMessage;
        window.addEventListener('message', function (e) {
            exceptionMessage = e.data;
            shouldBeEqualToString('exceptionMessage', "Failed to read the 'cookie' property from 'Document': Cookies are disabled inside 'data:' URLs.");
            finishJSTest();
        });

    </script>
    <iframe src="data:text/html,<script>try { document.cookie; } catch(e) { window.top.postMessage(e.message, '*'); };</script>"></iframe>
</body>
</html>