chromium/third_party/blink/web_tests/http/tests/security/cookies/create-document.html

<html>
<head>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

// We don't expect this cookie to be visible, but we set this value for
// consistency with other tests in this directory.
document.cookie = "secret=PASS";

function log(msg) {
    var line = document.createElement("div");
    line.appendChild(document.createTextNode(msg));
    document.getElementById("console").appendChild(line);
}

function runTest() {
    log("Running test.");

    if (document.implementation.createDocument) {
        var xmlDoc = document.implementation.createDocument(null, null, null);
        log("xmlDoc.cookie: " + xmlDoc.cookie);
    } else {
        log("document.implementation.createDocument unavailable.");
    }

    if (document.implementation.createHTMLDocument) {
        var htmlDoc = document.implementation.createHTMLDocument('A Title');
        log("htmlDoc.cookie: " + htmlDoc.cookie);
    } else {
        log("document.implementation.createDocument unavailable.");
    }

    log("Test complete.");

    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
</head>
<body onload="runTest()">
<div id="console"></div>
</body>
</html>