<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<div id="result"></div>
<script>
function runTest()
{
async_test(function(t) {
document.designMode = "on";
subDocument = document.getElementById("subframe").contentDocument;
assert_equals(subDocument.designMode, "off");
assert_equals(subDocument.getElementById("div").contentEditable, "inherit");
assert_false(subDocument.getElementById("div").isContentEditable);
document.getElementById("subframe").style.display= 'none';
t.done();
}, 'document.designMode should not inherit from parent documents.');
}
</script>
<iframe id="subframe" onload="runTest()" srcdoc="<div id='div'></div>"></iframe>
</body>
</html>