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

Side by Side Diff: chrome/test/live_sync/live_bookmarks_sync_test.cc

Issue 214047: Allow an entire InProcessBrowserTest subclass to configure the host resolver ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #ifdef CHROME_PERSONALIZATION 4 #ifdef CHROME_PERSONALIZATION
5 5
6 #include "chrome/test/live_sync/live_bookmarks_sync_test.h" 6 #include "chrome/test/live_sync/live_bookmarks_sync_test.h"
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // static 76 // static
77 Profile* LiveBookmarksSyncTest::MakeProfile(const string16& name) { 77 Profile* LiveBookmarksSyncTest::MakeProfile(const string16& name) {
78 string16 path_string; 78 string16 path_string;
79 PathService::Get(chrome::DIR_USER_DATA, &path_string); 79 PathService::Get(chrome::DIR_USER_DATA, &path_string);
80 file_util::AppendToPath(&path_string, name); 80 file_util::AppendToPath(&path_string, name);
81 FilePath path(path_string); 81 FilePath path(path_string);
82 return ProfileManager::CreateProfile(path, name, L"", L""); 82 return ProfileManager::CreateProfile(path, name, L"", L"");
83 } 83 }
84 84
85 void LiveBookmarksSyncTest::SetUpInProcessBrowserTestFixture() {
86 // We don't take a reference to |resolver|, but mock_host_resolver_override_
87 // does, so effectively assumes ownership.
88 net::RuleBasedHostResolverProc* resolver =
89 new net::RuleBasedHostResolverProc(host_resolver());
90 resolver->AllowDirectLookup("*.google.com");
91 mock_host_resolver_override_.reset(
92 new net::ScopedDefaultHostResolverProc(resolver));
93 }
94
95 void LiveBookmarksSyncTest::TearDownInProcessBrowserTestFixture() {
96 mock_host_resolver_override_.reset();
97 }
98
85 #endif // CHROME_PERSONALIZATION 99 #endif // CHROME_PERSONALIZATION
OLDNEW
« no previous file with comments | « chrome/test/live_sync/live_bookmarks_sync_test.h ('k') | chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698