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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_service_unittest.cc

Issue 425303002: Move extension notifications to extensions/browser/notification_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (extension-notifications) rebase Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
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/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.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 // Load a content pack. 342 // Load a content pack.
343 scoped_refptr<extensions::UnpackedInstaller> installer( 343 scoped_refptr<extensions::UnpackedInstaller> installer(
344 extensions::UnpackedInstaller::Create(service_)); 344 extensions::UnpackedInstaller::Create(service_));
345 installer->set_prompt_for_plugins(false); 345 installer->set_prompt_for_plugins(false);
346 base::FilePath test_data_dir; 346 base::FilePath test_data_dir;
347 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); 347 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir));
348 base::FilePath extension_path = 348 base::FilePath extension_path =
349 test_data_dir.AppendASCII("extensions/supervised_user/content_pack"); 349 test_data_dir.AppendASCII("extensions/supervised_user/content_pack");
350 content::WindowedNotificationObserver extension_load_observer( 350 content::WindowedNotificationObserver extension_load_observer(
351 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, 351 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
352 content::Source<Profile>(profile_.get())); 352 content::Source<Profile>(profile_.get()));
353 installer->Load(extension_path); 353 installer->Load(extension_path);
354 extension_load_observer.Wait(); 354 extension_load_observer.Wait();
355 observer.Wait(); 355 observer.Wait();
356 content::Details<extensions::Extension> details = 356 content::Details<extensions::Extension> details =
357 extension_load_observer.details(); 357 extension_load_observer.details();
358 scoped_refptr<extensions::Extension> extension = 358 scoped_refptr<extensions::Extension> extension =
359 make_scoped_refptr(details.ptr()); 359 make_scoped_refptr(details.ptr());
360 ASSERT_TRUE(extension.get()); 360 ASSERT_TRUE(extension.get());
361 361
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 site_lists[0]->GetSites(&sites); 414 site_lists[0]->GetSites(&sites);
415 ASSERT_EQ(1u, sites.size()); 415 ASSERT_EQ(1u, sites.size());
416 EXPECT_EQ(base::ASCIIToUTF16("Moose"), sites[0].name); 416 EXPECT_EQ(base::ASCIIToUTF16("Moose"), sites[0].name);
417 417
418 EXPECT_EQ(SupervisedUserURLFilter::WARN, 418 EXPECT_EQ(SupervisedUserURLFilter::WARN,
419 url_filter->GetFilteringBehaviorForURL(example_url)); 419 url_filter->GetFilteringBehaviorForURL(example_url));
420 EXPECT_EQ(SupervisedUserURLFilter::ALLOW, 420 EXPECT_EQ(SupervisedUserURLFilter::ALLOW,
421 url_filter->GetFilteringBehaviorForURL(moose_url)); 421 url_filter->GetFilteringBehaviorForURL(moose_url));
422 } 422 }
423 #endif // !defined(OS_ANDROID) 423 #endif // !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/sync/glue/extensions_activity_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698