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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 ASSERT_EQ(responses_.count(process->GetID()), 1U); | 211 ASSERT_EQ(responses_.count(process->GetID()), 1U); |
212 EXPECT_EQ(bridge_id, responses_[process->GetID()].first); | 212 EXPECT_EQ(bridge_id, responses_[process->GetID()].first); |
213 EXPECT_EQ(allowed, responses_[process->GetID()].second); | 213 EXPECT_EQ(allowed, responses_[process->GetID()].second); |
214 responses_.erase(process->GetID()); | 214 responses_.erase(process->GetID()); |
215 } | 215 } |
216 | 216 |
217 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { | 217 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { |
218 content::WebContents* new_tab = content::WebContents::Create( | 218 content::WebContents* new_tab = content::WebContents::Create( |
219 content::WebContents::CreateParams(profile())); | 219 content::WebContents::CreateParams(profile())); |
220 new_tab->GetController().LoadURL( | 220 new_tab->GetController().LoadURL( |
221 url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); | 221 url, content::Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); |
222 content::RenderViewHostTester::For(new_tab->GetRenderViewHost())-> | 222 content::RenderViewHostTester::For(new_tab->GetRenderViewHost())-> |
223 SendNavigate(extra_tabs_.size() + 1, url); | 223 SendNavigate(extra_tabs_.size() + 1, url); |
224 | 224 |
225 // Set up required helpers, and make this be as "tabby" as the code requires. | 225 // Set up required helpers, and make this be as "tabby" as the code requires. |
226 #if defined(ENABLE_EXTENSIONS) | 226 #if defined(ENABLE_EXTENSIONS) |
227 extensions::SetViewType(new_tab, extensions::VIEW_TYPE_TAB_CONTENTS); | 227 extensions::SetViewType(new_tab, extensions::VIEW_TYPE_TAB_CONTENTS); |
228 #endif | 228 #endif |
229 InfoBarService::CreateForWebContents(new_tab); | 229 InfoBarService::CreateForWebContents(new_tab); |
230 | 230 |
231 extra_tabs_.push_back(new_tab); | 231 extra_tabs_.push_back(new_tab); |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 // it is the embedder. | 815 // it is the embedder. |
816 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(), | 816 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(), |
817 requesting_frame_0.GetOrigin(), | 817 requesting_frame_0.GetOrigin(), |
818 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), | 818 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), |
819 13); | 819 13); |
820 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(), | 820 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(), |
821 requesting_frame_0.GetOrigin(), | 821 requesting_frame_0.GetOrigin(), |
822 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), | 822 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), |
823 11); | 823 11); |
824 } | 824 } |
OLD | NEW |