| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 GeolocationMsg_PermissionSet::Param param; | 167 GeolocationMsg_PermissionSet::Param param; |
| 168 GeolocationMsg_PermissionSet::Read(message, ¶m); | 168 GeolocationMsg_PermissionSet::Read(message, ¶m); |
| 169 EXPECT_EQ(bridge_id, param.a); | 169 EXPECT_EQ(bridge_id, param.a); |
| 170 EXPECT_EQ(allowed, param.b); | 170 EXPECT_EQ(allowed, param.b); |
| 171 process->sink().ClearMessages(); | 171 process->sink().ClearMessages(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { | 174 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { |
| 175 TabContents* new_tab = | 175 TabContents* new_tab = |
| 176 new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); | 176 new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); |
| 177 new_tab->controller().LoadURL(url, GURL(), PageTransition::TYPED, | 177 new_tab->controller().LoadURL(url, GURL(), content::PAGE_TRANSITION_TYPED, |
| 178 std::string()); | 178 std::string()); |
| 179 static_cast<TestRenderViewHost*>(new_tab->render_manager_for_testing()-> | 179 static_cast<TestRenderViewHost*>(new_tab->render_manager_for_testing()-> |
| 180 current_host())->SendNavigate(extra_tabs_.size() + 1, url); | 180 current_host())->SendNavigate(extra_tabs_.size() + 1, url); |
| 181 extra_tabs_.push_back(new TabContentsWrapper(new_tab)); | 181 extra_tabs_.push_back(new TabContentsWrapper(new_tab)); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void GeolocationPermissionContextTests::CheckTabContentsState( | 184 void GeolocationPermissionContextTests::CheckTabContentsState( |
| 185 const GURL& requesting_frame, | 185 const GURL& requesting_frame, |
| 186 ContentSetting expected_content_setting) { | 186 ContentSetting expected_content_setting) { |
| 187 TabSpecificContentSettings* content_settings = | 187 TabSpecificContentSettings* content_settings = |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 // Ensure only one infobar is created. | 528 // Ensure only one infobar is created. |
| 529 ASSERT_EQ(1U, infobar_tab_helper()->infobar_count()); | 529 ASSERT_EQ(1U, infobar_tab_helper()->infobar_count()); |
| 530 ConfirmInfoBarDelegate* infobar_0 = infobar_tab_helper()-> | 530 ConfirmInfoBarDelegate* infobar_0 = infobar_tab_helper()-> |
| 531 GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); | 531 GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); |
| 532 ASSERT_TRUE(infobar_0); | 532 ASSERT_TRUE(infobar_0); |
| 533 | 533 |
| 534 // Delete the tab contents. | 534 // Delete the tab contents. |
| 535 DeleteContents(); | 535 DeleteContents(); |
| 536 infobar_0->InfoBarClosed(); | 536 infobar_0->InfoBarClosed(); |
| 537 } | 537 } |
| OLD | NEW |