summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui_test_utils.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-16 18:35:52 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-16 18:35:52 +0000
commit47c5103a4c932bd88ed0a623d30cd6ff5cab0b44 (patch)
treeb1cc5329401dfb157f977dc68a7b0844836cabef /chrome/test/ui_test_utils.h
parente6dd571eecc5b3bbcf1151a805ff2fadcf02f979 (diff)
downloadchromium_src-47c5103a4c932bd88ed0a623d30cd6ff5cab0b44.zip
chromium_src-47c5103a4c932bd88ed0a623d30cd6ff5cab0b44.tar.gz
chromium_src-47c5103a4c932bd88ed0a623d30cd6ff5cab0b44.tar.bz2
Makes the language detection happen with every page load
as we do with the page indexing. (The language detection was previously done on demand when the extension related API was querying it.) Once detected the language is stored on the navigation entry. It'll be used for the upcoming translation feature. Also I moved the existing language detection from the UI to the file thread. The change required few changes for the chrome.tabs.detectLanguage extension API to still work. BUG=None TEST=Run the browser tests and unit-tests. Review URL: http://codereview.chromium.org/492024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.h')
-rw-r--r--chrome/test/ui_test_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/test/ui_test_utils.h b/chrome/test/ui_test_utils.h
index 89dc8fc..2c4cd95 100644
--- a/chrome/test/ui_test_utils.h
+++ b/chrome/test/ui_test_utils.h
@@ -115,6 +115,10 @@ void WaitForFocusChange(RenderViewHost* rvh);
// traversal).
void WaitForFocusInBrowser(Browser* browser);
+// Waits for the language of the page to have been detected and returns it.
+// This should be called right after a navigation notification was received.
+std::string WaitForLanguageDetection(TabContents* tab_contents);
+
// Performs a find in the page of the specified tab. Returns the number of
// matches found. |ordinal| is an optional parameter which is set to the index
// of the current match.