Index: chrome/browser/extensions/api/bookmarks/bookmark_apitest.cc |
diff --git a/chrome/browser/extensions/api/bookmarks/bookmark_apitest.cc b/chrome/browser/extensions/api/bookmarks/bookmark_apitest.cc |
index fb59a2c0e2cded381e5e883bae60e6987b211660..7adc3d9e0912689759dd37e9962114d6f768e686 100644 |
--- a/chrome/browser/extensions/api/bookmarks/bookmark_apitest.cc |
+++ b/chrome/browser/extensions/api/bookmarks/bookmark_apitest.cc |
@@ -24,25 +24,41 @@ using bookmarks::BookmarkModel; |
#define MAYBE_Bookmarks Bookmarks |
#endif |
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Bookmarks) { |
- // Add test managed bookmarks to verify that the bookmarks API can read them |
- // and can't modify them. |
+ // Add test managed and supervised bookmarks to verify that the bookmarks API |
+ // can read them and can't modify them. |
Profile* profile = browser()->profile(); |
BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile); |
ChromeBookmarkClient* client = |
ChromeBookmarkClientFactory::GetForProfile(profile); |
bookmarks::test::WaitForBookmarkModelToLoad(model); |
- base::ListValue list; |
- base::DictionaryValue* node = new base::DictionaryValue(); |
- node->SetString("name", "Managed Bookmark"); |
- node->SetString("url", "http://www.chromium.org"); |
- list.Append(node); |
- node = new base::DictionaryValue(); |
- node->SetString("name", "Managed Folder"); |
- node->Set("children", new base::ListValue()); |
- list.Append(node); |
- profile->GetPrefs()->Set(bookmarks::prefs::kManagedBookmarks, list); |
- ASSERT_EQ(2, client->managed_node()->child_count()); |
+ { |
+ base::ListValue list; |
+ base::DictionaryValue* node = new base::DictionaryValue(); |
+ node->SetString("name", "Managed Bookmark"); |
+ node->SetString("url", "http://www.chromium.org"); |
+ list.Append(node); |
+ node = new base::DictionaryValue(); |
+ node->SetString("name", "Managed Folder"); |
+ node->Set("children", new base::ListValue()); |
+ list.Append(node); |
+ profile->GetPrefs()->Set(bookmarks::prefs::kManagedBookmarks, list); |
+ ASSERT_EQ(2, client->managed_node()->child_count()); |
+ } |
+ |
+ { |
+ base::ListValue list; |
+ base::DictionaryValue* node = new base::DictionaryValue(); |
+ node->SetString("name", "Supervised Bookmark"); |
+ node->SetString("url", "http://www.pbskids.org"); |
+ list.Append(node); |
+ node = new base::DictionaryValue(); |
+ node->SetString("name", "Supervised Folder"); |
+ node->Set("children", new base::ListValue()); |
+ list.Append(node); |
+ profile->GetPrefs()->Set(bookmarks::prefs::kSupervisedBookmarks, list); |
+ ASSERT_EQ(2, client->supervised_node()->child_count()); |
+ } |
ASSERT_TRUE(RunExtensionTest("bookmarks")) << message_; |
} |