Attachment #522788: Test for the regression for bug #263359

View | Details | Raw Unified | Return to bug 263359
Collapse All | Expand All

(-)a/layout/base/tests/Makefile.in (+1 lines)
Line     Link Here 
 Lines 320-335   _TEST_FILES += \ Link Here 
320
		test_bug570378-persian-5e.html \
320
		test_bug570378-persian-5e.html \
321
		test_bug570378-persian-5f.html \
321
		test_bug570378-persian-5f.html \
322
		test_bug570378-persian-5g.html \
322
		test_bug570378-persian-5g.html \
323
		bug570378-persian-5.html \
323
		bug570378-persian-5.html \
324
		bug570378-persian-5-ref.html \
324
		bug570378-persian-5-ref.html \
325
		test_bug588174.html \
325
		test_bug588174.html \
326
		test_bug607529.html \
326
		test_bug607529.html \
327
		file_bug607529.html \
327
		file_bug607529.html \
328
		test_bug644768.html \
328
		$(NULL)
329
		$(NULL)
329
endif
330
endif
330
331
331
_BROWSER_FILES = \
332
_BROWSER_FILES = \
332
	browser_bug617076.js \
333
	browser_bug617076.js \
333
	$(NULL)
334
	$(NULL)
334
335
335
libs:: $(_TEST_FILES)
336
libs:: $(_TEST_FILES)
(-)a/layout/base/tests/test_bug644768.html (+59 lines)
Line     Link Here 
Line 0    Link Here 
1
<!DOCTYPE HTML>
2
<html>
3
<!--
4
https://bugzilla.mozilla.org/show_bug.cgi?id=644768
5
-->
6
<head>
7
  <title>Test for Bug 644768</title>
8
  <script type="text/javascript" src="/MochiKit/packed.js"></script>
9
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10
  <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
11
  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
12
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
13
</head>
14
<body onload="test()">
15
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=644768">Mozilla Bug 644768</a>
16
<p id="display"></p>
17
<div id="content">
18
<!-- test text is 
19
== زادروزها ==
20
* [[۱۳۰۷]]
21
-->
22
 <textarea id="testInput" dir="rtl" cols="80" rows="25">
23
24
== &#x0632;&#x0627;&#x062F;&#x0631;&#x0648;&#x0632;&#x0647;&#x0627; ==
25
* [[&#x06F1;&#x06F3;&#x06F0;&#x06F7;]]</textarea>
26
</div>
27
<pre id="test">
28
<script class="testbody" type="text/javascript">
29
30
/** Test for Bug 644768 **/
31
32
SimpleTest.waitForExplicitFinish();
33
34
function test() {
35
  var textInput = $("testInput");
36
  var s1, s2, equal, str1, str2;
37
38
  textInput.focus();
39
  s1 = snapshotWindow(window);
40
41
  synthesizeKey("VK_UP", { });
42
  synthesizeKey("VK_UP", { });
43
  synthesizeKey("VK_UP", { });
44
  synthesizeKey("VK_DELETE", { });
45
  synthesizeKey("VK_ENTER", { });
46
  s2 = snapshotWindow(window);
47
48
  [equal, str1, str2] = compareSnapshots(s1, s2, true);
49
  ok(equal, "newline before bidi text shouldn't change direction: expected " +
50
     str1 + " but got " + str2);
51
52
  SimpleTest.finish();
53
}
54
55
</script>
56
</pre>
57
</body>
58
</html>
59

Return to bug 263359