| Index: chrome/test/data/extensions/platform_apps/web_view/focus/inject_focus.js
|
| diff --git a/chrome/test/data/extensions/platform_apps/web_view/focus/inject_focus.js b/chrome/test/data/extensions/platform_apps/web_view/focus/inject_focus.js
|
| index c8c3c81045b7ce7aca4200ea35431b4925898b60..f2b6036d5e4b240c5d73b371f7c01fe325d07048 100644
|
| --- a/chrome/test/data/extensions/platform_apps/web_view/focus/inject_focus.js
|
| +++ b/chrome/test/data/extensions/platform_apps/web_view/focus/inject_focus.js
|
| @@ -47,6 +47,19 @@ var waitForFocus = function() {
|
| inputElement.focus();
|
| };
|
|
|
| +var createInput = function() {
|
| + inputElement = document.createElement('input');
|
| + inputElement.addEventListener('click', function(e) {
|
| + sendMessage(['response-inputClicked']);
|
| + LOG('clicked: ' + JSON.stringify(e));
|
| + });
|
| + document.body.appendChild(inputElement);
|
| +};
|
| +
|
| +var getInputValue = function() {
|
| + sendMessage(['response-inputValue', inputElement.value]);
|
| +}
|
| +
|
| window.addEventListener('message', function(e) {
|
| var data = JSON.parse(e.data);
|
| if (data[0] == 'connect') {
|
| @@ -59,6 +72,10 @@ window.addEventListener('message', function(e) {
|
| waitForFocus();
|
| } else if (data[0] == 'request-waitForBlurAfterFocus') {
|
| waitForBlurAfterFocus();
|
| + } else if (data[0] == 'request-createInput') {
|
| + createInput();
|
| + } else if (data[0] == 'request-getInputValue') {
|
| + getInputValue();
|
| }
|
| });
|
|
|
|
|