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

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: Trying again after rebase master. 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
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/instant_extended.html
diff --git a/chrome/test/data/instant_extended.html b/chrome/test/data/instant_extended.html
index 1ca7e76494e00cb18091ca95520ec9f18038f2f0..151485f4636dea2bbdc461082fb3449bfdb0be14 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;
var onvisibilitycalls = 0;
function getApiHandle() {
@@ -105,6 +107,11 @@ document.addEventListener("webkitvisibilitychange", function() {
onvisibilitycalls++;
}, false);
+function handleFocusChange() {
+ onFocusChangedCalls++;
+ isFocused = apiHandle.isFocused;
+}
+
function setUp() {
apiHandle = getApiHandle();
if (!apiHandle)
@@ -115,6 +122,7 @@ function setUp() {
apiHandle.onsubmit = handleSubmit;
apiHandle.onchange = handleOnChange;
apiHandle.onkeypress = handleKeyPress;
+ apiHandle.onfocuschange = handleFocusChange;
newTabPageHandle.onmostvisitedchange = handleMostVisitedChange;
if (apiHandle.value) {
handleNativeSuggestions();
@@ -123,6 +131,7 @@ function setUp() {
if (newTabPageHandle.mostVisited && newTabPageHandle.mostVisited.length) {
handleMostVisitedChange();
}
+ handleFocusChange();
}
setUp();
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698