Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2242)

Unified Diff: chrome/test/data/chromeos/virtual_keyboard/inputs.html

Issue 2771793002: End to end test: async focus shouldn't trigger virtual keyboard. (Closed)
Patch Set: . Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/chromeos/virtual_keyboard/inputs.html
diff --git a/chrome/test/data/chromeos/virtual_keyboard/inputs.html b/chrome/test/data/chromeos/virtual_keyboard/inputs.html
index e3eff1aa7043f2216cb361b16bfb0b6788658c8e..e2d97c4af9675009799e6314f8ef228e02d5d376 100644
--- a/chrome/test/data/chromeos/virtual_keyboard/inputs.html
+++ b/chrome/test/data/chromeos/virtual_keyboard/inputs.html
@@ -4,11 +4,27 @@
<meta charset="utf-8">
<meta name="viewport" content="width-device-width">
<title>Virtual Keyboard test page</title>
+ <script>
+function syncFocus() {
+ var input = document.getElementById('text');
+ input.blur();
+ input.focus();
+}
+function asyncFocus() {
+ var input = document.getElementById('text');
+ // Keyboard hiding is dalayed by 100 ms, so here we
+ // wait 200 ms to make sure virtual keyboard is hidden.
oshima 2017/03/27 16:57:54 it's not clear why we need this. Shouldn't keyboar
oka 2017/03/28 11:13:26 Unfortunately no. The task to hide keyboard is del
oshima 2017/03/28 12:00:25 Whey it reopens it? Shouldn't it stay hidden becau
oka 2017/03/28 12:50:03 Sorry to make confusion, but in the previous comme
+ setTimeout(function(){input.focus();}, 200);
+}
+ </script>
</head>
<body>
<p>
<label id="blur">blur</label>
<input id="text" type="text" placeholder="type=text"></input>
+ <!-- test for crbug.com/642513 -->
+ <button id="sync" onclick="syncFocus()">sync</button>
+ <button id="async" onclick="asyncFocus()">async</button>
</p>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698