| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/path_service.h" | 5 #include "base/path_service.h" |
| 6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
| 7 #include "base/prefs/scoped_user_pref_update.h" | 7 #include "base/prefs/scoped_user_pref_update.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/extensions/extension_service_unittest.h" | 10 #include "chrome/browser/extensions/extension_service_unittest.h" |
| 11 #include "chrome/browser/extensions/unpacked_installer.h" | 11 #include "chrome/browser/extensions/unpacked_installer.h" |
| 12 #include "chrome/browser/managed_mode/custodian_profile_downloader_service.h" | 12 #include "chrome/browser/managed_mode/custodian_profile_downloader_service.h" |
| 13 #include "chrome/browser/managed_mode/custodian_profile_downloader_service_facto
ry.h" | 13 #include "chrome/browser/managed_mode/custodian_profile_downloader_service_facto
ry.h" |
| 14 #include "chrome/browser/managed_mode/managed_user_service.h" | 14 #include "chrome/browser/managed_mode/managed_user_service.h" |
| 15 #include "chrome/browser/managed_mode/managed_user_service_factory.h" | 15 #include "chrome/browser/managed_mode/managed_user_service_factory.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" | 17 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" |
| 18 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 18 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 19 #include "chrome/browser/ui/browser_list.h" | 19 #include "chrome/browser/ui/browser_list.h" |
| 20 #include "chrome/common/chrome_paths.h" | 20 #include "chrome/common/chrome_paths.h" |
| 21 #include "chrome/common/extensions/extension.h" | |
| 22 #include "chrome/common/extensions/features/feature_channel.h" | 21 #include "chrome/common/extensions/features/feature_channel.h" |
| 23 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 24 #include "chrome/test/base/testing_profile.h" | 23 #include "chrome/test/base/testing_profile.h" |
| 25 #include "content/public/test/test_browser_thread_bundle.h" | 24 #include "content/public/test/test_browser_thread_bundle.h" |
| 26 #include "content/public/test/test_utils.h" | 25 #include "content/public/test/test_utils.h" |
| 26 #include "extensions/common/extension.h" |
| 27 #include "extensions/common/extension_builder.h" | 27 #include "extensions/common/extension_builder.h" |
| 28 #include "extensions/common/manifest_constants.h" | 28 #include "extensions/common/manifest_constants.h" |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 | 30 |
| 31 using content::MessageLoopRunner; | 31 using content::MessageLoopRunner; |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 void OnProfileDownloadedFail(const string16& full_name) { | 35 void OnProfileDownloadedFail(const string16& full_name) { |
| 36 ASSERT_TRUE(false) << "Profile download should not have succeeded."; | 36 ASSERT_TRUE(false) << "Profile download should not have succeeded."; |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 site_lists[0]->GetSites(&sites); | 390 site_lists[0]->GetSites(&sites); |
| 391 ASSERT_EQ(1u, sites.size()); | 391 ASSERT_EQ(1u, sites.size()); |
| 392 EXPECT_EQ(ASCIIToUTF16("Moose"), sites[0].name); | 392 EXPECT_EQ(ASCIIToUTF16("Moose"), sites[0].name); |
| 393 | 393 |
| 394 EXPECT_EQ(ManagedModeURLFilter::WARN, | 394 EXPECT_EQ(ManagedModeURLFilter::WARN, |
| 395 url_filter->GetFilteringBehaviorForURL(example_url)); | 395 url_filter->GetFilteringBehaviorForURL(example_url)); |
| 396 EXPECT_EQ(ManagedModeURLFilter::ALLOW, | 396 EXPECT_EQ(ManagedModeURLFilter::ALLOW, |
| 397 url_filter->GetFilteringBehaviorForURL(moose_url)); | 397 url_filter->GetFilteringBehaviorForURL(moose_url)); |
| 398 } | 398 } |
| 399 #endif // !defined(OS_ANDROID) | 399 #endif // !defined(OS_ANDROID) |
| OLD | NEW |