Tizen 2.1 base
[framework/web/webkit-efl.git] / LayoutTests / editing / pasteboard / copy-paste-bidi.html
1 <html>
2 <head>
3 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
4 <script type="text/javascript" src="../../resources/dump-as-markup.js"></script>
5 </head>
6 <body>
7 <div style="direction: rtl;" contenteditable="true" id="test1">1234שדגכ:</div>
8
9 <div contenteditable="true" id="test2">
10 <div>1234שדגכ:</div>
11 <div style="direction: rtl;">1234שדגכ:</div>
12 </div>
13
14 <script>
15
16 Markup.description('These tests to see if bidi text with a base writing direction of right to left is put onto the paste board in logical (DOM) order.');
17
18 var e = document.getElementById("test1");
19 var s = window.getSelection();
20
21 Markup.dump('test1', 'first test - before');
22 s.setPosition(e, 0);
23 document.execCommand("SelectAll");
24 document.execCommand("Cut");
25 document.execCommand("Paste");
26 Markup.dump('test1', 'first test - after');
27
28 Markup.dump('test2', 'second test - before');
29 e = document.getElementById("test2");
30 s.setPosition(e, 0);
31 document.execCommand("SelectAll");
32 document.execCommand("Cut");
33 document.execCommand("Paste");
34 Markup.dump('test2', 'second test - after');
35
36 </script>
37 </body>
38 </html>