OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/prefs/scoped_user_pref_update.h" | 8 #include "base/prefs/scoped_user_pref_update.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 EXPECT_TRUE(result_holder.GetResult()); | 356 EXPECT_TRUE(result_holder.GetResult()); |
357 } | 357 } |
358 } | 358 } |
359 | 359 |
360 #if defined(ENABLE_EXTENSIONS) | 360 #if defined(ENABLE_EXTENSIONS) |
361 class SupervisedUserServiceExtensionTestBase | 361 class SupervisedUserServiceExtensionTestBase |
362 : public extensions::ExtensionServiceTestBase { | 362 : public extensions::ExtensionServiceTestBase { |
363 public: | 363 public: |
364 explicit SupervisedUserServiceExtensionTestBase(bool is_supervised) | 364 explicit SupervisedUserServiceExtensionTestBase(bool is_supervised) |
365 : is_supervised_(is_supervised), | 365 : is_supervised_(is_supervised), |
366 channel_(chrome::VersionInfo::CHANNEL_DEV) {} | 366 channel_(version_info::Channel::DEV) {} |
367 ~SupervisedUserServiceExtensionTestBase() override {} | 367 ~SupervisedUserServiceExtensionTestBase() override {} |
368 | 368 |
369 void SetUp() override { | 369 void SetUp() override { |
370 ExtensionServiceTestBase::SetUp(); | 370 ExtensionServiceTestBase::SetUp(); |
371 ExtensionServiceTestBase::ExtensionServiceInitParams params = | 371 ExtensionServiceTestBase::ExtensionServiceInitParams params = |
372 CreateDefaultInitParams(); | 372 CreateDefaultInitParams(); |
373 params.profile_is_supervised = is_supervised_; | 373 params.profile_is_supervised = is_supervised_; |
374 InitializeExtensionService(params); | 374 InitializeExtensionService(params); |
375 SupervisedUserService* service = | 375 SupervisedUserService* service = |
376 SupervisedUserServiceFactory::GetForProfile(profile_.get()); | 376 SupervisedUserServiceFactory::GetForProfile(profile_.get()); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 ASSERT_EQ(1u, site_list_observer_.sites().size()); | 581 ASSERT_EQ(1u, site_list_observer_.sites().size()); |
582 EXPECT_EQ(base::ASCIIToUTF16("Moose"), site_list_observer_.sites()[0].name); | 582 EXPECT_EQ(base::ASCIIToUTF16("Moose"), site_list_observer_.sites()[0].name); |
583 | 583 |
584 url_filter_observer_.Wait(); | 584 url_filter_observer_.Wait(); |
585 EXPECT_EQ(SupervisedUserURLFilter::WARN, | 585 EXPECT_EQ(SupervisedUserURLFilter::WARN, |
586 url_filter->GetFilteringBehaviorForURL(example_url)); | 586 url_filter->GetFilteringBehaviorForURL(example_url)); |
587 EXPECT_EQ(SupervisedUserURLFilter::ALLOW, | 587 EXPECT_EQ(SupervisedUserURLFilter::ALLOW, |
588 url_filter->GetFilteringBehaviorForURL(moose_url)); | 588 url_filter->GetFilteringBehaviorForURL(moose_url)); |
589 } | 589 } |
590 #endif // defined(ENABLE_EXTENSIONS) | 590 #endif // defined(ENABLE_EXTENSIONS) |
OLD | NEW |