Difference between revisions of "User:Minooz/OSD600/FF/test565031"
< User:Minooz | OSD600 | FF
(Created page with 'test file: <source lang="javascript"> <!DOCTYPE HTML> <html> <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=565031 --> <head> <title>Test for Bug 565031</title> <script s…') |
|||
Line 19: | Line 19: | ||
<img src="firefoxMap.png" id="image" width="300" usemap="#mapTest" /> | <img src="firefoxMap.png" id="image" width="300" usemap="#mapTest" /> | ||
<map name="mapTest"> | <map name="mapTest"> | ||
− | <area shape="rect" coords="0,0,80,60" onclick=" | + | <area shape="rect" coords="0,0,80,60" onclick="mapTest('pass', 'comma should be allowed');"/> |
− | + | <area shape="rect" coords="0 70 80 130" onclick="mapTest('pass', 'space should be allowed');"/> | |
<area shape="rect" coords="0;140;80;200" onclick="mapTest('pass', 'semicolon should be allowed');"/> | <area shape="rect" coords="0;140;80;200" onclick="mapTest('pass', 'semicolon should be allowed');"/> | ||
<area shape="rect" coords="220\t0\t300\t60" onclick="mapTest('fail', 'tab should not be allowed');"/> | <area shape="rect" coords="220\t0\t300\t60" onclick="mapTest('fail', 'tab should not be allowed');"/> | ||
<area shape="rect" coords="220\n70\n300\n130" onclick="mapTest('fail', 'new line should not be allowed');"/> | <area shape="rect" coords="220\n70\n300\n130" onclick="mapTest('fail', 'new line should not be allowed');"/> | ||
− | <area shape="rect" coords="220\r140\r300\r200" onclick="mapTest('fail', 'carriage returns should not be allowed');"/> | + | <area shape="rect" coords="220\r140\r300\r200" onclick="mapTest('fail', 'carriage returns should not be allowed');"/> |
</map> | </map> | ||
<div id="content" style="display: none"> | <div id="content" style="display: none"> | ||
Line 40: | Line 40: | ||
var image = document.getElementById("image"); | var image = document.getElementById("image"); | ||
synthesizeMouse(image, 50, 30, {}); | synthesizeMouse(image, 50, 30, {}); | ||
− | + | synthesizeMouse(image, 50, 100, {}); | |
− | + | synthesizeMouse(image, 50, 160, {}); | |
− | + | synthesizeMouse(image, 250, 30, {}); | |
− | + | synthesizeMouse(image, 250, 100, {}); | |
− | + | synthesizeMouse(image, 250, 160, {}); | |
SimpleTest.finish(); | SimpleTest.finish(); |
Revision as of 21:45, 13 April 2011
test file:
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=565031
-->
<head>
<title>Test for Bug 565031</title>
<script src="/MochiKit/packed.js"></script>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=565031">Mozilla Bug 565031</a>
<p id="display">
<img src="firefoxMap.png" id="image" width="300" usemap="#mapTest" />
<map name="mapTest">
<area shape="rect" coords="0,0,80,60" onclick="mapTest('pass', 'comma should be allowed');"/>
<area shape="rect" coords="0 70 80 130" onclick="mapTest('pass', 'space should be allowed');"/>
<area shape="rect" coords="0;140;80;200" onclick="mapTest('pass', 'semicolon should be allowed');"/>
<area shape="rect" coords="220\t0\t300\t60" onclick="mapTest('fail', 'tab should not be allowed');"/>
<area shape="rect" coords="220\n70\n300\n130" onclick="mapTest('fail', 'new line should not be allowed');"/>
<area shape="rect" coords="220\r140\r300\r200" onclick="mapTest('fail', 'carriage returns should not be allowed');"/>
</map>
<div id="content" style="display: none">
</div>
<pre id="test">
<script>
/** Test for Bug 565031 **/
function mapTest(result, message) {
is(result, "pass", message);
}
function runTest() {
SimpleTest.waitForFocus(function() {
var image = document.getElementById("image");
synthesizeMouse(image, 50, 30, {});
synthesizeMouse(image, 50, 100, {});
synthesizeMouse(image, 50, 160, {});
synthesizeMouse(image, 250, 30, {});
synthesizeMouse(image, 250, 100, {});
synthesizeMouse(image, 250, 160, {});
SimpleTest.finish();
});
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(runTest());
</script>
</pre>
</body>
</html>
dseif test file:
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=565031
-->
<head>
<title>Test for Bug 565031</title>
<script src="/MochiKit/packed.js"></script>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=565031">Mozilla Bug 565031</a>
<p id="display">
<map name=a>
<area coords=0,0,5,5 onclick="is('#pass', '#pass', 'commas,no spaces');">
<area coords="5 5 10 10" onclick="is('#pass', '#pass', 'spaces only');">
<area coords=10;10;15;15 onclick="is('#pass', '#pass', 'semicolons, no spaces');">
<area coords=15 15 20 20 onclick="is('#fail', '#pass', 'tabs only');">
<area id="test5" coords="20\n20\n25\n25" onclick="is('#fail', '#pass', 'new line characters, no spaces');">
<area id="test6" coords="25\r25\r30\r30" onclick="is('#fail', '#pass', 'carriage returns, no spaces');">
<area id="test7" coords="30\v30\v35\v35" onclick="is('#fail', '#pass', 'vertical tabs, no spaces');">
</map>
<img src=file_Dolske.png usemap=#a id=image>
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script>
/** Test for Bug 290397 **/
SimpleTest.waitForExplicitFinish();
function tester() {
var image = document.getElementById("image");
synthesizeMouse(image, 3, 3, {});
synthesizeMouse(image, 7, 7, {});
synthesizeMouse(image, 13, 13, {});
synthesizeMouse(image, 17, 17, {});
synthesizeMouse(image, 23, 23, {});
synthesizeMouse(image, 27, 27, {});
synthesizeMouse(image, 33, 33, {});
SimpleTest.finish();
}
function runTest() {
//document.getElementById("test5").coords = "20\n20\n25\n25";
//document.getElementById("test6").coords = "25\r25\r30\r30";
//document.getElementById("test7").coords = "30\v30\v35\v35";
SimpleTest.waitForFocus(tester);
}
addLoadEvent(runTest);
</script>
</pre>
</body>
</html>
</html>