Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / nodesFromRect / nodesFromRect-culled-inlines.html
bloba6c849dc7fde41796838db83a9bc310ab0749e83
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Document::nodesFromRect : culled inlines - bug 88376</title>
5 <script src="../../../resources/ahem.js"></script>
6 <script src="../../../resources/js-test.js"></script>
7 <script src="resources/nodesFromRect.js"></script>
8 <style>
9 #sandbox {
10 position: absolute;
11 left: 0px;
12 top: 0px;
13 width: 400px;
14 height: 200px;
16 #sandbox p { font: 16px Ahem; }
17 </style>
18 </head>
19 <body id="body">
20 <div id=sandbox>
21 <p><span id=culledinline><span id=wordinline1>word1</span> <span id=wordinline2>word2</span></span> <span id=wordinline3>word3</span></p>
22 </div>
24 <p id="description"></p>
25 <span id="console"></span>
26 <script type="application/javascript">
27 function runTest()
29 description(document.title);
30 window.scrollTo(0, 0);
31 /* Rect based test over word1 only. */
32 checkRect(30, 19, 8, 8, "'word1'");
33 /* Rect based test over the word2 only. */
34 checkRect(126, 19, 8, 8, "'word2'");
35 /* Rect based test over the word3 only. */
36 checkRect(222, 19, 8, 8, "'word3'");
37 /* Rect based test between word1 and word2. */
38 checkRect(84, 19, 8, 8, "' '");
39 /* Rect based test over and outside word1. */
40 checkRect(70, 19, 20, 8, "' ', 'word1', SPAN#wordinline1, SPAN#culledinline");
41 /* Rect based test over word1 and word2. */
42 checkRect(70, 19, 40, 8, "'word2', SPAN#wordinline2, ' ', 'word1', SPAN#wordinline1, SPAN#culledinline");
43 /* Rect based test over word2 and word3. */
44 checkRect(170, 19, 40, 8, "'word3', SPAN#wordinline3, ' ', 'word2', SPAN#wordinline2, SPAN#culledinline, P");
46 document.getElementById('sandbox').style.display = 'none';
48 runTest();
49 </script>
50 </body>
51 </html>