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 #include "base/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
6 #include "base/values.h" | 6 #include "base/values.h" |
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
8 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | 8 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
9 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" | 9 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 base::ListValue list; | 33 base::ListValue list; |
34 base::DictionaryValue* node = new base::DictionaryValue(); | 34 base::DictionaryValue* node = new base::DictionaryValue(); |
35 node->SetString("name", "Managed Bookmark"); | 35 node->SetString("name", "Managed Bookmark"); |
36 node->SetString("url", "http://www.chromium.org"); | 36 node->SetString("url", "http://www.chromium.org"); |
37 list.Append(node); | 37 list.Append(node); |
38 node = new base::DictionaryValue(); | 38 node = new base::DictionaryValue(); |
39 node->SetString("name", "Managed Folder"); | 39 node->SetString("name", "Managed Folder"); |
40 node->Set("children", new base::ListValue()); | 40 node->Set("children", new base::ListValue()); |
41 list.Append(node); | 41 list.Append(node); |
42 profile->GetPrefs()->Set(prefs::kManagedBookmarks, list); | 42 profile->GetPrefs()->Set(bookmarks::prefs::kManagedBookmarks, list); |
43 ASSERT_EQ(2, client->managed_node()->child_count()); | 43 ASSERT_EQ(2, client->managed_node()->child_count()); |
44 | 44 |
45 ASSERT_TRUE(RunExtensionTest("bookmarks")) << message_; | 45 ASSERT_TRUE(RunExtensionTest("bookmarks")) << message_; |
46 } | 46 } |
OLD | NEW |