| 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 10 #include "chrome/browser/extensions/extension_bookmark_helpers.h" | 10 #include "chrome/browser/extensions/extension_bookmark_helpers.h" |
| 11 #include "chrome/browser/extensions/extension_bookmarks_module_constants.h" | 11 #include "chrome/browser/extensions/extension_bookmarks_module_constants.h" |
| 12 #include "chrome/test/testing_browser_process_test.h" | 12 #include "chrome/test/base/testing_browser_process_test.h" |
| 13 | 13 |
| 14 namespace keys = extension_bookmarks_module_constants; | 14 namespace keys = extension_bookmarks_module_constants; |
| 15 | 15 |
| 16 class ExtensionBookmarksTest : public TestingBrowserProcessTest { | 16 class ExtensionBookmarksTest : public TestingBrowserProcessTest { |
| 17 public: | 17 public: |
| 18 virtual void SetUp() { | 18 virtual void SetUp() { |
| 19 model_.reset(new BookmarkModel(NULL)); | 19 model_.reset(new BookmarkModel(NULL)); |
| 20 model_->AddURL(model_->other_node(), 0, ASCIIToUTF16("Digg"), | 20 model_->AddURL(model_->other_node(), 0, ASCIIToUTF16("Digg"), |
| 21 GURL("http://www.reddit.com")); | 21 GURL("http://www.reddit.com")); |
| 22 model_->AddURL(model_->other_node(), 0, ASCIIToUTF16("News"), | 22 model_->AddURL(model_->other_node(), 0, ASCIIToUTF16("News"), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 true); // Only folders. | 74 true); // Only folders. |
| 75 ListValue* children; | 75 ListValue* children; |
| 76 tree->GetList(keys::kChildrenKey, &children); | 76 tree->GetList(keys::kChildrenKey, &children); |
| 77 ASSERT_EQ(2U, children->GetSize()); | 77 ASSERT_EQ(2U, children->GetSize()); |
| 78 DictionaryValue* inner_folder; | 78 DictionaryValue* inner_folder; |
| 79 ASSERT_TRUE(children->GetDictionary(1, &inner_folder)); | 79 ASSERT_TRUE(children->GetDictionary(1, &inner_folder)); |
| 80 std::string title; | 80 std::string title; |
| 81 inner_folder->GetString(keys::kTitleKey, &title); | 81 inner_folder->GetString(keys::kTitleKey, &title); |
| 82 ASSERT_EQ("inner folder 1", title); | 82 ASSERT_EQ("inner folder 1", title); |
| 83 } | 83 } |
| OLD | NEW |