mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
70 lines
2.3 KiB
HTML
70 lines
2.3 KiB
HTML
<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"
|
|
src="../common.js"></script>
|
|
<script type="application/javascript"
|
|
src="../states.js"></script>
|
|
|
|
<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);
|
|
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE);
|
|
|
|
frameDoc.designMode = "on";
|
|
testStates(frameDoc, 0, EXT_STATE_EDITABLE);
|
|
testStates(frameDocArticle, STATE_READONLY);
|
|
testStates(frameDocCheckbox, 0, 0, STATE_READONLY);
|
|
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE);
|
|
|
|
frameDocArticle.designMode = "on";
|
|
testStates(frameDocArticle, 0, EXT_STATE_EDITABLE);
|
|
|
|
frameDocCheckbox.designMode = "on";
|
|
testStates(frameDocCheckbox, 0, 0, STATE_READONLY);
|
|
|
|
SimpleTest.finish();
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
addA11yLoadEvent(doTest);
|
|
</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>
|
|
|
|
<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>
|
|
</body>
|
|
</html>
|