Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc

Issue 8785004: Change NavigationController::LoadURL to take a Referrer class instead of a GURL as referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/external_tab_container_win.cc ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 bool allowed) { 203 bool allowed) {
204 ASSERT_EQ(responses_.count(process->GetID()), 1U); 204 ASSERT_EQ(responses_.count(process->GetID()), 1U);
205 EXPECT_EQ(bridge_id, responses_[process->GetID()].first); 205 EXPECT_EQ(bridge_id, responses_[process->GetID()].first);
206 EXPECT_EQ(allowed, responses_[process->GetID()].second); 206 EXPECT_EQ(allowed, responses_[process->GetID()].second);
207 responses_.erase(process->GetID()); 207 responses_.erase(process->GetID());
208 } 208 }
209 209
210 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { 210 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) {
211 TabContents* new_tab = 211 TabContents* new_tab =
212 new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); 212 new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL);
213 new_tab->controller().LoadURL(url, GURL(), content::PAGE_TRANSITION_TYPED, 213 new_tab->controller().LoadURL(url, content::Referrer(),
214 std::string()); 214 content::PAGE_TRANSITION_TYPED, std::string());
215 static_cast<TestRenderViewHost*>(new_tab->render_manager_for_testing()-> 215 static_cast<TestRenderViewHost*>(new_tab->render_manager_for_testing()->
216 current_host())->SendNavigate(extra_tabs_.size() + 1, url); 216 current_host())->SendNavigate(extra_tabs_.size() + 1, url);
217 extra_tabs_.push_back(new TabContentsWrapper(new_tab)); 217 extra_tabs_.push_back(new TabContentsWrapper(new_tab));
218 } 218 }
219 219
220 void GeolocationPermissionContextTests::CheckTabContentsState( 220 void GeolocationPermissionContextTests::CheckTabContentsState(
221 const GURL& requesting_frame, 221 const GURL& requesting_frame,
222 ContentSetting expected_content_setting) { 222 ContentSetting expected_content_setting) {
223 TabSpecificContentSettings* content_settings = 223 TabSpecificContentSettings* content_settings =
224 contents_wrapper()->content_settings(); 224 contents_wrapper()->content_settings();
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 ASSERT_FALSE(infobar_0->ShouldExpire(details)); 594 ASSERT_FALSE(infobar_0->ShouldExpire(details));
595 // Commit the "GoBack()" above, and ensure the infobar is now expired. 595 // Commit the "GoBack()" above, and ensure the infobar is now expired.
596 contents()->CommitPendingNavigation(); 596 contents()->CommitPendingNavigation();
597 details.entry = contents()->controller().GetLastCommittedEntry(); 597 details.entry = contents()->controller().GetLastCommittedEntry();
598 ASSERT_TRUE(infobar_0->ShouldExpire(details)); 598 ASSERT_TRUE(infobar_0->ShouldExpire(details));
599 599
600 // Delete the tab contents. 600 // Delete the tab contents.
601 DeleteContents(); 601 DeleteContents();
602 infobar_0->InfoBarClosed(); 602 infobar_0->InfoBarClosed();
603 } 603 }
OLDNEW
« no previous file with comments | « chrome/browser/external_tab_container_win.cc ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698