<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.");
    var xhr = new XMLHttpRequest();
    xhr.open("GET", "resources/simple.xml", false);
    xhr.overrideMimeType("text/xml");
    log("Sending XMLHttpRequest...");
    xhr.send(null);
    log("Response received.");
    log("xhr.responseXML.cookie: " + xhr.responseXML.cookie);
    if (xhr.responseXML.cookie.length)
        log("Behavior change detected: XMLHttpRequest.responseXML cookies are now visible. Please ensure that cookies are not exposed for cross-origin requests, and add a new test for that.");
    log("Test complete.");

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