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" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "content/common/page_state_serialization.h" | 14 #include "content/common/page_state_serialization.h" |
15 #include "content/public/common/content_paths.h" | 15 #include "content/public/common/content_paths.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 namespace { | 19 namespace { |
20 | 20 |
21 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
22 inline bool isnan(double num) { return !!_isnan(num); } | 22 inline bool isnan(double num) { return !!_isnan(num); } |
23 #endif | 23 #endif |
24 | 24 |
25 base::NullableString16 NS16(const char* s) { | 25 base::NullableString16 NS16(const char* s) { |
26 return s ? base::NullableString16(ASCIIToUTF16(s), false) : | 26 return s ? base::NullableString16(base::ASCIIToUTF16(s), false) : |
27 base::NullableString16(); | 27 base::NullableString16(); |
28 } | 28 } |
29 | 29 |
30 //----------------------------------------------------------------------------- | 30 //----------------------------------------------------------------------------- |
31 | 31 |
32 template <typename T> | 32 template <typename T> |
33 void ExpectEquality(const T& a, const T& b) { | 33 void ExpectEquality(const T& a, const T& b) { |
34 EXPECT_EQ(a, b); | 34 EXPECT_EQ(a, b); |
35 } | 35 } |
36 | 36 |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 TEST_F(PageStateSerializationTest, BackwardsCompat_v15) { | 416 TEST_F(PageStateSerializationTest, BackwardsCompat_v15) { |
417 TestBackwardsCompat(15); | 417 TestBackwardsCompat(15); |
418 } | 418 } |
419 | 419 |
420 TEST_F(PageStateSerializationTest, BackwardsCompat_v16) { | 420 TEST_F(PageStateSerializationTest, BackwardsCompat_v16) { |
421 TestBackwardsCompat(16); | 421 TestBackwardsCompat(16); |
422 } | 422 } |
423 | 423 |
424 } // namespace | 424 } // namespace |
425 } // namespace content | 425 } // namespace content |
OLD | NEW |