<html>
<body>
Tests that node wrappers are created in the context to which they belong.
You should see PASS below.
<br>
<div id="output"></div>
<iframe id="inner" src="resources/wrapper-context-inner.html"></iframe>
<script>
if (window.layoutTestController) {
    layoutTestController.dumpAsText();
    layoutTestController.waitUntilDone();
}

function writeOutput(s) {
    var paragraph = document.createElement("p");
    paragraph.innerHTML = s;
    document.getElementById("output").appendChild(paragraph);
}

// Used to create the document wrapper.
var innerDocument;

// Once the inner frame has loaded, run the test.
function innerHasLoaded() {
    writeOutput("Running...");
    innerDocument = inner.document;
    inner.runTest();
}
</script>
</body>
</html>
