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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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.filesystem_url, b.filesystem_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 #ifdef USE_BLOB_UUIDS | |
56 EXPECT_EQ(a.blob_uuid, b.blob_uuid); | 55 EXPECT_EQ(a.blob_uuid, b.blob_uuid); |
57 #else | |
58 EXPECT_EQ(a.deprecated_blob_url, b.deprecated_blob_url); | |
59 #endif | |
60 } | 56 } |
61 | 57 |
62 template <> | 58 template <> |
63 void ExpectEquality(const ExplodedHttpBody& a, const ExplodedHttpBody& b) { | 59 void ExpectEquality(const ExplodedHttpBody& a, const ExplodedHttpBody& b) { |
64 EXPECT_EQ(a.http_content_type, b.http_content_type); | 60 EXPECT_EQ(a.http_content_type, b.http_content_type); |
65 EXPECT_EQ(a.identifier, b.identifier); | 61 EXPECT_EQ(a.identifier, b.identifier); |
66 EXPECT_EQ(a.contains_passwords, b.contains_passwords); | 62 EXPECT_EQ(a.contains_passwords, b.contains_passwords); |
67 EXPECT_EQ(a.is_null, b.is_null); | 63 EXPECT_EQ(a.is_null, b.is_null); |
68 ExpectEquality(a.elements, b.elements); | 64 ExpectEquality(a.elements, b.elements); |
69 } | 65 } |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 TEST_F(PageStateSerializationTest, BackwardsCompat_v14) { | 409 TEST_F(PageStateSerializationTest, BackwardsCompat_v14) { |
414 TestBackwardsCompat(14); | 410 TestBackwardsCompat(14); |
415 } | 411 } |
416 | 412 |
417 TEST_F(PageStateSerializationTest, BackwardsCompat_v15) { | 413 TEST_F(PageStateSerializationTest, BackwardsCompat_v15) { |
418 TestBackwardsCompat(15); | 414 TestBackwardsCompat(15); |
419 } | 415 } |
420 | 416 |
421 } // namespace | 417 } // namespace |
422 } // namespace content | 418 } // namespace content |
OLD | NEW |