OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ |
6 #define CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ | 6 #define CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stddef.h> |
9 | 9 |
10 struct ImportedBookmarkEntry; | 10 struct ImportedBookmarkEntry; |
11 | 11 |
12 const int kMaxPathSize = 5; | 12 const int kMaxPathSize = 5; |
13 | 13 |
14 struct BookmarkInfo { | 14 struct BookmarkInfo { |
15 const bool in_toolbar; | 15 const bool in_toolbar; |
16 const size_t path_size; | 16 const size_t path_size; |
17 const char* path[kMaxPathSize]; | 17 const char* path[kMaxPathSize]; |
18 const wchar_t* title; | 18 const wchar_t* title; |
19 const char* url; | 19 const char* url; |
20 }; | 20 }; |
21 | 21 |
22 // Generates an assertion error if |entry| is not equal to |expected|. Wrap this | 22 // Generates an assertion error if |entry| is not equal to |expected|. Wrap this |
23 // method in (ASSERT|EXPECT)_NO_FATAL_FAILURE to catch the error if one is | 23 // method in (ASSERT|EXPECT)_NO_FATAL_FAILURE to catch the error if one is |
24 // generated. | 24 // generated. |
25 void TestEqualBookmarkEntry(const ImportedBookmarkEntry& entry, | 25 void TestEqualBookmarkEntry(const ImportedBookmarkEntry& entry, |
26 const BookmarkInfo& expected); | 26 const BookmarkInfo& expected); |
27 | 27 |
28 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ | 28 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ |
OLD | NEW |