| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "chrome/browser/media_galleries/fileapi/picasa/pmp_column_reader.h" |
| 10 #include "chrome/browser/media_galleries/fileapi/picasa/pmp_constants.h" |
| 11 #include "chrome/browser/media_galleries/fileapi/picasa/pmp_test_helper.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "webkit/fileapi/media/picasa/pmp_column_reader.h" | |
| 11 #include "webkit/fileapi/media/picasa/pmp_constants.h" | |
| 12 #include "webkit/fileapi/media/picasa/pmp_test_helper.h" | |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 using picasaimport::PmpColumnReader; | 16 using picasaimport::PmpColumnReader; |
| 17 using picasaimport::PmpTestHelper; | 17 using picasaimport::PmpTestHelper; |
| 18 | 18 |
| 19 // Overridden version of Read method to make test code templatable. | 19 // Overridden version of Read method to make test code templatable. |
| 20 bool DoRead(const PmpColumnReader* reader, uint32 row, std::string* target) { | 20 bool DoRead(const PmpColumnReader* reader, uint32 row, std::string* target) { |
| 21 return reader->ReadString(row, target); | 21 return reader->ReadString(row, target); |
| 22 } | 22 } |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 } | 170 } |
| 171 | 171 |
| 172 TEST(PmpColumnReaderTest, PrimitiveParsing) { | 172 TEST(PmpColumnReaderTest, PrimitiveParsing) { |
| 173 TestPrimitive<uint32>(picasaimport::PMP_TYPE_UINT32); | 173 TestPrimitive<uint32>(picasaimport::PMP_TYPE_UINT32); |
| 174 TestPrimitive<double>(picasaimport::PMP_TYPE_DOUBLE64); | 174 TestPrimitive<double>(picasaimport::PMP_TYPE_DOUBLE64); |
| 175 TestPrimitive<uint8>(picasaimport::PMP_TYPE_UINT8); | 175 TestPrimitive<uint8>(picasaimport::PMP_TYPE_UINT8); |
| 176 TestPrimitive<uint64>(picasaimport::PMP_TYPE_UINT64); | 176 TestPrimitive<uint64>(picasaimport::PMP_TYPE_UINT64); |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace | 179 } // namespace |
| OLD | NEW |