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

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

Issue 8949061: Move a bunch of methods from TabContents into the WebContents interface. This change either moves... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 EXPECT_EQ(bridge_id, responses_[process->GetID()].first); 204 EXPECT_EQ(bridge_id, responses_[process->GetID()].first);
205 EXPECT_EQ(allowed, responses_[process->GetID()].second); 205 EXPECT_EQ(allowed, responses_[process->GetID()].second);
206 responses_.erase(process->GetID()); 206 responses_.erase(process->GetID());
207 } 207 }
208 208
209 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { 209 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) {
210 TabContents* new_tab = 210 TabContents* new_tab =
211 new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); 211 new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL);
212 new_tab->GetController().LoadURL( 212 new_tab->GetController().LoadURL(
213 url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); 213 url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string());
214 static_cast<TestRenderViewHost*>(new_tab->render_manager_for_testing()-> 214 static_cast<TestRenderViewHost*>(new_tab->GetRenderManagerForTesting()->
215 current_host())->SendNavigate(extra_tabs_.size() + 1, url); 215 current_host())->SendNavigate(extra_tabs_.size() + 1, url);
216 extra_tabs_.push_back(new TabContentsWrapper(new_tab)); 216 extra_tabs_.push_back(new TabContentsWrapper(new_tab));
217 } 217 }
218 218
219 void GeolocationPermissionContextTests::CheckTabContentsState( 219 void GeolocationPermissionContextTests::CheckTabContentsState(
220 const GURL& requesting_frame, 220 const GURL& requesting_frame,
221 ContentSetting expected_content_setting) { 221 ContentSetting expected_content_setting) {
222 TabSpecificContentSettings* content_settings = 222 TabSpecificContentSettings* content_settings =
223 contents_wrapper()->content_settings(); 223 contents_wrapper()->content_settings();
224 const GeolocationSettingsState::StateMap& state_map = 224 const GeolocationSettingsState::StateMap& state_map =
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 ASSERT_FALSE(infobar_0->ShouldExpire(details)); 593 ASSERT_FALSE(infobar_0->ShouldExpire(details));
594 // Commit the "GoBack()" above, and ensure the infobar is now expired. 594 // Commit the "GoBack()" above, and ensure the infobar is now expired.
595 contents()->CommitPendingNavigation(); 595 contents()->CommitPendingNavigation();
596 details.entry = contents()->GetController().GetLastCommittedEntry(); 596 details.entry = contents()->GetController().GetLastCommittedEntry();
597 ASSERT_TRUE(infobar_0->ShouldExpire(details)); 597 ASSERT_TRUE(infobar_0->ShouldExpire(details));
598 598
599 // Delete the tab contents. 599 // Delete the tab contents.
600 DeleteContents(); 600 DeleteContents();
601 infobar_0->InfoBarClosed(); 601 infobar_0->InfoBarClosed();
602 } 602 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698