| 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/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "net/test/embedded_test_server/http_response.h" | 24 #include "net/test/embedded_test_server/http_response.h" |
| 25 #include "net/url_request/url_request_test_util.h" | 25 #include "net/url_request/url_request_test_util.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 #include "ui/gfx/size.h" | 27 #include "ui/gfx/size.h" |
| 28 | 28 |
| 29 using content::BrowserThread; | 29 using content::BrowserThread; |
| 30 | 30 |
| 31 namespace contacts { | 31 namespace contacts { |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 const char kTestGDataAuthToken[] = "testtoken"; | |
| 35 | |
| 36 // Filename of JSON feed containing contact groups. | 34 // Filename of JSON feed containing contact groups. |
| 37 const char kGroupsFeedFilename[] = "/groups.json"; | 35 const char kGroupsFeedFilename[] = "/groups.json"; |
| 38 | 36 |
| 39 // Width and height of /photo.png on the test server. | 37 // Width and height of /photo.png on the test server. |
| 40 const int kPhotoSize = 48; | 38 const int kPhotoSize = 48; |
| 41 | 39 |
| 42 // Initializes |contact| using the passed-in values. | 40 // Initializes |contact| using the passed-in values. |
| 43 void InitContact(const std::string& contact_id, | 41 void InitContact(const std::string& contact_id, |
| 44 const std::string& rfc_3339_update_time, | 42 const std::string& rfc_3339_update_time, |
| 45 bool deleted, | 43 bool deleted, |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 scoped_ptr<contacts::Contact> contact2(new contacts::Contact); | 326 scoped_ptr<contacts::Contact> contact2(new contacts::Contact); |
| 329 InitContact("http://example.com/2", "2012-06-21T16:20:13.208Z", | 327 InitContact("http://example.com/2", "2012-06-21T16:20:13.208Z", |
| 330 false, "Bob Smith", "Bob", "", "Smith", "", "", | 328 false, "Bob Smith", "Bob", "", "Smith", "", "", |
| 331 contact2.get()); | 329 contact2.get()); |
| 332 EXPECT_EQ(contacts::test::VarContactsToString( | 330 EXPECT_EQ(contacts::test::VarContactsToString( |
| 333 2, contact1.get(), contact2.get()), | 331 2, contact1.get(), contact2.get()), |
| 334 contacts::test::ContactsToString(*contacts)); | 332 contacts::test::ContactsToString(*contacts)); |
| 335 } | 333 } |
| 336 | 334 |
| 337 } // namespace contacts | 335 } // namespace contacts |
| OLD | NEW |