AX: [ATK] Convert the get_text atktest.c unit tests to layout tests
[WebKit-https.git] / LayoutTests / platform / gtk / accessibility / text-for-range-formatted.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7 <p id="content">This is a test.</p>Hello world.<br /><font color='#00cc00'>This sentence is green.</font><br />This one is not.
8 <p id="description"></p>
9 <div id="console"></div>
10 <script>
11     description("This tests the ability to get element text for a specified range.");
12     if (window.accessibilityController) {
13         document.getElementById("body").focus();
14         var webArea = accessibilityController.focusedElement;
15         var paragraph = webArea.childAtIndex(0);
16         var block = webArea.childAtIndex(1);
17         shouldBe("paragraph.stringForRange(0, -1)", "'This is a test.'");
18         shouldBe("block.stringForRange(0, 53)", "'Hello world.\\nThis sentence is green.\\nThis one is not.'");
19     }
20 </script>
21 <script src="../../../resources/js-test-post.js"></script>
22 </body>
23 </html>