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

Unified Diff: chrome/test/data/instant_extended.html

Issue 14646034: Add onfocuschange to the Extended Search API, with associated isFocused attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent issues. Created 7 years, 7 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/instant_extended.html
diff --git a/chrome/test/data/instant_extended.html b/chrome/test/data/instant_extended.html
index feb45abd45f8f7e1d2fcbb7b1e00d13233f225a1..9fdffceacb55dd0c7a8994f4c48fefc1fca3259a 100644
--- a/chrome/test/data/instant_extended.html
+++ b/chrome/test/data/instant_extended.html
@@ -17,6 +17,8 @@ var onNativeSuggestionsCalls = 0;
var onChangeCalls = 0;
var submitCount = 0;
var onEscKeyPressedCalls = 0;
+var onFocusChangedCalls = 0;
+var isFocused = false;
function getApiHandle() {
if (window.navigator && window.navigator.searchBox)
@@ -100,6 +102,11 @@ function handleMostVisitedChange() {
}
}
+function handleFocusChange() {
samarth 2013/05/15 19:05:53 A test for this would be good. I assume you added
Donn Denman 2013/05/20 23:48:14 OK, coming soon!
+ onFocusChangedCalls++;
+ isFocused = apiHandle.isFocused;
+}
+
function setUp() {
apiHandle = getApiHandle();
if (!apiHandle)
@@ -110,6 +117,7 @@ function setUp() {
apiHandle.onsubmit = handleSubmit;
apiHandle.onchange = handleOnChange;
apiHandle.onkeypress = handleKeyPress;
+ apiHandle.onfocuschange = handleFocusChange;
newTabPageHandle.onmostvisitedchange = handleMostVisitedChange;
if (apiHandle.value) {
handleNativeSuggestions();
« chrome/renderer/searchbox/searchbox.cc ('K') | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698