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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/extensions/extension_service.h" | 22 #include "chrome/browser/extensions/extension_service.h" |
23 #include "chrome/browser/extensions/tab_helper.h" | 23 #include "chrome/browser/extensions/tab_helper.h" |
24 #include "chrome/browser/first_run/first_run.h" | 24 #include "chrome/browser/first_run/first_run.h" |
25 #include "chrome/browser/lifetime/application_lifetime.h" | 25 #include "chrome/browser/lifetime/application_lifetime.h" |
26 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 26 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
27 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
28 #include "chrome/browser/profiles/profile_manager.h" | 28 #include "chrome/browser/profiles/profile_manager.h" |
29 #include "chrome/browser/search/search.h" | 29 #include "chrome/browser/search/search.h" |
30 #include "chrome/browser/sessions/session_backend.h" | 30 #include "chrome/browser/sessions/session_backend.h" |
31 #include "chrome/browser/sessions/session_service_factory.h" | 31 #include "chrome/browser/sessions/session_service_factory.h" |
| 32 #include "chrome/browser/translate/translate_browser_test_utils.h" |
32 #include "chrome/browser/translate/translate_tab_helper.h" | 33 #include "chrome/browser/translate/translate_tab_helper.h" |
33 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" | 34 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" |
34 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" | 35 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" |
35 #include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h" | 36 #include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h" |
36 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" | 37 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" |
37 #include "chrome/browser/ui/browser.h" | 38 #include "chrome/browser/ui/browser.h" |
38 #include "chrome/browser/ui/browser_command_controller.h" | 39 #include "chrome/browser/ui/browser_command_controller.h" |
39 #include "chrome/browser/ui/browser_commands.h" | 40 #include "chrome/browser/ui/browser_commands.h" |
40 #include "chrome/browser/ui/browser_finder.h" | 41 #include "chrome/browser/ui/browser_finder.h" |
41 #include "chrome/browser/ui/browser_iterator.h" | 42 #include "chrome/browser/ui/browser_iterator.h" |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1396 | 1397 |
1397 EXPECT_FALSE( | 1398 EXPECT_FALSE( |
1398 dev_tools_browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)); | 1399 dev_tools_browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)); |
1399 EXPECT_FALSE( | 1400 EXPECT_FALSE( |
1400 app_browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)); | 1401 app_browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)); |
1401 } | 1402 } |
1402 #endif | 1403 #endif |
1403 | 1404 |
1404 // Tests that the CLD (Compact Language Detection) works properly. | 1405 // Tests that the CLD (Compact Language Detection) works properly. |
1405 IN_PROC_BROWSER_TEST_F(BrowserTest, PageLanguageDetection) { | 1406 IN_PROC_BROWSER_TEST_F(BrowserTest, PageLanguageDetection) { |
| 1407 test::ScopedCLDDynamicDataHarness dynamic_data_scope; |
1406 ASSERT_TRUE(test_server()->Start()); | 1408 ASSERT_TRUE(test_server()->Start()); |
1407 | 1409 |
1408 //std::string lang; | 1410 //std::string lang; |
1409 LanguageDetectionDetails details; | 1411 LanguageDetectionDetails details; |
1410 | 1412 |
1411 // Open a new tab with a page in English. | 1413 // Open a new tab with a page in English. |
1412 AddTabAtIndex(0, GURL(test_server()->GetURL("files/english_page.html")), | 1414 AddTabAtIndex(0, GURL(test_server()->GetURL("files/english_page.html")), |
1413 content::PAGE_TRANSITION_TYPED); | 1415 content::PAGE_TRANSITION_TYPED); |
1414 | 1416 |
1415 WebContents* current_web_contents = | 1417 WebContents* current_web_contents = |
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2701 #endif | 2703 #endif |
2702 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2704 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
2703 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2705 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
2704 gfx::Size exp_final_size(initial_wcv_size); | 2706 gfx::Size exp_final_size(initial_wcv_size); |
2705 exp_final_size.Enlarge(wcv_resize_insets.width(), | 2707 exp_final_size.Enlarge(wcv_resize_insets.width(), |
2706 wcv_resize_insets.height() + height_inset); | 2708 wcv_resize_insets.height() + height_inset); |
2707 EXPECT_EQ(exp_final_size, | 2709 EXPECT_EQ(exp_final_size, |
2708 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2710 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
2709 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); | 2711 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); |
2710 } | 2712 } |
OLD | NEW |