From 202e7a773359b24943d7de0943dd9c7d257ab1cb Mon Sep 17 00:00:00 2001 From: "hbono@chromium.org" Date: Mon, 15 Jun 2009 03:48:36 +0000 Subject: Fixed 3 tests that failed in hebrew enabled vista BrowserTest.NoTitle BrowserTest.Title AutomationProxyVisibleTest.WindowGetViewBounds Some notes : There has been a small regression in the UI tests which makes them get stuck even more on my very slow machine (maybe race conditions) however, the fixes i post here do not make this state any worse and fix these 3 tests above which always failed TEST=1. run ui_tests on a RTL windows (or use --extra-chrome-flags=--lang=he) 2. the 3 tests listed above will always fail, as they expect LTR behavior 3. this fixes it BUG=12636 http://code.google.com/p/chromium/issues/detail?id=12636 Original Patch by Yoav Zilberberg Original review: http://codereview.chromium.org/118441 R=me,jeremy,sky Review URL: http://codereview.chromium.org/125036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18370 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/automation/automation_provider.cc | 7 +++++++ chrome/browser/automation/automation_provider.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'chrome/browser/automation') diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 3dce551..859beaf 100755 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -4,6 +4,7 @@ #include "chrome/browser/automation/automation_provider.h" +#include "app/l10n_util.h" #include "app/message_box_flags.h" #include "base/file_version_info.h" #include "base/message_loop.h" @@ -956,6 +957,7 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(AutomationMsg_NormalBrowserWindowCount, GetNormalBrowserWindowCount) IPC_MESSAGE_HANDLER(AutomationMsg_BrowserWindow, GetBrowserWindow) + IPC_MESSAGE_HANDLER(AutomationMsg_GetBrowserLocale, GetBrowserLocale) IPC_MESSAGE_HANDLER(AutomationMsg_LastActiveBrowserWindow, GetLastActiveBrowserWindow) IPC_MESSAGE_HANDLER(AutomationMsg_ActiveWindow, GetActiveWindow) @@ -1338,6 +1340,11 @@ void AutomationProvider::GetActiveTabIndex(int handle, int* active_tab_index) { } } +void AutomationProvider::GetBrowserLocale(string16* locale) { + DCHECK(g_browser_process); + *locale = WideToUTF16(g_browser_process->GetApplicationLocale()); +} + void AutomationProvider::GetBrowserWindowCount(int* window_count) { *window_count = static_cast(BrowserList::size()); } diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 59935f5..389543a 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -16,6 +16,7 @@ #include #include "base/basictypes.h" +#include "base/scoped_ptr.h" #include "chrome/browser/automation/automation_autocomplete_edit_tracker.h" #include "chrome/browser/automation/automation_browser_tracker.h" #include "chrome/browser/automation/automation_tab_tracker.h" @@ -149,6 +150,7 @@ class AutomationProvider : public base::RefCounted, int handle, int* response_value); void GetBrowserWindowCount(int* window_count); + void GetBrowserLocale(string16* locale); void GetNormalBrowserWindowCount(int* window_count); void GetShowingAppModalDialog(bool* showing_dialog, int* dialog_button); void ClickAppModalDialogButton(int button, bool* success); -- cgit v1.1