| 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/drive/resource_entry_conversion.h" | 5 #include "chrome/browser/chromeos/drive/resource_entry_conversion.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/drive/drive.pb.h" | 10 #include "chrome/browser/chromeos/drive/drive.pb.h" |
| 11 #include "chrome/browser/chromeos/drive/file_system_util.h" | 11 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 12 #include "chrome/browser/chromeos/drive/test_util.h" | 12 #include "chrome/browser/chromeos/drive/test_util.h" |
| 13 #include "chrome/browser/google_apis/gdata_wapi_parser.h" | 13 #include "google_apis/drive/gdata_wapi_parser.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 namespace drive { | 16 namespace drive { |
| 17 | 17 |
| 18 TEST(ResourceEntryConversionTest, ConvertToResourceEntry_File) { | 18 TEST(ResourceEntryConversionTest, ConvertToResourceEntry_File) { |
| 19 scoped_ptr<base::Value> value = | 19 scoped_ptr<base::Value> value = |
| 20 google_apis::test_util::LoadJSONFile("gdata/file_entry.json"); | 20 google_apis::test_util::LoadJSONFile("gdata/file_entry.json"); |
| 21 ASSERT_TRUE(value.get()); | 21 ASSERT_TRUE(value.get()); |
| 22 | 22 |
| 23 scoped_ptr<google_apis::ResourceEntry> gdata_resource_entry( | 23 scoped_ptr<google_apis::ResourceEntry> gdata_resource_entry( |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 std::string parent_resource_id; | 427 std::string parent_resource_id; |
| 428 EXPECT_TRUE(ConvertToResourceEntry(entry_no_fields, &entry, | 428 EXPECT_TRUE(ConvertToResourceEntry(entry_no_fields, &entry, |
| 429 &parent_resource_id)); | 429 &parent_resource_id)); |
| 430 EXPECT_FALSE(entry.file_specific_info().has_image_width()); | 430 EXPECT_FALSE(entry.file_specific_info().has_image_width()); |
| 431 EXPECT_FALSE(entry.file_specific_info().has_image_height()); | 431 EXPECT_FALSE(entry.file_specific_info().has_image_height()); |
| 432 EXPECT_FALSE(entry.file_specific_info().has_image_rotation()); | 432 EXPECT_FALSE(entry.file_specific_info().has_image_rotation()); |
| 433 } | 433 } |
| 434 } | 434 } |
| 435 | 435 |
| 436 } // namespace drive | 436 } // namespace drive |
| OLD | NEW |