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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/focus/inject_input_method.js

Issue 376033002: Adding MimeHandlerView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pending-zork-patch2
Patch Set: Address comment from kenrb@ Created 6 years, 3 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
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | content/content_renderer.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/platform_apps/web_view/focus/inject_input_method.js
diff --git a/chrome/test/data/extensions/platform_apps/web_view/focus/inject_input_method.js b/chrome/test/data/extensions/platform_apps/web_view/focus/inject_input_method.js
index 76c73905666aaa0a4c964c887e4285a13b39c6ab..9bfe484e5f620d417b9056ea8a1306ce91515fda 100644
--- a/chrome/test/data/extensions/platform_apps/web_view/focus/inject_input_method.js
+++ b/chrome/test/data/extensions/platform_apps/web_view/focus/inject_input_method.js
@@ -15,18 +15,6 @@ var sendMessage = function(data) {
embedder.postMessage(JSON.stringify(data), '*');
};
-var waitingForInput = false;
-
-var onInputFired = function() {
- sendMessage(['response-waitForOnInput', onInputState.value]);
- onInputState.fired = false;
- if (inputElement1.value == 'InputTest456') {
- // Prepare for next step, step 3.
- inputElement1.value = '';
- }
- waitingForInput = false;
-};
-
var onInputState = {fired: false, value: ''};
// Waits for oninput event to fire on |inputElement1|.
// Upon receiving the event, we ping back the embedder with the value of
@@ -35,9 +23,13 @@ var waitForOnInput = function() {
var inputElement1 = document.querySelector('input');
LOG('inputElement1: ' + inputElement1);
if (onInputState.fired) {
- onInputFired();
- } else {
- waitingForInput = true;
+ sendMessage(['response-waitForOnInput', onInputState.value]);
+
+ onInputState.fired = false;
+ if (inputElement1.value == 'InputTest456') {
+ // Prepare for next step, step 3.
+ inputElement1.value = '';
+ }
}
};
@@ -49,9 +41,6 @@ var waitForFocus = function() {
LOG('inputElement1.oninput: ' + inputElement1.value);
onInputState.fired = true;
onInputState.value = inputElement1.value;
- if (waitingForInput) {
- onInputFired();
- }
};
var inputElement1FocusListener = function() {
LOG('inputElement1.focus');
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698