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

Side by Side Diff: chrome/browser/browser_browsertest.cc

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/bookmarks/bookmark_table_model.cc ('k') | chrome/browser/browser_main_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/rtl.h"
8 #include "base/sys_info.h" 9 #include "base/sys_info.h"
9 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
10 #include "chrome/browser/app_modal_dialog.h" 11 #include "chrome/browser/app_modal_dialog.h"
11 #include "chrome/browser/browser.h" 12 #include "chrome/browser/browser.h"
12 #include "chrome/browser/browser_init.h" 13 #include "chrome/browser/browser_init.h"
13 #include "chrome/browser/browser_list.h" 14 #include "chrome/browser/browser_list.h"
14 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/defaults.h" 16 #include "chrome/browser/defaults.h"
16 #include "chrome/browser/extensions/extension_browsertest.h" 17 #include "chrome/browser/extensions/extension_browsertest.h"
17 #include "chrome/browser/extensions/extensions_service.h" 18 #include "chrome/browser/extensions/extensions_service.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 command_line->AppendSwitch(switches::kEnableExtensionApps); 129 command_line->AppendSwitch(switches::kEnableExtensionApps);
129 } 130 }
130 131
131 // In RTL locales wrap the page title with RTL embedding characters so that it 132 // In RTL locales wrap the page title with RTL embedding characters so that it
132 // matches the value returned by GetWindowTitle(). 133 // matches the value returned by GetWindowTitle().
133 std::wstring LocaleWindowCaptionFromPageTitle( 134 std::wstring LocaleWindowCaptionFromPageTitle(
134 const std::wstring& expected_title) { 135 const std::wstring& expected_title) {
135 std::wstring page_title = WindowCaptionFromPageTitle(expected_title); 136 std::wstring page_title = WindowCaptionFromPageTitle(expected_title);
136 #if defined(OS_WIN) 137 #if defined(OS_WIN)
137 std::string locale = g_browser_process->GetApplicationLocale(); 138 std::string locale = g_browser_process->GetApplicationLocale();
138 if (l10n_util::GetTextDirectionForLocale(locale.c_str()) == 139 if (base::i18n::GetTextDirectionForLocale(locale.c_str()) ==
139 l10n_util::RIGHT_TO_LEFT) { 140 base::i18n::RIGHT_TO_LEFT) {
140 l10n_util::WrapStringWithLTRFormatting(&page_title); 141 base::i18n::WrapStringWithLTRFormatting(&page_title);
141 } 142 }
142 143
143 return page_title; 144 return page_title;
144 #else 145 #else
145 // Do we need to use the above code on POSIX as well? 146 // Do we need to use the above code on POSIX as well?
146 return page_title; 147 return page_title;
147 #endif 148 #endif
148 } 149 }
149 150
150 // Returns the app extension installed by PhantomTabTest. 151 // Returns the app extension installed by PhantomTabTest.
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 EXPECT_TRUE(new_model->IsAppTab(0)); 525 EXPECT_TRUE(new_model->IsAppTab(0));
525 EXPECT_FALSE(new_model->IsAppTab(1)); 526 EXPECT_FALSE(new_model->IsAppTab(1));
526 527
527 EXPECT_TRUE(new_model->IsTabPinned(0)); 528 EXPECT_TRUE(new_model->IsTabPinned(0));
528 EXPECT_TRUE(new_model->IsTabPinned(1)); 529 EXPECT_TRUE(new_model->IsTabPinned(1));
529 530
530 EXPECT_TRUE(new_model->GetTabContentsAt(0)->app_extension() == 531 EXPECT_TRUE(new_model->GetTabContentsAt(0)->app_extension() ==
531 app_extension); 532 app_extension);
532 } 533 }
533 #endif 534 #endif
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_table_model.cc ('k') | chrome/browser/browser_main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698