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

Side by Side Diff: chrome/browser/notifications/message_center_settings_controller_unittest.cc

Issue 1657913003: Refactor of ProfileInfoCache in c/b/notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 <string> 5 #include <string>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 void SetUp() override { ASSERT_TRUE(testing_profile_manager_.SetUp()); } 46 void SetUp() override { ASSERT_TRUE(testing_profile_manager_.SetUp()); }
47 47
48 virtual TestingProfile* CreateProfile(const std::string& name) { 48 virtual TestingProfile* CreateProfile(const std::string& name) {
49 return testing_profile_manager_.CreateTestingProfile(name); 49 return testing_profile_manager_.CreateTestingProfile(name);
50 } 50 }
51 51
52 void CreateController() { 52 void CreateController() {
53 controller_.reset(new MessageCenterSettingsController( 53 controller_.reset(new MessageCenterSettingsController(
54 testing_profile_manager_.profile_info_cache())); 54 *testing_profile_manager_.profile_attributes_storage()));
55 } 55 }
56 56
57 void ResetController() { 57 void ResetController() {
58 controller_.reset(); 58 controller_.reset();
59 } 59 }
60 60
61 MessageCenterSettingsController* controller() { return controller_.get(); } 61 MessageCenterSettingsController* controller() { return controller_.get(); }
62 62
63 private: 63 private:
64 content::TestBrowserThreadBundle thread_bundle_; 64 content::TestBrowserThreadBundle thread_bundle_;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // (5) Enable the permission when the default is blocked (expected to set). 341 // (5) Enable the permission when the default is blocked (expected to set).
342 controller()->SetNotifierEnabled(disabled_notifier, true); 342 controller()->SetNotifierEnabled(disabled_notifier, true);
343 EXPECT_EQ(CONTENT_SETTING_ALLOW, 343 EXPECT_EQ(CONTENT_SETTING_ALLOW,
344 DesktopNotificationProfileUtil::GetContentSetting(profile, origin)); 344 DesktopNotificationProfileUtil::GetContentSetting(profile, origin));
345 345
346 // (6) Disable the permission when the default is blocked (expected to clear). 346 // (6) Disable the permission when the default is blocked (expected to clear).
347 controller()->SetNotifierEnabled(enabled_notifier, false); 347 controller()->SetNotifierEnabled(enabled_notifier, false);
348 EXPECT_EQ(CONTENT_SETTING_BLOCK, 348 EXPECT_EQ(CONTENT_SETTING_BLOCK,
349 DesktopNotificationProfileUtil::GetContentSetting(profile, origin)); 349 DesktopNotificationProfileUtil::GetContentSetting(profile, origin));
350 } 350 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698