| 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 <math.h> | 5 #include <math.h> |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 for (size_t i = 0; i < std::min(a.size(), b.size()); ++i) | 40 for (size_t i = 0; i < std::min(a.size(), b.size()); ++i) |
| 41 ExpectEquality(a[i], b[i]); | 41 ExpectEquality(a[i], b[i]); |
| 42 } | 42 } |
| 43 | 43 |
| 44 template <> | 44 template <> |
| 45 void ExpectEquality(const ExplodedHttpBodyElement& a, | 45 void ExpectEquality(const ExplodedHttpBodyElement& a, |
| 46 const ExplodedHttpBodyElement& b) { | 46 const ExplodedHttpBodyElement& b) { |
| 47 EXPECT_EQ(a.type, b.type); | 47 EXPECT_EQ(a.type, b.type); |
| 48 EXPECT_EQ(a.data, b.data); | 48 EXPECT_EQ(a.data, b.data); |
| 49 EXPECT_EQ(a.file_path, b.file_path); | 49 EXPECT_EQ(a.file_path, b.file_path); |
| 50 EXPECT_EQ(a.url, b.url); | 50 EXPECT_EQ(a.filesystem_url, b.filesystem_url); |
| 51 EXPECT_EQ(a.file_start, b.file_start); | 51 EXPECT_EQ(a.file_start, b.file_start); |
| 52 EXPECT_EQ(a.file_length, b.file_length); | 52 EXPECT_EQ(a.file_length, b.file_length); |
| 53 if (!(isnan(a.file_modification_time) && isnan(b.file_modification_time))) | 53 if (!(isnan(a.file_modification_time) && isnan(b.file_modification_time))) |
| 54 EXPECT_DOUBLE_EQ(a.file_modification_time, b.file_modification_time); | 54 EXPECT_DOUBLE_EQ(a.file_modification_time, b.file_modification_time); |
| 55 EXPECT_EQ(a.deprecated_blob_url, b.deprecated_blob_url); |
| 55 } | 56 } |
| 56 | 57 |
| 57 template <> | 58 template <> |
| 58 void ExpectEquality(const ExplodedHttpBody& a, const ExplodedHttpBody& b) { | 59 void ExpectEquality(const ExplodedHttpBody& a, const ExplodedHttpBody& b) { |
| 59 EXPECT_EQ(a.http_content_type, b.http_content_type); | 60 EXPECT_EQ(a.http_content_type, b.http_content_type); |
| 60 EXPECT_EQ(a.identifier, b.identifier); | 61 EXPECT_EQ(a.identifier, b.identifier); |
| 61 EXPECT_EQ(a.contains_passwords, b.contains_passwords); | 62 EXPECT_EQ(a.contains_passwords, b.contains_passwords); |
| 62 EXPECT_EQ(a.is_null, b.is_null); | 63 EXPECT_EQ(a.is_null, b.is_null); |
| 63 ExpectEquality(a.elements, b.elements); | 64 ExpectEquality(a.elements, b.elements); |
| 64 } | 65 } |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 TEST_F(PageStateSerializationTest, BackwardsCompat_v13) { | 423 TEST_F(PageStateSerializationTest, BackwardsCompat_v13) { |
| 423 TestBackwardsCompat(13); | 424 TestBackwardsCompat(13); |
| 424 } | 425 } |
| 425 | 426 |
| 426 TEST_F(PageStateSerializationTest, BackwardsCompat_v14) { | 427 TEST_F(PageStateSerializationTest, BackwardsCompat_v14) { |
| 427 TestBackwardsCompat(14); | 428 TestBackwardsCompat(14); |
| 428 } | 429 } |
| 429 | 430 |
| 430 } // namespace | 431 } // namespace |
| 431 } // namespace content | 432 } // namespace content |
| OLD | NEW |