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

Side by Side Diff: chrome/browser/chromeos/contacts/gdata_contacts_service_unittest.cc

Issue 15740023: Revert "Revert 202112 "GTTF: Convert most tests in content to use Embedd..."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/oobe_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/chromeos/contacts/gdata_contacts_service.h" 5 #include "chrome/browser/chromeos/contacts/gdata_contacts_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 downloaded_contacts_.reset(new ScopedVector<contacts::Contact>()); 160 downloaded_contacts_.reset(new ScopedVector<contacts::Contact>());
161 MessageLoop::current()->Quit(); 161 MessageLoop::current()->Quit();
162 } 162 }
163 163
164 // Handles a request for downloading a file. Reads a requested file and 164 // Handles a request for downloading a file. Reads a requested file and
165 // returns the content. 165 // returns the content.
166 scoped_ptr<net::test_server::HttpResponse> HandleDownloadRequest( 166 scoped_ptr<net::test_server::HttpResponse> HandleDownloadRequest(
167 const net::test_server::HttpRequest& request) { 167 const net::test_server::HttpRequest& request) {
168 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 168 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
169 // Requested url must not contain a query string. 169 // Requested url must not contain a query string.
170 scoped_ptr<net::test_server::HttpResponse> result = 170 scoped_ptr<net::test_server::BasicHttpResponse> result =
171 google_apis::test_util::CreateHttpResponseFromFile( 171 google_apis::test_util::CreateHttpResponseFromFile(
172 google_apis::test_util::GetTestFilePath( 172 google_apis::test_util::GetTestFilePath(
173 std::string("chromeos/gdata/contacts") + request.relative_url)); 173 std::string("chromeos/gdata/contacts") + request.relative_url));
174 return result.Pass(); 174 return result.PassAs<net::test_server::HttpResponse>();
175 } 175 }
176 176
177 MessageLoopForUI message_loop_; 177 MessageLoopForUI message_loop_;
178 content::TestBrowserThread ui_thread_; 178 content::TestBrowserThread ui_thread_;
179 content::TestBrowserThread io_thread_; 179 content::TestBrowserThread io_thread_;
180 scoped_ptr<TestingProfile> profile_; 180 scoped_ptr<TestingProfile> profile_;
181 scoped_refptr<net::TestURLRequestContextGetter> request_context_getter_; 181 scoped_refptr<net::TestURLRequestContextGetter> request_context_getter_;
182 182
183 // Was the last download successful? Used to pass the result back from 183 // Was the last download successful? Used to pass the result back from
184 // OnSuccess() and OnFailure() to Download(). 184 // OnSuccess() and OnFailure() to Download().
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 scoped_ptr<contacts::Contact> contact2(new contacts::Contact); 336 scoped_ptr<contacts::Contact> contact2(new contacts::Contact);
337 InitContact("http://example.com/2", "2012-06-21T16:20:13.208Z", 337 InitContact("http://example.com/2", "2012-06-21T16:20:13.208Z",
338 false, "Bob Smith", "Bob", "", "Smith", "", "", 338 false, "Bob Smith", "Bob", "", "Smith", "", "",
339 contact2.get()); 339 contact2.get());
340 EXPECT_EQ(contacts::test::VarContactsToString( 340 EXPECT_EQ(contacts::test::VarContactsToString(
341 2, contact1.get(), contact2.get()), 341 2, contact1.get(), contact2.get()),
342 contacts::test::ContactsToString(*contacts)); 342 contacts::test::ContactsToString(*contacts));
343 } 343 }
344 344
345 } // namespace contacts 345 } // namespace contacts
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/oobe_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698