OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 | 181 |
182 private: | 182 private: |
183 InterstitialPage* interstitial_page_; // Owns us. | 183 InterstitialPage* interstitial_page_; // Owns us. |
184 }; | 184 }; |
185 | 185 |
186 } // namespace | 186 } // namespace |
187 | 187 |
188 class BrowserTest : public ExtensionBrowserTest { | 188 class BrowserTest : public ExtensionBrowserTest { |
189 protected: | 189 protected: |
190 virtual void SetUpCommandLine(CommandLine* command_line) { | |
191 ExtensionBrowserTest::SetUpCommandLine(command_line); | |
192 command_line->AppendSwitch(switches::kEnablePointerLock); | |
193 } | |
194 | |
195 // In RTL locales wrap the page title with RTL embedding characters so that it | 190 // In RTL locales wrap the page title with RTL embedding characters so that it |
196 // matches the value returned by GetWindowTitle(). | 191 // matches the value returned by GetWindowTitle(). |
197 string16 LocaleWindowCaptionFromPageTitle(const string16& expected_title) { | 192 string16 LocaleWindowCaptionFromPageTitle(const string16& expected_title) { |
198 string16 page_title = WindowCaptionFromPageTitle(expected_title); | 193 string16 page_title = WindowCaptionFromPageTitle(expected_title); |
199 #if defined(OS_WIN) | 194 #if defined(OS_WIN) |
200 std::string locale = g_browser_process->GetApplicationLocale(); | 195 std::string locale = g_browser_process->GetApplicationLocale(); |
201 if (base::i18n::GetTextDirectionForLocale(locale.c_str()) == | 196 if (base::i18n::GetTextDirectionForLocale(locale.c_str()) == |
202 base::i18n::RIGHT_TO_LEFT) { | 197 base::i18n::RIGHT_TO_LEFT) { |
203 base::i18n::WrapStringWithLTRFormatting(&page_title); | 198 base::i18n::WrapStringWithLTRFormatting(&page_title); |
204 } | 199 } |
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("WebKit"), true, true, | 1613 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("WebKit"), true, true, |
1619 NULL, NULL), | 1614 NULL, NULL), |
1620 0); | 1615 0); |
1621 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("OS"), true, true, | 1616 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("OS"), true, true, |
1622 NULL, NULL), | 1617 NULL, NULL), |
1623 0); | 1618 0); |
1624 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("JavaScript"), true, | 1619 ASSERT_GT(ui_test_utils::FindInPage(tab, ASCIIToUTF16("JavaScript"), true, |
1625 true, NULL, NULL), | 1620 true, NULL, NULL), |
1626 0); | 1621 0); |
1627 } | 1622 } |
OLD | NEW |