зеркало из https://github.com/mozilla/gecko-dev.git
reftests for bug 299065 and some of its dependencies and mochitests for bidi editing issues found when debugging bug 332655
This commit is contained in:
Родитель
c31f9f41b4
Коммит
3286a2050e
|
@ -80,6 +80,8 @@ _TEST_FILES = \
|
|||
ifeq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
_TEST_FILES += \
|
||||
bidi_numeral_test.js \
|
||||
test_bug332655-1.html \
|
||||
test_bug332655-2.html \
|
||||
test_bug441782-1.html \
|
||||
bug441782-1.html \
|
||||
bug441782-1-ref.html \
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=332655
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 332655</title>
|
||||
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="test()">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=332655">Mozilla Bug 332655</a>
|
||||
<p id="display"></p>
|
||||
<div id="content">
|
||||
<input type="text" id="testInput">
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
/** Test for Bug 332655 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function test() {
|
||||
var textInput = $("testInput");
|
||||
var s1, s2, s3, equal, str1, str2;
|
||||
|
||||
textInput.focus();
|
||||
synthesizeKey("a", { });
|
||||
synthesizeKey("b", { });
|
||||
synthesizeKey(" ", { });
|
||||
synthesizeKey("\u05d0", { });
|
||||
synthesizeKey("\u05d1", { });
|
||||
s1 = snapshotWindow(window);
|
||||
|
||||
synthesizeKey(" ", { });
|
||||
s2 = snapshotWindow(window);
|
||||
|
||||
[equal, str1, str2] = compareSnapshots(s1, s2, true);
|
||||
ok(equal, "space after LTR + RTL shouldn't change direction: expected " +
|
||||
str1 + " but got " + str2);
|
||||
|
||||
synthesizeKey("VK_BACK_SPACE", { });
|
||||
s3 = snapshotWindow(window);
|
||||
|
||||
[equal, str1, str2] = compareSnapshots(s1, s3, true);
|
||||
ok(equal, "backspace should restore the status quo: expected " + str1 +
|
||||
" but got " + str2);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=332655
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 332655</title>
|
||||
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="test()">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=332655">Mozilla Bug 332655</a>
|
||||
<p id="display"></p>
|
||||
<div id="content">
|
||||
<input type="text" id="testInput">
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
/** Test for Bug 332655 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function repeatKey(key, repetitions) {
|
||||
for (var i = 0; i < 4; ++i) {
|
||||
synthesizeKey(key, {});
|
||||
}
|
||||
}
|
||||
|
||||
function test() {
|
||||
var textInput = $("testInput");
|
||||
var s1, s2, s3, equal, str1, str2;
|
||||
|
||||
textInput.focus();
|
||||
synthesizeKey("\u05d0", { });
|
||||
synthesizeKey("a", { });
|
||||
synthesizeKey("b", { });
|
||||
synthesizeKey(" ", { });
|
||||
synthesizeKey("\u05d1", { });
|
||||
synthesizeKey("\u05d2", { });
|
||||
s1 = snapshotWindow(window);
|
||||
|
||||
// 4 LEFT to get to the beginning of the line: HOME doesn't work on OS X
|
||||
repeatKey("VK_LEFT", 4);
|
||||
synthesizeKey("VK_BACK_SPACE", { });
|
||||
synthesizeKey("\u05d0", { });
|
||||
s2 = snapshotWindow(window);
|
||||
|
||||
[equal, str1, str2] = compareSnapshots(s1, s2, true);
|
||||
ok(equal, "deleting and inserting RTL char at beginning of line shouldn't change: expected " +
|
||||
str1 + " but got " + str2);
|
||||
|
||||
textInput.select();
|
||||
synthesizeKey("a", { });
|
||||
synthesizeKey("b", { });
|
||||
synthesizeKey(" ", { });
|
||||
synthesizeKey("\u05d1", { });
|
||||
synthesizeKey("\u05d2", { });
|
||||
// 4 LEFT to get to the beginning of the line: HOME doesn't work on OS X
|
||||
repeatKey("VK_LEFT", 4);
|
||||
synthesizeKey("\u05d0", { });
|
||||
|
||||
s3 = snapshotWindow(window);
|
||||
|
||||
[equal, str1, str2] = compareSnapshots(s1, s3, true);
|
||||
ok(equal, "the order entering Bidi text shouldn't change rendering: expected " +
|
||||
str1 + " but got " + str2);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>RTL list displayed as inline broken</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<style type="text/css">
|
||||
ul {
|
||||
padding: 3px 10px;
|
||||
border-bottom: 3px solid #4949A9;
|
||||
white-space: nowrap;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
ul li {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 3px 10px;
|
||||
border-top: 1px solid gray;
|
||||
border-right: 1px solid gray;
|
||||
border-left: 1px solid gray;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Broken RTL list when displayed as inline</h1>
|
||||
<h2>One Item</h2>
|
||||
<ul class="tabs">
|
||||
<li>Tab</li>
|
||||
</ul>
|
||||
<h2>Two Items</h2>
|
||||
<ul class="tabs">
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
</ul>
|
||||
<h2>Many</h2>
|
||||
<ul class="tabs">
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>RTL list displayed as inline broken</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<style type="text/css">
|
||||
ul {
|
||||
padding: 3px 10px;
|
||||
border-bottom: 3px solid #4949A9;
|
||||
white-space: nowrap;
|
||||
font-size: 13px;
|
||||
direction: rtl;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul li {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 3px 10px;
|
||||
border-top: 1px solid gray;
|
||||
border-right: 1px solid gray;
|
||||
border-left: 1px solid gray;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Broken RTL list when displayed as inline</h1>
|
||||
<h2>One Item</h2>
|
||||
<ul class="tabs">
|
||||
<li>Tab</li>
|
||||
</ul>
|
||||
<h2>Two Items</h2>
|
||||
<ul class="tabs">
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
</ul>
|
||||
<h2>Many</h2>
|
||||
<ul class="tabs">
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
<li>Tab</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Testcase, bug 299065</title>
|
||||
<style type="text/css">
|
||||
p { border: thin solid; background: aqua; color: blue; }
|
||||
span { background: yellow; color: olive; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>AA<span>AA</span><span>אא</span>אא</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Testcase, bug 299065</title>
|
||||
<style type="text/css">
|
||||
p { border: thin solid; background: aqua; color: blue; }
|
||||
span { background: yellow; color: olive; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>AA<span>AAאא</span>אא</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="iso-8859-8-i">
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td dir="rtl" align="right">
|
||||
<span style="unicode-bidi: bidi-override; font-size: 12px;">(ùòä: 20:52) àééìåï öôåï: äúğåòä æåøîú îîçìó ÷éáåõ âìåéåú òã îçìó äøöìéä</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="iso-8859-8">
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td dir="rtl" align="right">
|
||||
<span style="font-size: 12px;">(ùòä: 20:52) àééìåï öôåï: äúðåòä æåøîú îîçìó ÷éáåõ âìåéåú òã îçìó äøöìéä</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -21,6 +21,9 @@ random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == mixedChartype-03-j.html mixedChartype-0
|
|||
== with-first-letter-1b.html with-first-letter-1-ref.html
|
||||
== with-first-letter-2a.html with-first-letter-2-ref.html
|
||||
== with-first-letter-2b.html with-first-letter-2-ref.html
|
||||
== 258928-1.html 258928-1-ref.html
|
||||
== 299065-1.html 299065-1-ref.html
|
||||
== 305643-1.html 305643-1-ref.html
|
||||
random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 386339.html 386339-ref.html
|
||||
== 409375.html 409375-ref.html
|
||||
== 413542-1.html 413542-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче