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

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

Issue 2657453006: Move BrowsingDataFilterBuilder[Impl] to content/ (Closed)
Patch Set: Rebased Created 3 years, 10 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/test/BUILD.gn » ('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 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
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/metrics/field_trial.h" 16 #include "base/metrics/field_trial.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "chrome/browser/browsing_data/browsing_data_filter_builder.h"
21 #include "chrome/browser/browsing_data/browsing_data_helper.h" 20 #include "chrome/browser/browsing_data/browsing_data_helper.h"
22 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" 21 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h"
23 #include "chrome/browser/browsing_data/browsing_data_remover_impl.h" 22 #include "chrome/browser/browsing_data/browsing_data_remover_impl.h"
24 #include "chrome/browser/search_engines/template_url_service_factory.h" 23 #include "chrome/browser/search_engines/template_url_service_factory.h"
25 #include "chrome/test/base/testing_profile.h" 24 #include "chrome/test/base/testing_profile.h"
26 #include "components/content_settings/core/browser/host_content_settings_map.h" 25 #include "components/content_settings/core/browser/host_content_settings_map.h"
27 #include "components/search_engines/template_url_service.h" 26 #include "components/search_engines/template_url_service.h"
28 #include "components/variations/entropy_provider.h" 27 #include "components/variations/entropy_provider.h"
29 #include "components/variations/variations_associated_data.h" 28 #include "components/variations/variations_associated_data.h"
30 #include "components/version_info/version_info.h" 29 #include "components/version_info/version_info.h"
30 #include "content/public/browser/browsing_data_filter_builder.h"
31 #include "content/public/browser/navigation_controller.h" 31 #include "content/public/browser/navigation_controller.h"
32 #include "content/public/browser/navigation_entry.h" 32 #include "content/public/browser/navigation_entry.h"
33 #include "content/public/browser/web_contents.h" 33 #include "content/public/browser/web_contents.h"
34 #include "content/public/common/content_switches.h" 34 #include "content/public/common/content_switches.h"
35 #include "content/public/test/test_browser_thread_bundle.h" 35 #include "content/public/test/test_browser_thread_bundle.h"
36 #include "media/media_features.h" 36 #include "media/media_features.h"
37 #include "testing/gmock/include/gmock/gmock.h" 37 #include "testing/gmock/include/gmock/gmock.h"
38 #include "testing/gtest/include/gtest/gtest.h" 38 #include "testing/gtest/include/gtest/gtest.h"
39 #include "url/gurl.h" 39 #include "url/gurl.h"
40 40
41 #if !defined(OS_ANDROID) 41 #if !defined(OS_ANDROID)
42 #include "chrome/browser/ui/browser.h" 42 #include "chrome/browser/ui/browser.h"
43 #include "chrome/browser/ui/tabs/tab_strip_model.h" 43 #include "chrome/browser/ui/tabs/tab_strip_model.h"
44 #include "chrome/common/pref_names.h" 44 #include "chrome/common/pref_names.h"
45 #include "chrome/test/base/browser_with_test_window_test.h" 45 #include "chrome/test/base/browser_with_test_window_test.h"
46 #include "chrome/test/base/search_test_utils.h" 46 #include "chrome/test/base/search_test_utils.h"
47 #endif 47 #endif
48 48
49 using content::BrowsingDataFilterBuilder;
49 using testing::_; 50 using testing::_;
50 using ChromeContentBrowserClientTest = testing::Test; 51 using ChromeContentBrowserClientTest = testing::Test;
51 52
52 TEST_F(ChromeContentBrowserClientTest, ShouldAssignSiteForURL) { 53 TEST_F(ChromeContentBrowserClientTest, ShouldAssignSiteForURL) {
53 ChromeContentBrowserClient client; 54 ChromeContentBrowserClient client;
54 EXPECT_FALSE(client.ShouldAssignSiteForURL(GURL("chrome-native://test"))); 55 EXPECT_FALSE(client.ShouldAssignSiteForURL(GURL("chrome-native://test")));
55 EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("http://www.google.com"))); 56 EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("http://www.google.com")));
56 EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("https://www.google.com"))); 57 EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("https://www.google.com")));
57 } 58 }
58 59
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 client.ClearSiteData( 681 client.ClearSiteData(
681 profile(), origin, true /* cookies */, false /* storage */, 682 profile(), origin, true /* cookies */, false /* storage */,
682 true /* cache */, 683 true /* cache */,
683 base::Bind( 684 base::Bind(
684 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished, 685 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished,
685 base::Unretained(this), true)); 686 base::Unretained(this), true));
686 EXPECT_TRUE(IsClearingFinished()); 687 EXPECT_TRUE(IsClearingFinished());
687 } 688 }
688 689
689 } // namespace 690 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698