OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 | 5 |
6 function focusInputField() { | 6 function focusInputField() { |
7 var inputField = document.getElementById("text-field"); | 7 var inputField = document.getElementById("text-field"); |
8 inputField.focus(); | 8 inputField.focus(); |
9 } | 9 } |
10 | 10 |
11 function getInputFieldText() { | |
12 var inputField = document.getElementById("text-field"); | |
13 return inputField.value; | |
14 } | |
15 | |
16 function onInputFocus() { | 11 function onInputFocus() { |
17 domAutomationController.setAutomationId(0); | 12 domAutomationController.setAutomationId(0); |
18 domAutomationController.send("input-focus"); | 13 domAutomationController.send("input-focus"); |
19 } | 14 } |
20 | 15 |
21 function onInputBlur() { | 16 function onInputBlur() { |
22 domAutomationController.setAutomationId(0); | 17 domAutomationController.setAutomationId(0); |
23 domAutomationController.send("input-blur"); | 18 domAutomationController.send("input-blur"); |
24 } | 19 } |
25 | 20 |
26 </script> | 21 </script> |
27 </head> | 22 </head> |
28 | 23 |
29 <body> | 24 <body> |
30 This page has a cross-site iframe and a text input field. | 25 This page has a cross-site iframe and a text input field. |
31 <input type='text' id='text-field' | 26 <input type='text' id='text-field' |
32 onfocus="onInputFocus()" onblur="onInputBlur()"><br> | 27 onfocus="onInputFocus()" onblur="onInputBlur()"><br> |
33 <iframe id='subframe' src="/cross-site/b.com/page_with_blur.html"></iframe> | 28 <iframe id='subframe' src="/cross-site/b.com/page_with_blur.html"></iframe> |
34 </body> | 29 </body> |
35 </html> | 30 </html> |
36 | 31 |
OLD | NEW |