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

Side by Side Diff: chrome/browser/permissions/permission_context_base_unittest.cc

Issue 2555833002: Remove enable_notifications build flag and define (Closed)
Patch Set: Merge Created 4 years 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 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 "chrome/browser/permissions/permission_context_base.h" 5 #include "chrome/browser/permissions/permission_context_base.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 } 614 }
615 #endif 615 #endif
616 616
617 #if !defined(OS_ANDROID) 617 #if !defined(OS_ANDROID)
618 // Simulates granting and revoking of permissions using permission bubbles. 618 // Simulates granting and revoking of permissions using permission bubbles.
619 // This test shouldn't run on mobile because mobile platforms use infobars. 619 // This test shouldn't run on mobile because mobile platforms use infobars.
620 TEST_F(PermissionContextBaseTests, TestGrantAndRevokeWithBubbles) { 620 TEST_F(PermissionContextBaseTests, TestGrantAndRevokeWithBubbles) {
621 TestGrantAndRevoke_TestContent(content::PermissionType::GEOLOCATION, 621 TestGrantAndRevoke_TestContent(content::PermissionType::GEOLOCATION,
622 CONTENT_SETTINGS_TYPE_GEOLOCATION, 622 CONTENT_SETTINGS_TYPE_GEOLOCATION,
623 CONTENT_SETTING_ASK); 623 CONTENT_SETTING_ASK);
624 #if defined(ENABLE_NOTIFICATIONS)
625 TestGrantAndRevoke_TestContent(content::PermissionType::NOTIFICATIONS, 624 TestGrantAndRevoke_TestContent(content::PermissionType::NOTIFICATIONS,
626 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, 625 CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
627 CONTENT_SETTING_ASK); 626 CONTENT_SETTING_ASK);
628 #endif
629 TestGrantAndRevoke_TestContent(content::PermissionType::MIDI_SYSEX, 627 TestGrantAndRevoke_TestContent(content::PermissionType::MIDI_SYSEX,
630 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 628 CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
631 CONTENT_SETTING_ASK); 629 CONTENT_SETTING_ASK);
632 TestGrantAndRevoke_TestContent(content::PermissionType::PUSH_MESSAGING, 630 TestGrantAndRevoke_TestContent(content::PermissionType::PUSH_MESSAGING,
633 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, 631 CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
634 CONTENT_SETTING_ASK); 632 CONTENT_SETTING_ASK);
635 } 633 }
636 #endif 634 #endif
637 635
638 // Tests the global kill switch by enabling/disabling the Field Trials. 636 // Tests the global kill switch by enabling/disabling the Field Trials.
(...skipping 23 matching lines...) Expand all
662 TestParallelRequests(CONTENT_SETTING_ALLOW); 660 TestParallelRequests(CONTENT_SETTING_ALLOW);
663 } 661 }
664 662
665 TEST_F(PermissionContextBaseTests, TestParallelRequestsBlocked) { 663 TEST_F(PermissionContextBaseTests, TestParallelRequestsBlocked) {
666 TestParallelRequests(CONTENT_SETTING_BLOCK); 664 TestParallelRequests(CONTENT_SETTING_BLOCK);
667 } 665 }
668 666
669 TEST_F(PermissionContextBaseTests, TestParallelRequestsDismissed) { 667 TEST_F(PermissionContextBaseTests, TestParallelRequestsDismissed) {
670 TestParallelRequests(CONTENT_SETTING_ASK); 668 TestParallelRequests(CONTENT_SETTING_ASK);
671 } 669 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system_impl.cc ('k') | chrome/browser/permissions/permission_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698