OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 static bool StringDictionaryValueEquals(const DictionaryValue& a, | 52 static bool StringDictionaryValueEquals(const DictionaryValue& a, |
53 const DictionaryValue& b) { | 53 const DictionaryValue& b) { |
54 int a_count = 0; | 54 int a_count = 0; |
55 int b_count = GetKeyCount(b); | 55 int b_count = GetKeyCount(b); |
56 DictionaryValue::key_iterator i(a.begin_keys()); | 56 DictionaryValue::key_iterator i(a.begin_keys()); |
57 DictionaryValue::key_iterator e(a.end_keys()); | 57 DictionaryValue::key_iterator e(a.end_keys()); |
58 std::wstring av, bv; | 58 std::wstring av, bv; |
59 while (i != e) { | 59 while (i != e) { |
60 if (!(a.GetString(*i, &av)) || | 60 if (!(a.GetStringWithoutPathExpansion(*i, &av)) || |
61 !(b.GetString(*i, &bv)) || | 61 !(b.GetStringWithoutPathExpansion(*i, &bv)) || |
62 av != bv) | 62 av != bv) |
63 return false; | 63 return false; |
64 | 64 |
65 a_count++; | 65 a_count++; |
66 ++i; | 66 ++i; |
67 } | 67 } |
68 | 68 |
69 return (a_count == b_count); | 69 return (a_count == b_count); |
70 } | 70 } |
71 | 71 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 ASSERT_EQ(16, images[0].height()); | 723 ASSERT_EQ(16, images[0].height()); |
724 ASSERT_EQ(32, images[1].width()); | 724 ASSERT_EQ(32, images[1].width()); |
725 ASSERT_EQ(32, images[1].height()); | 725 ASSERT_EQ(32, images[1].height()); |
726 } else { | 726 } else { |
727 ASSERT_EQ(32, images[0].width()); | 727 ASSERT_EQ(32, images[0].width()); |
728 ASSERT_EQ(32, images[0].height()); | 728 ASSERT_EQ(32, images[0].height()); |
729 ASSERT_EQ(16, images[1].width()); | 729 ASSERT_EQ(16, images[1].width()); |
730 ASSERT_EQ(16, images[1].height()); | 730 ASSERT_EQ(16, images[1].height()); |
731 } | 731 } |
732 } | 732 } |
OLD | NEW |