[JSC] Int52Rep(DoubleRepAnyIntUse) should not call operation function
[WebKit-https.git] / LayoutTests / fast / forms / ios / inputmode-none.html
1 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
2 <html>
3 <head>
4 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
5 <script src="../../../resources/js-test.js"></script>
6 <script src="../../../resources/ui-helper.js"></script>
7 </head>
8 <body onload="runTest()">
9 <div><input id="input-keyboard" inputmode="text"></div>
10 <div><input id="input-nokeyboard" inputmode="none"></div>
11 <pre id="description"></pre>
12 <pre id="console"></pre>
13 <script>
14 jsTestIsAsync = true;
15
16 async function runTest() {
17     await UIHelper.setHardwareKeyboardAttached(false);
18     inputWithSystemKeyboard = document.getElementById("input-keyboard");
19     inputWithoutSystemKeyboard = document.getElementById("input-nokeyboard");
20
21     description("This test verifies that the system keyboard is not visible when tapping on an input field with inputmode=none.");
22
23     debug("\nACTIVATE input with inputmode=text");
24     await UIHelper.activateElementAndWaitForInputSession(inputWithSystemKeyboard);
25     systemKeyboardRect = await UIHelper.inputViewBounds();
26     shouldBe("systemKeyboardRect.height > 0", "true");
27     await UIHelper.enterText("Text");
28     shouldBe("inputWithSystemKeyboard.value", "'Text'");
29
30     debug("\nACTIVATE input with inputmode=none");
31     await UIHelper.activateElement(inputWithoutSystemKeyboard);
32     await UIHelper.waitForKeyboardToHide();
33     testPassed("Successfully dismissed keyboard");
34
35     debug("\nTEST enter text in input with inputmode=none");
36     await UIHelper.enterText("None");
37     shouldBe("inputWithoutSystemKeyboard.value", "'None'");
38
39     debug("\nTEST selection in input with inputmode=none");
40     inputWithoutSystemKeyboard.select();
41
42     selectionRects = [];
43     while (!selectionRects.length)
44         selectionRects = await UIHelper.getUISelectionViewRects();
45
46     shouldBe("selectionRects.length", "1");
47     shouldBe("selectionRects[0].left", "16");
48     shouldBe("selectionRects[0].top", "38");
49     shouldBe("selectionRects[0].width", "27");
50     shouldBe("selectionRects[0].height", "15");
51     finishJSTest();
52 }
53 </script>
54 </body>
55 </html>