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

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

Issue 11587003: Make ChromeGeolocationPermissionContextFactory a ProfileKeyedServiceFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address sky's comments. Created 7 years, 11 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 ChromeRenderViewHostTestHarness::SetUp(); 257 ChromeRenderViewHostTestHarness::SetUp();
258 258
259 // Set up required helpers, and make this be as "tabby" as the code requires. 259 // Set up required helpers, and make this be as "tabby" as the code requires.
260 chrome::SetViewType(web_contents(), chrome::VIEW_TYPE_TAB_CONTENTS); 260 chrome::SetViewType(web_contents(), chrome::VIEW_TYPE_TAB_CONTENTS);
261 InfoBarService::CreateForWebContents(web_contents()); 261 InfoBarService::CreateForWebContents(web_contents());
262 TabSpecificContentSettings::CreateForWebContents(web_contents()); 262 TabSpecificContentSettings::CreateForWebContents(web_contents());
263 #if defined(OS_ANDROID) 263 #if defined(OS_ANDROID)
264 MockGoogleLocationSettingsHelper::SetLocationStatus(true, true); 264 MockGoogleLocationSettingsHelper::SetLocationStatus(true, true);
265 #endif 265 #endif
266 geolocation_permission_context_ = 266 geolocation_permission_context_ =
267 ChromeGeolocationPermissionContextFactory::Create(profile()); 267 ChromeGeolocationPermissionContextFactory::GetForProfile(profile());
268 } 268 }
269 269
270 void GeolocationPermissionContextTests::TearDown() { 270 void GeolocationPermissionContextTests::TearDown() {
271 extra_tabs_.clear(); 271 extra_tabs_.clear();
272 ChromeRenderViewHostTestHarness::TearDown(); 272 ChromeRenderViewHostTestHarness::TearDown();
273 // Schedule another task on the DB thread to notify us that it's safe to 273 // Schedule another task on the DB thread to notify us that it's safe to
274 // carry on with the test. 274 // carry on with the test.
275 base::WaitableEvent done(false, false); 275 base::WaitableEvent done(false, false);
276 content::BrowserThread::PostTask( 276 content::BrowserThread::PostTask(
277 content::BrowserThread::DB, FROM_HERE, 277 content::BrowserThread::DB, FROM_HERE,
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 details.entry = web_contents()->GetController().GetLastCommittedEntry(); 675 details.entry = web_contents()->GetController().GetLastCommittedEntry();
676 EXPECT_FALSE(infobar_0->ShouldExpire(details)); 676 EXPECT_FALSE(infobar_0->ShouldExpire(details));
677 // Ensure the infobar will expire when we commit the pending navigation. 677 // Ensure the infobar will expire when we commit the pending navigation.
678 details.entry = web_contents()->GetController().GetActiveEntry(); 678 details.entry = web_contents()->GetController().GetActiveEntry();
679 EXPECT_TRUE(infobar_0->ShouldExpire(details)); 679 EXPECT_TRUE(infobar_0->ShouldExpire(details));
680 680
681 // Delete the tab contents. 681 // Delete the tab contents.
682 DeleteContents(); 682 DeleteContents();
683 delete infobar_0; 683 delete infobar_0;
684 } 684 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698