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/chrome_geolocation_permission_context.h" | 5 #include "chrome/browser/geolocation/chrome_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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 extra_tabs_[tab]->GetRenderViewHost()->GetRoutingID(), | 154 extra_tabs_[tab]->GetRenderViewHost()->GetRoutingID(), |
155 bridge_id, | 155 bridge_id, |
156 0); | 156 0); |
157 } | 157 } |
158 | 158 |
159 void GeolocationPermissionContextTests::RequestGeolocationPermission( | 159 void GeolocationPermissionContextTests::RequestGeolocationPermission( |
160 const PermissionRequestID& id, | 160 const PermissionRequestID& id, |
161 const GURL& requesting_frame) { | 161 const GURL& requesting_frame) { |
162 geolocation_permission_context_->RequestGeolocationPermission( | 162 geolocation_permission_context_->RequestGeolocationPermission( |
163 id.render_process_id(), id.render_view_id(), id.bridge_id(), | 163 id.render_process_id(), id.render_view_id(), id.bridge_id(), |
164 requesting_frame, | 164 requesting_frame, false, |
165 base::Bind(&GeolocationPermissionContextTests::PermissionResponse, | 165 base::Bind(&GeolocationPermissionContextTests::PermissionResponse, |
166 base::Unretained(this), id)); | 166 base::Unretained(this), id)); |
167 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | 167 content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
168 base::RunLoop().RunUntilIdle(); | 168 base::RunLoop().RunUntilIdle(); |
169 } | 169 } |
170 | 170 |
171 void GeolocationPermissionContextTests::CancelGeolocationPermissionRequest( | 171 void GeolocationPermissionContextTests::CancelGeolocationPermissionRequest( |
172 const PermissionRequestID& id, | 172 const PermissionRequestID& id, |
173 const GURL& requesting_frame) { | 173 const GURL& requesting_frame) { |
174 geolocation_permission_context_->CancelGeolocationPermissionRequest( | 174 geolocation_permission_context_->CancelGeolocationPermissionRequest( |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 EXPECT_FALSE(infobar_delegate->ShouldExpire( | 684 EXPECT_FALSE(infobar_delegate->ShouldExpire( |
685 InfoBarService::NavigationDetailsFromLoadCommittedDetails(details))); | 685 InfoBarService::NavigationDetailsFromLoadCommittedDetails(details))); |
686 // Ensure the infobar will expire when we commit the pending navigation. | 686 // Ensure the infobar will expire when we commit the pending navigation. |
687 details.entry = web_contents()->GetController().GetActiveEntry(); | 687 details.entry = web_contents()->GetController().GetActiveEntry(); |
688 EXPECT_TRUE(infobar_delegate->ShouldExpire( | 688 EXPECT_TRUE(infobar_delegate->ShouldExpire( |
689 InfoBarService::NavigationDetailsFromLoadCommittedDetails(details))); | 689 InfoBarService::NavigationDetailsFromLoadCommittedDetails(details))); |
690 | 690 |
691 // Delete the tab contents. | 691 // Delete the tab contents. |
692 DeleteContents(); | 692 DeleteContents(); |
693 } | 693 } |
OLD | NEW |