webkitpy: Implement device type specific expected results (Part 2)
[WebKit-https.git] / LayoutTests / platform / ipad / fast / forms / select-with-title.html
1 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
2 <html>
3 <head>
4 <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
5 <style>
6     body, html {
7         width: 100%;
8         height: 100%;
9         margin: 0;
10     }
11     select {
12         width: 200px;
13         height: 200px;
14     }
15 </style>
16 <script src="../../../../resources/js-test.js"></script>
17 <script src="../../../../resources/ui-helper.js"></script>
18 <script src="../../../../resources/basic-gestures.js"></script>
19 <script>
20     async function run()
21     {
22         if (!window.testRunner)
23             return;
24
25         await tapAtPoint(100, 100);
26         popoverTitle = await UIHelper.selectFormPopoverTitle();
27         await UIHelper.selectFormAccessoryPickerRow(1);
28         checkDone();
29     }
30
31     function checkDone()
32     {
33         doneCount = 1 + (window.doneCount ? doneCount : 0);
34         if (doneCount == 2 && window.testRunner) {
35             shouldBe("popoverTitle", "document.getElementById('select').title");
36             testRunner.notifyDone();
37         }
38     }
39 </script>
40 </head>
41 <body onload="run()">
42     <select title="This is a title" id="select">
43         <option>1</option>
44         <option>2</option>
45         <option>3</option>
46     </select>
47     <pre id="output"></pre>
48 </body>
49 <script>
50     select.addEventListener("blur", checkDone);
51     select.addEventListener("change", () => select.blur());
52
53     if (window.testRunner) {
54         testRunner.waitUntilDone();
55         testRunner.dumpAsText();
56     }
57 </script>
58 </html>