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

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

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 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
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 #else 286 #else
287 // ChromeOS always adds a system notifier to end of the list. 287 // ChromeOS always adds a system notifier to end of the list.
288 EXPECT_EQ(3u, notifiers.size()); 288 EXPECT_EQ(3u, notifiers.size());
289 EXPECT_EQ(ash::system_notifier::kNotifierScreenshot, 289 EXPECT_EQ(ash::system_notifier::kNotifierScreenshot,
290 notifiers[2]->notifier_id.id); 290 notifiers[2]->notifier_id.id);
291 #endif 291 #endif
292 292
293 EXPECT_EQ(kBarId, notifiers[0]->notifier_id.id); 293 EXPECT_EQ(kBarId, notifiers[0]->notifier_id.id);
294 EXPECT_EQ(kFooId, notifiers[1]->notifier_id.id); 294 EXPECT_EQ(kFooId, notifiers[1]->notifier_id.id);
295 295
296 STLDeleteElements(&notifiers); 296 base::STLDeleteElements(&notifiers);
297 } 297 }
298 298
299 TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) { 299 TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
300 Profile* profile = CreateProfile("MyProfile"); 300 Profile* profile = CreateProfile("MyProfile");
301 CreateController(); 301 CreateController();
302 302
303 GURL origin("https://example.com/"); 303 GURL origin("https://example.com/");
304 304
305 message_center::NotifierId notifier_id(origin); 305 message_center::NotifierId notifier_id(origin);
306 message_center::Notifier enabled_notifier( 306 message_center::Notifier enabled_notifier(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 EXPECT_EQ(blink::mojom::PermissionStatus::GRANTED, 354 EXPECT_EQ(blink::mojom::PermissionStatus::GRANTED,
355 permission_manager->GetPermissionStatus( 355 permission_manager->GetPermissionStatus(
356 content::PermissionType::NOTIFICATIONS, origin, origin)); 356 content::PermissionType::NOTIFICATIONS, origin, origin));
357 357
358 // (6) Disable the permission when the default is blocked (expected to clear). 358 // (6) Disable the permission when the default is blocked (expected to clear).
359 controller()->SetNotifierEnabled(enabled_notifier, false); 359 controller()->SetNotifierEnabled(enabled_notifier, false);
360 EXPECT_EQ(blink::mojom::PermissionStatus::DENIED, 360 EXPECT_EQ(blink::mojom::PermissionStatus::DENIED,
361 permission_manager->GetPermissionStatus( 361 permission_manager->GetPermissionStatus(
362 content::PermissionType::NOTIFICATIONS, origin, origin)); 362 content::PermissionType::NOTIFICATIONS, origin, origin));
363 } 363 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698