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

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

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 months 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) 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 <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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 EXPECT_EQ(bridge_id, responses_[process->GetID()].first); 200 EXPECT_EQ(bridge_id, responses_[process->GetID()].first);
201 EXPECT_EQ(allowed, responses_[process->GetID()].second); 201 EXPECT_EQ(allowed, responses_[process->GetID()].second);
202 responses_.erase(process->GetID()); 202 responses_.erase(process->GetID());
203 } 203 }
204 204
205 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { 205 void GeolocationPermissionContextTests::AddNewTab(const GURL& url) {
206 WebContents* new_tab = 206 WebContents* new_tab =
207 WebContents::Create(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); 207 WebContents::Create(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL);
208 new_tab->GetController().LoadURL( 208 new_tab->GetController().LoadURL(
209 url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); 209 url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string());
210 static_cast<TestRenderViewHost*>(new_tab->GetRenderViewHost())-> 210 static_cast<content::TestRenderViewHost*>(new_tab->GetRenderViewHost())->
211 SendNavigate(extra_tabs_.size() + 1, url); 211 SendNavigate(extra_tabs_.size() + 1, url);
212 extra_tabs_.push_back(new TabContentsWrapper(new_tab)); 212 extra_tabs_.push_back(new TabContentsWrapper(new_tab));
213 } 213 }
214 214
215 void GeolocationPermissionContextTests::CheckTabContentsState( 215 void GeolocationPermissionContextTests::CheckTabContentsState(
216 const GURL& requesting_frame, 216 const GURL& requesting_frame,
217 ContentSetting expected_content_setting) { 217 ContentSetting expected_content_setting) {
218 TabSpecificContentSettings* content_settings = 218 TabSpecificContentSettings* content_settings =
219 contents_wrapper()->content_settings(); 219 contents_wrapper()->content_settings();
220 const GeolocationSettingsState::StateMap& state_map = 220 const GeolocationSettingsState::StateMap& state_map =
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 ASSERT_FALSE(infobar_0->ShouldExpire(details)); 588 ASSERT_FALSE(infobar_0->ShouldExpire(details));
589 // Commit the "GoBack()" above, and ensure the infobar is now expired. 589 // Commit the "GoBack()" above, and ensure the infobar is now expired.
590 contents()->CommitPendingNavigation(); 590 contents()->CommitPendingNavigation();
591 details.entry = contents()->GetController().GetLastCommittedEntry(); 591 details.entry = contents()->GetController().GetLastCommittedEntry();
592 ASSERT_TRUE(infobar_0->ShouldExpire(details)); 592 ASSERT_TRUE(infobar_0->ShouldExpire(details));
593 593
594 // Delete the tab contents. 594 // Delete the tab contents.
595 DeleteContents(); 595 DeleteContents();
596 infobar_0->InfoBarClosed(); 596 infobar_0->InfoBarClosed();
597 } 597 }
OLDNEW
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/geolocation/geolocation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698