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

Unified Diff: chrome/test/automation/automation_proxy_uitest.cc

Issue 118441: Fixed 3 tests that failed in hebrew enabled vista... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 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/test/automation/automation_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/automation_proxy_uitest.cc
===================================================================
--- chrome/test/automation/automation_proxy_uitest.cc (revision 18052)
+++ chrome/test/automation/automation_proxy_uitest.cc (working copy)
@@ -5,6 +5,7 @@
#include <string>
#include "app/app_switches.h"
+#include "app/l10n_util.h"
#include "app/message_box_flags.h"
#include "base/command_line.h"
#include "base/file_path.h"
@@ -94,7 +95,21 @@
ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_LAST, &bounds2, false));
EXPECT_GT(bounds2.width(), 0);
EXPECT_GT(bounds2.height(), 0);
- EXPECT_GT(bounds2.x(), bounds.x());
+
+ // The tab logic is mirrored in RTL locales, so what is to the right in
+ // LTR locales is now on the left with RTL ones.
+ string16 browser_locale;
+
+ EXPECT_TRUE(automation()->GetBrowserLocale(&browser_locale));
+
+ const std::string& locale_utf8 = UTF16ToUTF8(browser_locale);
+ if (l10n_util::GetTextDirectionForLocale(locale_utf8.c_str()) ==
+ l10n_util::RIGHT_TO_LEFT) {
+ EXPECT_LT(bounds2.x(), bounds.x());
+ } else {
+ EXPECT_GT(bounds2.x(), bounds.x());
+ }
+
EXPECT_EQ(bounds2.y(), bounds.y());
gfx::Rect urlbar_bounds;
« no previous file with comments | « chrome/test/automation/automation_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698