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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 content::TestBrowserThread ui_thread_; 142 content::TestBrowserThread ui_thread_;
143 content::TestBrowserThread db_thread_; 143 content::TestBrowserThread db_thread_;
144 144
145 // A map between renderer child id and a pair represending the bridge id and 145 // A map between renderer child id and a pair represending the bridge id and
146 // whether the requested permission was allowed. 146 // whether the requested permission was allowed.
147 base::hash_map<int, std::pair<int, bool> > responses_; 147 base::hash_map<int, std::pair<int, bool> > responses_;
148 }; 148 };
149 149
150 GeolocationPermissionContextTests::GeolocationPermissionContextTests() 150 GeolocationPermissionContextTests::GeolocationPermissionContextTests()
151 : ChromeRenderViewHostTestHarness(), 151 : ChromeRenderViewHostTestHarness(),
152 ui_thread_(content::BrowserThread::UI, MessageLoop::current()), 152 ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()),
153 db_thread_(content::BrowserThread::DB) { 153 db_thread_(content::BrowserThread::DB) {}
154 }
155 154
156 GeolocationPermissionContextTests::~GeolocationPermissionContextTests() { 155 GeolocationPermissionContextTests::~GeolocationPermissionContextTests() {
157 } 156 }
158 157
159 GeolocationPermissionRequestID GeolocationPermissionContextTests::RequestID( 158 GeolocationPermissionRequestID GeolocationPermissionContextTests::RequestID(
160 int bridge_id) { 159 int bridge_id) {
161 return GeolocationPermissionRequestID( 160 return GeolocationPermissionRequestID(
162 web_contents()->GetRenderProcessHost()->GetID(), 161 web_contents()->GetRenderProcessHost()->GetID(),
163 web_contents()->GetRenderViewHost()->GetRoutingID(), 162 web_contents()->GetRenderViewHost()->GetRoutingID(),
164 bridge_id); 163 bridge_id);
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 details.entry = web_contents()->GetController().GetLastCommittedEntry(); 699 details.entry = web_contents()->GetController().GetLastCommittedEntry();
701 EXPECT_FALSE(infobar_0->ShouldExpire(details)); 700 EXPECT_FALSE(infobar_0->ShouldExpire(details));
702 // Ensure the infobar will expire when we commit the pending navigation. 701 // Ensure the infobar will expire when we commit the pending navigation.
703 details.entry = web_contents()->GetController().GetActiveEntry(); 702 details.entry = web_contents()->GetController().GetActiveEntry();
704 EXPECT_TRUE(infobar_0->ShouldExpire(details)); 703 EXPECT_TRUE(infobar_0->ShouldExpire(details));
705 704
706 // Delete the tab contents. 705 // Delete the tab contents.
707 DeleteContents(); 706 DeleteContents();
708 delete infobar_0; 707 delete infobar_0;
709 } 708 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698