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

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

Issue 1943963004: Revert of (reland) Move permission.mojom from WebKit/public/platform/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_manager.h" 5 #include "chrome/browser/permissions/permission_manager.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 9 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
10 #include "chrome/browser/permissions/permission_manager_factory.h" 10 #include "chrome/browser/permissions/permission_manager_factory.h"
11 #include "chrome/test/base/testing_profile.h" 11 #include "chrome/test/base/testing_profile.h"
12 #include "components/content_settings/core/browser/host_content_settings_map.h" 12 #include "components/content_settings/core/browser/host_content_settings_map.h"
13 #include "content/public/browser/permission_type.h" 13 #include "content/public/browser/permission_type.h"
14 #include "content/public/test/test_browser_thread_bundle.h" 14 #include "content/public/test/test_browser_thread_bundle.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 using permissions::mojom::PermissionStatus; 17 using blink::mojom::PermissionStatus;
18 using content::PermissionType; 18 using content::PermissionType;
19 19
20 namespace { 20 namespace {
21 21
22 class PermissionManagerTestingProfile final : public TestingProfile { 22 class PermissionManagerTestingProfile final : public TestingProfile {
23 public: 23 public:
24 PermissionManagerTestingProfile() {} 24 PermissionManagerTestingProfile() {}
25 ~PermissionManagerTestingProfile() override {} 25 ~PermissionManagerTestingProfile() override {}
26 26
27 PermissionManager* GetPermissionManager() override { 27 PermissionManager* GetPermissionManager() override {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 CheckPermissionStatus(PermissionType::GEOLOCATION, PermissionStatus::ASK); 311 CheckPermissionStatus(PermissionType::GEOLOCATION, PermissionStatus::ASK);
312 GetHostContentSettingsMap()->SetContentSettingDefaultScope( 312 GetHostContentSettingsMap()->SetContentSettingDefaultScope(
313 url(), url(), CONTENT_SETTINGS_TYPE_GEOLOCATION, std::string(), 313 url(), url(), CONTENT_SETTINGS_TYPE_GEOLOCATION, std::string(),
314 CONTENT_SETTING_ALLOW); 314 CONTENT_SETTING_ALLOW);
315 CheckPermissionStatus(PermissionType::GEOLOCATION, PermissionStatus::GRANTED); 315 CheckPermissionStatus(PermissionType::GEOLOCATION, PermissionStatus::GRANTED);
316 316
317 EXPECT_FALSE(callback_called()); 317 EXPECT_FALSE(callback_called());
318 318
319 GetPermissionManager()->UnsubscribePermissionStatusChange(subscription_id); 319 GetPermissionManager()->UnsubscribePermissionStatusChange(subscription_id);
320 } 320 }
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_manager.cc ('k') | chrome/browser/permissions/permission_uma_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698