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

Side by Side Diff: chrome/browser/extensions/extension_bookmarks_unittest.cc

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
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/base/testing_browser_process_test.h"
13 12
14 namespace keys = extension_bookmarks_module_constants; 13 namespace keys = extension_bookmarks_module_constants;
15 14
16 class ExtensionBookmarksTest : public TestingBrowserProcessTest { 15 class ExtensionBookmarksTest : public testing::Test {
17 public: 16 public:
18 virtual void SetUp() { 17 virtual void SetUp() {
19 model_.reset(new BookmarkModel(NULL)); 18 model_.reset(new BookmarkModel(NULL));
20 model_->AddURL(model_->other_node(), 0, ASCIIToUTF16("Digg"), 19 model_->AddURL(model_->other_node(), 0, ASCIIToUTF16("Digg"),
21 GURL("http://www.reddit.com")); 20 GURL("http://www.reddit.com"));
22 model_->AddURL(model_->other_node(), 0, ASCIIToUTF16("News"), 21 model_->AddURL(model_->other_node(), 0, ASCIIToUTF16("News"),
23 GURL("http://www.foxnews.com")); 22 GURL("http://www.foxnews.com"));
24 folder = model_->AddFolder( 23 folder = model_->AddFolder(
25 model_->other_node(), 0, ASCIIToUTF16("outer folder")); 24 model_->other_node(), 0, ASCIIToUTF16("outer folder"));
26 model_->AddFolder(folder, 0, ASCIIToUTF16("inner folder 1")); 25 model_->AddFolder(folder, 0, ASCIIToUTF16("inner folder 1"));
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 true); // Only folders. 73 true); // Only folders.
75 ListValue* children; 74 ListValue* children;
76 tree->GetList(keys::kChildrenKey, &children); 75 tree->GetList(keys::kChildrenKey, &children);
77 ASSERT_EQ(2U, children->GetSize()); 76 ASSERT_EQ(2U, children->GetSize());
78 DictionaryValue* inner_folder; 77 DictionaryValue* inner_folder;
79 ASSERT_TRUE(children->GetDictionary(1, &inner_folder)); 78 ASSERT_TRUE(children->GetDictionary(1, &inner_folder));
80 std::string title; 79 std::string title;
81 inner_folder->GetString(keys::kTitleKey, &title); 80 inner_folder->GetString(keys::kTitleKey, &title);
82 ASSERT_EQ("inner folder 1", title); 81 ASSERT_EQ("inner folder 1", title);
83 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698