2009-12-07 Joanmarie Diggs <joanmarie.diggs@gmail.com>
[WebKit-https.git] / LayoutTests / platform / gtk / accessibility / title-and-alt.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
5 <script>
6 var successfullyParsed = false;
7 </script>
8 <script src="../../../fast/js/resources/js-test-pre.js"></script>
9 </head>
10 <body id="body">
11 <img src="image.jpg" alt="Image alt attr" title="Image title attr">
12 <form>
13 <a href="" title="Link title attr">Functional label</a>:<input title="Entry title attr" type="text" /><input value="Clear" type="reset" /><input value="Submit" title="Submit button title attr" type="submit" />
14 </form>
15 <p id="description"></p>
16 <div id="console"></div>
17 <script>
18     description("This tests the exposure of alt and title information.");
19     if (window.accessibilityController) {
20         layoutTestController.dumpAsText();
21         document.getElementById("body").focus();
22         var webArea = accessibilityController.focusedElement;
23
24         var image = webArea.childAtIndex(0);
25         shouldBe("image.title", "'Image alt attr'");
26         shouldBe("image.description", "'Image title attr'");
27
28         var link = webArea.childAtIndex(1);
29         shouldBe("link.title", "''");
30         shouldBe("link.description", "'Link title attr'");
31
32         var entry = webArea.childAtIndex(2);
33         shouldBe("entry.title", "''");
34         shouldBe("entry.description", "'Entry title attr'");
35
36         var button = webArea.childAtIndex(4);
37         shouldBe("button.title", "'Submit'");
38         shouldBe("button.description", "'Submit button title attr'");
39         }
40     successfullyParsed = true;
41 </script>
42 <script src="../../../fast/js/resources/js-test-post.js"></script>
43 </body>
44 </html>