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