OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <stddef.h> |
| 6 |
5 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
6 #include "components/history/core/browser/history_types.h" | 8 #include "components/history/core/browser/history_types.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
8 | 10 |
9 namespace history { | 11 namespace history { |
10 | 12 |
11 namespace { | 13 namespace { |
12 | 14 |
13 // Validates the consistency of the given history result. We just make sure | 15 // Validates the consistency of the given history result. We just make sure |
14 // that the URL rows match the indices structure. The unit tests themselves | 16 // that the URL rows match the indices structure. The unit tests themselves |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 ASSERT_EQ(1U, match_count); | 111 ASSERT_EQ(1U, match_count); |
110 EXPECT_TRUE(matches[0] == 0); | 112 EXPECT_TRUE(matches[0] == 0); |
111 | 113 |
112 // Delete the second URL, there should be nothing left. | 114 // Delete the second URL, there should be nothing left. |
113 results.DeleteURL(url2); | 115 results.DeleteURL(url2); |
114 EXPECT_EQ(0U, results.size()); | 116 EXPECT_EQ(0U, results.size()); |
115 EXPECT_FALSE(results.MatchesForURL(url2, NULL)); | 117 EXPECT_FALSE(results.MatchesForURL(url2, NULL)); |
116 } | 118 } |
117 | 119 |
118 } // namespace history | 120 } // namespace history |
OLD | NEW |