| OLD | NEW |
| 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/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "chrome/browser/chromeos/contacts/contact.pb.h" | 13 #include "chrome/browser/chromeos/contacts/contact.pb.h" |
| 14 #include "chrome/browser/chromeos/contacts/contact_test_util.h" | 14 #include "chrome/browser/chromeos/contacts/contact_test_util.h" |
| 15 #include "chrome/browser/google_apis/auth_service.h" | 15 #include "chrome/browser/google_apis/auth_service.h" |
| 16 #include "chrome/browser/google_apis/test_server/http_request.h" | |
| 17 #include "chrome/browser/google_apis/test_server/http_response.h" | |
| 18 #include "chrome/browser/google_apis/test_server/http_server.h" | |
| 19 #include "chrome/browser/google_apis/test_util.h" | 16 #include "chrome/browser/google_apis/test_util.h" |
| 20 #include "chrome/browser/google_apis/time_util.h" | 17 #include "chrome/browser/google_apis/time_util.h" |
| 21 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 22 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
| 23 #include "chrome/test/base/in_process_browser_test.h" | 20 #include "chrome/test/base/in_process_browser_test.h" |
| 24 #include "chrome/test/base/testing_profile.h" | 21 #include "chrome/test/base/testing_profile.h" |
| 25 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 26 #include "content/public/test/test_browser_thread.h" | 23 #include "content/public/test/test_browser_thread.h" |
| 27 #include "content/public/test/test_utils.h" | 24 #include "content/public/test/test_utils.h" |
| 25 #include "net/test/embedded_test_server/http_request.h" |
| 26 #include "net/test/embedded_test_server/http_response.h" |
| 27 #include "net/test/embedded_test_server/http_server.h" |
| 28 #include "net/url_request/url_request_test_util.h" | 28 #include "net/url_request/url_request_test_util.h" |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 #include "ui/gfx/size.h" | 30 #include "ui/gfx/size.h" |
| 31 | 31 |
| 32 using content::BrowserThread; | 32 using content::BrowserThread; |
| 33 | 33 |
| 34 namespace contacts { | 34 namespace contacts { |
| 35 namespace { | 35 namespace { |
| 36 | 36 |
| 37 const char kTestGDataAuthToken[] = "testtoken"; | 37 const char kTestGDataAuthToken[] = "testtoken"; |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 scoped_ptr<contacts::Contact> contact2(new contacts::Contact); | 337 scoped_ptr<contacts::Contact> contact2(new contacts::Contact); |
| 338 InitContact("http://example.com/2", "2012-06-21T16:20:13.208Z", | 338 InitContact("http://example.com/2", "2012-06-21T16:20:13.208Z", |
| 339 false, "Bob Smith", "Bob", "", "Smith", "", "", | 339 false, "Bob Smith", "Bob", "", "Smith", "", "", |
| 340 contact2.get()); | 340 contact2.get()); |
| 341 EXPECT_EQ(contacts::test::VarContactsToString( | 341 EXPECT_EQ(contacts::test::VarContactsToString( |
| 342 2, contact1.get(), contact2.get()), | 342 2, contact1.get(), contact2.get()), |
| 343 contacts::test::ContactsToString(*contacts)); | 343 contacts::test::ContactsToString(*contacts)); |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace contacts | 346 } // namespace contacts |
| OLD | NEW |