| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "components/content_settings/core/browser/host_content_settings_map.h" | 28 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 29 #include "components/search_engines/template_url_service.h" | 29 #include "components/search_engines/template_url_service.h" |
| 30 #include "components/variations/entropy_provider.h" | 30 #include "components/variations/entropy_provider.h" |
| 31 #include "components/variations/variations_associated_data.h" | 31 #include "components/variations/variations_associated_data.h" |
| 32 #include "components/version_info/version_info.h" | 32 #include "components/version_info/version_info.h" |
| 33 #include "content/public/browser/navigation_controller.h" | 33 #include "content/public/browser/navigation_controller.h" |
| 34 #include "content/public/browser/navigation_entry.h" | 34 #include "content/public/browser/navigation_entry.h" |
| 35 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
| 36 #include "content/public/common/content_switches.h" | 36 #include "content/public/common/content_switches.h" |
| 37 #include "content/public/test/test_browser_thread_bundle.h" | 37 #include "content/public/test/test_browser_thread_bundle.h" |
| 38 #include "media/media_features.h" |
| 38 #include "testing/gmock/include/gmock/gmock.h" | 39 #include "testing/gmock/include/gmock/gmock.h" |
| 39 #include "testing/gtest/include/gtest/gtest.h" | 40 #include "testing/gtest/include/gtest/gtest.h" |
| 40 #include "url/gurl.h" | 41 #include "url/gurl.h" |
| 41 | 42 |
| 42 #if !defined(OS_ANDROID) | 43 #if !defined(OS_ANDROID) |
| 43 #include "chrome/browser/ui/browser.h" | 44 #include "chrome/browser/ui/browser.h" |
| 44 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 45 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 45 #include "chrome/common/pref_names.h" | 46 #include "chrome/common/pref_names.h" |
| 46 #include "chrome/test/base/browser_with_test_window_test.h" | 47 #include "chrome/test/base/browser_with_test_window_test.h" |
| 47 #include "chrome/test/base/search_test_utils.h" | 48 #include "chrome/test/base/search_test_utils.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 GetActiveWebContents(); | 108 GetActiveWebContents(); |
| 108 EXPECT_EQ(web_contents, active_contents); | 109 EXPECT_EQ(web_contents, active_contents); |
| 109 EXPECT_EQ(url, active_contents->GetVisibleURL()); | 110 EXPECT_EQ(url, active_contents->GetVisibleURL()); |
| 110 } | 111 } |
| 111 | 112 |
| 112 EXPECT_EQ(previous_count + 2, browser()->tab_strip_model()->count()); | 113 EXPECT_EQ(previous_count + 2, browser()->tab_strip_model()->count()); |
| 113 } | 114 } |
| 114 | 115 |
| 115 #endif // !defined(OS_ANDROID) | 116 #endif // !defined(OS_ANDROID) |
| 116 | 117 |
| 117 #if defined(ENABLE_WEBRTC) | 118 #if BUILDFLAG(ENABLE_WEBRTC) |
| 118 | 119 |
| 119 // NOTE: Any updates to the expectations in these tests should also be done in | 120 // NOTE: Any updates to the expectations in these tests should also be done in |
| 120 // the browser test WebRtcDisableEncryptionFlagBrowserTest. | 121 // the browser test WebRtcDisableEncryptionFlagBrowserTest. |
| 121 class DisableWebRtcEncryptionFlagTest : public testing::Test { | 122 class DisableWebRtcEncryptionFlagTest : public testing::Test { |
| 122 public: | 123 public: |
| 123 DisableWebRtcEncryptionFlagTest() | 124 DisableWebRtcEncryptionFlagTest() |
| 124 : from_command_line_(base::CommandLine::NO_PROGRAM), | 125 : from_command_line_(base::CommandLine::NO_PROGRAM), |
| 125 to_command_line_(base::CommandLine::NO_PROGRAM) {} | 126 to_command_line_(base::CommandLine::NO_PROGRAM) {} |
| 126 | 127 |
| 127 protected: | 128 protected: |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 client.ClearSiteData( | 708 client.ClearSiteData( |
| 708 profile(), origin, true /* cookies */, false /* storage */, | 709 profile(), origin, true /* cookies */, false /* storage */, |
| 709 true /* cache */, | 710 true /* cache */, |
| 710 base::Bind( | 711 base::Bind( |
| 711 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished, | 712 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished, |
| 712 base::Unretained(this), true)); | 713 base::Unretained(this), true)); |
| 713 EXPECT_TRUE(IsClearingFinished()); | 714 EXPECT_TRUE(IsClearingFinished()); |
| 714 } | 715 } |
| 715 | 716 |
| 716 } // namespace | 717 } // namespace |
| OLD | NEW |