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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 extra_tabs_[tab]->GetRenderViewHost()->GetRoutingID(), | 153 extra_tabs_[tab]->GetRenderViewHost()->GetRoutingID(), |
154 bridge_id, | 154 bridge_id, |
155 0); | 155 0); |
156 } | 156 } |
157 | 157 |
158 void GeolocationPermissionContextTests::RequestGeolocationPermission( | 158 void GeolocationPermissionContextTests::RequestGeolocationPermission( |
159 const PermissionRequestID& id, | 159 const PermissionRequestID& id, |
160 const GURL& requesting_frame) { | 160 const GURL& requesting_frame) { |
161 geolocation_permission_context_->RequestGeolocationPermission( | 161 geolocation_permission_context_->RequestGeolocationPermission( |
162 id.render_process_id(), id.render_view_id(), id.bridge_id(), | 162 id.render_process_id(), id.render_view_id(), id.bridge_id(), |
163 requesting_frame, | 163 requesting_frame, false, |
164 base::Bind(&GeolocationPermissionContextTests::PermissionResponse, | 164 base::Bind(&GeolocationPermissionContextTests::PermissionResponse, |
165 base::Unretained(this), id)); | 165 base::Unretained(this), id)); |
166 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | 166 content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
167 base::RunLoop().RunUntilIdle(); | 167 base::RunLoop().RunUntilIdle(); |
168 } | 168 } |
169 | 169 |
170 void GeolocationPermissionContextTests::CancelGeolocationPermissionRequest( | 170 void GeolocationPermissionContextTests::CancelGeolocationPermissionRequest( |
171 const PermissionRequestID& id, | 171 const PermissionRequestID& id, |
172 const GURL& requesting_frame) { | 172 const GURL& requesting_frame) { |
173 geolocation_permission_context_->CancelGeolocationPermissionRequest( | 173 geolocation_permission_context_->CancelGeolocationPermissionRequest( |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 content::LoadCommittedDetails details; | 674 content::LoadCommittedDetails details; |
675 details.entry = web_contents()->GetController().GetLastCommittedEntry(); | 675 details.entry = web_contents()->GetController().GetLastCommittedEntry(); |
676 EXPECT_FALSE(infobar_delegate->ShouldExpire(details)); | 676 EXPECT_FALSE(infobar_delegate->ShouldExpire(details)); |
677 // Ensure the infobar will expire when we commit the pending navigation. | 677 // Ensure the infobar will expire when we commit the pending navigation. |
678 details.entry = web_contents()->GetController().GetActiveEntry(); | 678 details.entry = web_contents()->GetController().GetActiveEntry(); |
679 EXPECT_TRUE(infobar_delegate->ShouldExpire(details)); | 679 EXPECT_TRUE(infobar_delegate->ShouldExpire(details)); |
680 | 680 |
681 // Delete the tab contents. | 681 // Delete the tab contents. |
682 DeleteContents(); | 682 DeleteContents(); |
683 } | 683 } |
OLD | NEW |