OLD | NEW |
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/i18n/rtl.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 PhantomTabTest(); | 489 PhantomTabTest(); |
490 | 490 |
491 Extension* extension = GetExtension(); | 491 Extension* extension = GetExtension(); |
492 UninstallExtension(extension->id()); | 492 UninstallExtension(extension->id()); |
493 | 493 |
494 // The uninstall should have removed the tab. | 494 // The uninstall should have removed the tab. |
495 ASSERT_EQ(1, browser()->tab_count()); | 495 ASSERT_EQ(1, browser()->tab_count()); |
496 } | 496 } |
497 #endif // !defined(OS_MACOSX) | 497 #endif // !defined(OS_MACOSX) |
498 | 498 |
| 499 #if defined(OS_WIN) |
| 500 // http://crbug.com/46198. On XP/Vista, the failure rate is 5 ~ 6%. |
| 501 #define MAYBE_PageLanguageDetection FLAKY_PageLanguageDetection |
| 502 #else |
| 503 #define MAYBE_PageLanguageDetection PageLanguageDetection |
| 504 #endif |
499 // Tests that the CLD (Compact Language Detection) works properly. | 505 // Tests that the CLD (Compact Language Detection) works properly. |
500 IN_PROC_BROWSER_TEST_F(BrowserTest, PageLanguageDetection) { | 506 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageLanguageDetection) { |
501 static const wchar_t kDocRoot[] = L"chrome/test/data"; | 507 static const wchar_t kDocRoot[] = L"chrome/test/data"; |
502 scoped_refptr<HTTPTestServer> server( | 508 scoped_refptr<HTTPTestServer> server( |
503 HTTPTestServer::CreateServer(kDocRoot, NULL)); | 509 HTTPTestServer::CreateServer(kDocRoot, NULL)); |
504 ASSERT_TRUE(NULL != server.get()); | 510 ASSERT_TRUE(NULL != server.get()); |
505 | 511 |
506 TabContents* current_tab = browser()->GetSelectedTabContents(); | 512 TabContents* current_tab = browser()->GetSelectedTabContents(); |
507 | 513 |
508 // Navigate to a page in English. | 514 // Navigate to a page in English. |
509 ui_test_utils::WindowedNotificationObserverWithDetails<TabContents, | 515 ui_test_utils::WindowedNotificationObserverWithDetails<TabContents, |
510 std::string> | 516 std::string> |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 // Open the app. Focus should move to the panel. | 878 // Open the app. Focus should move to the panel. |
873 Browser::OpenApplication(profile_, extension_app_->id()); | 879 Browser::OpenApplication(profile_, extension_app_->id()); |
874 ASSERT_EQ(extra_browser, BrowserList::GetLastActive()); | 880 ASSERT_EQ(extra_browser, BrowserList::GetLastActive()); |
875 ASSERT_EQ(2, extra_browser->tab_count()); | 881 ASSERT_EQ(2, extra_browser->tab_count()); |
876 | 882 |
877 browser()->window()->Show(); | 883 browser()->window()->Show(); |
878 Browser::OpenApplication(profile_, extension_app_->id()); | 884 Browser::OpenApplication(profile_, extension_app_->id()); |
879 ASSERT_EQ(browser(), BrowserList::GetLastActive()); | 885 ASSERT_EQ(browser(), BrowserList::GetLastActive()); |
880 ASSERT_EQ(2, browser()->tab_count()); | 886 ASSERT_EQ(2, browser()->tab_count()); |
881 } | 887 } |
OLD | NEW |