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

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

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.");
    frames[0].document.open();
    log("frames[0].document.URL = " + frames[0].document.URL);
    log("frames[0].document.baseURI = " + frames[0].document.baseURI);
    log("frames[0].document.cookie = " + frames[0].document.cookie);
    frames[0].document.close();
    log("Test complete.");

    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
</head>
<body>
<iframe
  onload="runTest()"
  src="resources/set-a-cookie.html">
</iframe>
<div id="console"></div>
</body>
</html>