| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 EXPECT_EQ(bridge_id, responses_[process->GetID()].first); | 202 EXPECT_EQ(bridge_id, responses_[process->GetID()].first); |
| 203 EXPECT_EQ(allowed, responses_[process->GetID()].second); | 203 EXPECT_EQ(allowed, responses_[process->GetID()].second); |
| 204 responses_.erase(process->GetID()); | 204 responses_.erase(process->GetID()); |
| 205 } | 205 } |
| 206 | 206 |
| 207 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { | 207 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { |
| 208 content::WebContents* new_tab = content::WebContents::Create( | 208 content::WebContents* new_tab = content::WebContents::Create( |
| 209 content::WebContents::CreateParams(profile())); | 209 content::WebContents::CreateParams(profile())); |
| 210 new_tab->GetController().LoadURL( | 210 new_tab->GetController().LoadURL( |
| 211 url, content::Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); | 211 url, content::Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); |
| 212 content::RenderViewHostTester::For(new_tab->GetRenderViewHost())-> | 212 content::RenderFrameHostTester::For(new_tab->GetMainFrame()) |
| 213 SendNavigate(extra_tabs_.size() + 1, url); | 213 ->SendNavigate(extra_tabs_.size() + 1, url); |
| 214 | 214 |
| 215 // Set up required helpers, and make this be as "tabby" as the code requires. | 215 // Set up required helpers, and make this be as "tabby" as the code requires. |
| 216 #if defined(ENABLE_EXTENSIONS) | 216 #if defined(ENABLE_EXTENSIONS) |
| 217 extensions::SetViewType(new_tab, extensions::VIEW_TYPE_TAB_CONTENTS); | 217 extensions::SetViewType(new_tab, extensions::VIEW_TYPE_TAB_CONTENTS); |
| 218 #endif | 218 #endif |
| 219 InfoBarService::CreateForWebContents(new_tab); | 219 InfoBarService::CreateForWebContents(new_tab); |
| 220 | 220 |
| 221 extra_tabs_.push_back(new_tab); | 221 extra_tabs_.push_back(new_tab); |
| 222 } | 222 } |
| 223 | 223 |
| (...skipping 551 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 |