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

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

Issue 2485253002: Remove unnecessary calls to GURL() (Closed)
Patch Set: Assert that StringPiece must always be canonicalized. Fix some constants. Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_decision_auto_blocker.h" 5 #include "chrome/browser/permissions/permission_decision_auto_blocker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "content/public/browser/permission_type.h" 10 #include "content/public/browser/permission_type.h"
11 11
12 namespace { 12 namespace {
13 13
14 bool FilterGoogle(const GURL& url) { 14 bool FilterGoogle(const GURL& url) {
15 return url == GURL("https://www.google.com"); 15 return url == "https://www.google.com/";
16 } 16 }
17 17
18 bool FilterAll(const GURL& url) { 18 bool FilterAll(const GURL& url) {
19 return true; 19 return true;
20 } 20 }
21 21
22 } // namespace 22 } // namespace
23 23
24 class PermissionDecisionAutoBlockerUnitTest 24 class PermissionDecisionAutoBlockerUnitTest
25 : public ChromeRenderViewHostTestHarness { 25 : public ChromeRenderViewHostTestHarness {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 EXPECT_EQ(0, GetDismissalCount(url1, content::PermissionType::GEOLOCATION)); 93 EXPECT_EQ(0, GetDismissalCount(url1, content::PermissionType::GEOLOCATION));
94 EXPECT_EQ(0, GetDismissalCount(url1, content::PermissionType::NOTIFICATIONS)); 94 EXPECT_EQ(0, GetDismissalCount(url1, content::PermissionType::NOTIFICATIONS));
95 EXPECT_EQ(0, GetDismissalCount(url2, content::PermissionType::GEOLOCATION)); 95 EXPECT_EQ(0, GetDismissalCount(url2, content::PermissionType::GEOLOCATION));
96 96
97 EXPECT_EQ(0, GetIgnoreCount(url1, content::PermissionType::GEOLOCATION)); 97 EXPECT_EQ(0, GetIgnoreCount(url1, content::PermissionType::GEOLOCATION));
98 EXPECT_EQ(0, GetIgnoreCount(url1, content::PermissionType::NOTIFICATIONS)); 98 EXPECT_EQ(0, GetIgnoreCount(url1, content::PermissionType::NOTIFICATIONS));
99 EXPECT_EQ(0, GetIgnoreCount(url2, content::PermissionType::GEOLOCATION)); 99 EXPECT_EQ(0, GetIgnoreCount(url2, content::PermissionType::GEOLOCATION));
100 EXPECT_EQ(0, GetIgnoreCount(url2, content::PermissionType::DURABLE_STORAGE)); 100 EXPECT_EQ(0, GetIgnoreCount(url2, content::PermissionType::DURABLE_STORAGE));
101 EXPECT_EQ(0, GetIgnoreCount(url2, content::PermissionType::MIDI_SYSEX)); 101 EXPECT_EQ(0, GetIgnoreCount(url2, content::PermissionType::MIDI_SYSEX));
102 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history_tab_helper.cc ('k') | chrome/browser/printing/cloud_print/privet_notifications_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698