1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docshell/test/navigation/test_bug430624.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=430624 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 430624</title> 1.11 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.13 + <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> 1.14 +</head> 1.15 +<body> 1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=430624">Mozilla Bug 430624</a> 1.17 +<p id="display"></p> 1.18 + 1.19 + 1.20 + 1.21 +<div id="content" style="display: none"> 1.22 + 1.23 +</div> 1.24 +<pre id="test"> 1.25 +<script class="testbody" type="text/javascript"> 1.26 + 1.27 +/** Test for Bug 430624 **/ 1.28 + 1.29 +function onLoad() { 1.30 + window.frames[0].frameElement.onload = onReload; 1.31 + window.frames[0].location = window.frames[0].location; 1.32 +} 1.33 + 1.34 +function onReload() { 1.35 + var iframe = window.frames[0].frameElement; 1.36 + SimpleTest.waitForFocus(doTest, iframe.contentWindow); 1.37 + iframe.contentDocument.body.focus(); 1.38 +} 1.39 + 1.40 +function doTest() { 1.41 + var bodyElement = window.frames[0].frameElement.contentDocument.body; 1.42 + bodyElement.focus(); 1.43 + sendString('Still ', window.frames[0].frameElement.contentWindow); 1.44 + 1.45 + is(bodyElement.innerHTML, "Still contentEditable", "Check we're contentEditable after reload"); 1.46 + 1.47 + SimpleTest.finish(); 1.48 +} 1.49 + 1.50 +SimpleTest.waitForExplicitFinish(); 1.51 + 1.52 +</script> 1.53 +</pre> 1.54 + 1.55 +<iframe onload="onLoad()" src="data:text/html;charset=utf-8,<body contenteditable>contentEditable</body>"></iframe> 1.56 + 1.57 +</body> 1.58 +</html> 1.59 +