2009-02-17 08:16:38 -08:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<title>frame based document testing</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css"
|
|
|
|
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
|
|
|
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
|
|
|
|
<script type="application/javascript"
|
2010-09-01 15:09:56 -07:00
|
|
|
src="../common.js"></script>
|
2009-02-17 08:16:38 -08:00
|
|
|
<script type="application/javascript"
|
2010-09-01 15:09:56 -07:00
|
|
|
src="../states.js"></script>
|
2009-02-17 08:16:38 -08:00
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
function doTest()
|
|
|
|
{
|
|
|
|
frameDoc = document.getElementById("frame_doc").contentDocument;
|
|
|
|
frameDocArticle = document.getElementById("frame_doc_article").contentDocument;
|
|
|
|
frameDocCheckbox = document.getElementById("frame_doc_checkbox").contentDocument;
|
|
|
|
frameDocTextbox = document.getElementById("frame_doc_textbox").contentDocument;
|
|
|
|
|
|
|
|
testStates(frameDoc, STATE_READONLY);
|
|
|
|
testStates(frameDocArticle, STATE_READONLY);
|
|
|
|
testStates(frameDocCheckbox, 0, 0, STATE_READONLY);
|
2009-02-26 00:17:43 -08:00
|
|
|
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE);
|
|
|
|
|
2009-02-17 08:16:38 -08:00
|
|
|
frameDoc.designMode = "on";
|
|
|
|
testStates(frameDoc, 0, EXT_STATE_EDITABLE);
|
|
|
|
testStates(frameDocArticle, STATE_READONLY);
|
|
|
|
testStates(frameDocCheckbox, 0, 0, STATE_READONLY);
|
2009-02-26 00:17:43 -08:00
|
|
|
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE);
|
2009-02-17 08:16:38 -08:00
|
|
|
|
|
|
|
frameDocArticle.designMode = "on";
|
|
|
|
testStates(frameDocArticle, 0, EXT_STATE_EDITABLE);
|
|
|
|
|
|
|
|
frameDocCheckbox.designMode = "on";
|
|
|
|
testStates(frameDocCheckbox, 0, 0, STATE_READONLY);
|
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2009-09-23 07:21:47 -07:00
|
|
|
addA11yLoadEvent(doTest);
|
2009-02-17 08:16:38 -08:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=467387"
|
|
|
|
title="Expose non-editable documents as readonly, regardless of role">
|
|
|
|
Mozilla Bug 467387
|
|
|
|
</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
|
2010-02-03 07:00:25 -08:00
|
|
|
<iframe id="frame_doc" src="z_frames.html"></iframe>
|
|
|
|
<iframe id="frame_doc_article" src="z_frames_article.html"></iframe>
|
|
|
|
<iframe id="frame_doc_checkbox" src="z_frames_checkbox.html"></iframe>
|
|
|
|
<iframe id="frame_doc_textbox" src="z_frames_textbox.html"></iframe>
|
2009-02-17 08:16:38 -08:00
|
|
|
</body>
|
|
|
|
</html>
|