Update ANGLE
[WebKit-https.git] / LayoutTests / platform / ipad / fast / forms / multiple-select-updates-renderer.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/basic-gestures.js"></script>
17 <script src="../../../../resources/ui-helper.js"></script>
18 <script>
19     async function run()
20     {
21         if (!window.testRunner)
22             return;
23
24         await tapAtPoint(100, 100);
25         await UIHelper.selectFormAccessoryPickerRow(0);
26         doneEvaluatingUIScript = true;
27         checkDone();
28     }
29
30     function checkDone()
31     {
32         if (window.doneEvaluatingUIScript && window.valueChanged && window.testRunner)
33             testRunner.notifyDone();
34     }
35 </script>
36 </head>
37 <body onload="run()">
38     <select multiple id="select"><option>This is an option.</option></select>
39     <pre id="output"></pre>
40 </body>
41 <script>
42     select.addEventListener("change", () => {
43         if (window.internals) {
44             const renderTreeAsText = internals.elementRenderTreeAsText(document.documentElement);
45             const expectedOptionValue = "This is an option.";
46             if (renderTreeAsText.indexOf(expectedOptionValue) != -1)
47                 output.textContent = "PASS";
48             else
49                 output.textContent = `FAIL: expected '${expectedOptionValue}' in render tree dump:\n${renderTreeAsText}`;
50         }
51
52         select.blur();
53         valueChanged = true;
54         checkDone();
55     });
56
57     if (window.testRunner) {
58         testRunner.waitUntilDone();
59         testRunner.dumpAsText();
60     }
61 </script>
62 </html>