Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: chrome/browser/bookmarks/bookmark_test_helpers.h

Issue 268673004: Move bookmarks' test support file to the bookmarks component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@367839
Patch Set: Remove duplicated dependency Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_TEST_HELPERS_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_TEST_HELPERS_H_
7
8 #include <string>
9
10 class BookmarkModel;
11 class BookmarkNode;
12
13 namespace test {
14
15 // Blocks until |model| finishes loading.
16 void WaitForBookmarkModelToLoad(BookmarkModel* model);
17
18 // Return the descendants of |node| as a string useful for verifying node
19 // modifications. The format of the resulting string is:
20 //
21 // result = node " " , { node " " }
22 // node = bookmark title | folder
23 // folder = folder title ":[ " { node " " } "]"
24 // bookmark title = (* string with no spaces *)
25 // folder title = (* string with no spaces *)
26 //
27 // Example: "a f1:[ b d c ] d f2:[ e f g ] h "
28 //
29 // (Logically, we should use |string16|s, but it's more convenient for test
30 // purposes to use (UTF-8) |std::string|s.)
31 std::string ModelStringFromNode(const BookmarkNode* node);
32
33 // Create and add the node hierarchy specified by |model_string| to the
34 // bookmark node given by |node|. The string has the same format as
35 // specified for ModelStringFromNode(). The new nodes added to |node|
36 // are appended to the end of node's existing subnodes, if any.
37 // |model| must be the model of which |node| is a member.
38 // NOTE: The string format is very rigid and easily broken if not followed
39 // exactly (since we're using a very simple parser).
40 void AddNodesFromModelString(BookmarkModel* model,
41 const BookmarkNode* node,
42 const std::string& model_string);
43 } // namespace test
44
45 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_TEST_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698