OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/geolocation/geolocation_permission_context.h" | 5 #include "chrome/browser/geolocation/geolocation_permission_context.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 removed_infobars_.clear(); | 99 removed_infobars_.clear(); |
100 } | 100 } |
101 | 101 |
102 | 102 |
103 // GeolocationPermissionContextTests ------------------------------------------ | 103 // GeolocationPermissionContextTests ------------------------------------------ |
104 | 104 |
105 class GeolocationPermissionContextTests | 105 class GeolocationPermissionContextTests |
106 : public ChromeRenderViewHostTestHarness { | 106 : public ChromeRenderViewHostTestHarness { |
107 protected: | 107 protected: |
108 // ChromeRenderViewHostTestHarness: | 108 // ChromeRenderViewHostTestHarness: |
109 virtual void SetUp() override; | 109 void SetUp() override; |
110 virtual void TearDown() override; | 110 void TearDown() override; |
111 | 111 |
112 PermissionRequestID RequestID(int bridge_id); | 112 PermissionRequestID RequestID(int bridge_id); |
113 PermissionRequestID RequestIDForTab(int tab, int bridge_id); | 113 PermissionRequestID RequestIDForTab(int tab, int bridge_id); |
114 InfoBarService* infobar_service() { | 114 InfoBarService* infobar_service() { |
115 return InfoBarService::FromWebContents(web_contents()); | 115 return InfoBarService::FromWebContents(web_contents()); |
116 } | 116 } |
117 InfoBarService* infobar_service_for_tab(int tab) { | 117 InfoBarService* infobar_service_for_tab(int tab) { |
118 return InfoBarService::FromWebContents(extra_tabs_[tab]); | 118 return InfoBarService::FromWebContents(extra_tabs_[tab]); |
119 } | 119 } |
120 | 120 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 // it is the embedder. | 775 // it is the embedder. |
776 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(), | 776 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(), |
777 requesting_frame_0.GetOrigin(), | 777 requesting_frame_0.GetOrigin(), |
778 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), | 778 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), |
779 13); | 779 13); |
780 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(), | 780 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(), |
781 requesting_frame_0.GetOrigin(), | 781 requesting_frame_0.GetOrigin(), |
782 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), | 782 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), |
783 11); | 783 11); |
784 } | 784 } |
OLD | NEW |