Test fast/writing-mode/english-bt-text-with-spelling-marker.html should wait for...
[WebKit.git] / LayoutTests / fast / writing-mode / english-bt-text-with-spelling-marker.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../editing/editing.js"></script>
5 <style>
6 @font-face {
7     font-family: Ahem;
8     src: url("../../resources/Ahem.ttf");
9 }
10
11 body {
12     -webkit-writing-mode: horizontal-bt;
13     font: 20px/1 Ahem;
14 }
15
16 #test {
17     display: inline-block;
18     position: absolute;
19     top: 0;
20     left: 0;
21     width: 200px;
22 }
23 </style>
24 </head>
25 <body>
26 <div id="test" contenteditable="true"></div>
27 <script>
28 var test = document.getElementById("test");
29
30 // When inserting multiple words we need to type each character in order for the spell checker to be triggered.
31 typeText("a mispelled", test);
32
33 function typeText(text, element)
34 {
35     element.focus();
36     for (const c of text)
37         typeCharacterCommand(c);
38     element.blur();
39 }
40 </script>
41 </body>
42 </html>