OLD | NEW |
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" |
| 8 #include "build/build_config.h" |
7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
8 #include "chrome/browser/permissions/permission_manager_factory.h" | 10 #include "chrome/browser/permissions/permission_manager_factory.h" |
9 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
10 #include "components/content_settings/core/browser/host_content_settings_map.h" | 12 #include "components/content_settings/core/browser/host_content_settings_map.h" |
11 #include "content/public/browser/permission_type.h" | 13 #include "content/public/browser/permission_type.h" |
12 #include "content/public/test/test_browser_thread_bundle.h" | 14 #include "content/public/test/test_browser_thread_bundle.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
14 | 16 |
15 using content::PermissionType; | 17 using content::PermissionType; |
16 using content::PermissionStatus; | 18 using content::PermissionStatus; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 ContentSettingsPattern::FromURLNoWildcard(url()), | 343 ContentSettingsPattern::FromURLNoWildcard(url()), |
342 CONTENT_SETTINGS_TYPE_GEOLOCATION, | 344 CONTENT_SETTINGS_TYPE_GEOLOCATION, |
343 std::string(), | 345 std::string(), |
344 CONTENT_SETTING_ASK); | 346 CONTENT_SETTING_ASK); |
345 | 347 |
346 EXPECT_TRUE(callback_called()); | 348 EXPECT_TRUE(callback_called()); |
347 EXPECT_EQ(content::PERMISSION_STATUS_ASK, callback_result()); | 349 EXPECT_EQ(content::PERMISSION_STATUS_ASK, callback_result()); |
348 | 350 |
349 GetPermissionManager()->UnsubscribePermissionStatusChange(subscription_id); | 351 GetPermissionManager()->UnsubscribePermissionStatusChange(subscription_id); |
350 } | 352 } |
OLD | NEW |