| 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 "chrome/browser/bookmarks/recently_used_folders_combo_model.h" | 5 #include "chrome/browser/bookmarks/recently_used_folders_combo_model.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/test/base/testing_browser_process_test.h" | |
| 10 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
| 11 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 12 |
| 14 class RecentlyUsedFoldersComboModelTest : public TestingBrowserProcessTest { | 13 class RecentlyUsedFoldersComboModelTest : public testing::Test { |
| 15 public: | 14 public: |
| 16 RecentlyUsedFoldersComboModelTest(); | 15 RecentlyUsedFoldersComboModelTest(); |
| 17 | 16 |
| 18 virtual void SetUp() OVERRIDE; | 17 virtual void SetUp() OVERRIDE; |
| 19 virtual void TearDown() OVERRIDE; | 18 virtual void TearDown() OVERRIDE; |
| 20 | 19 |
| 21 protected: | 20 protected: |
| 22 scoped_ptr<TestingProfile> profile_; | 21 scoped_ptr<TestingProfile> profile_; |
| 23 | 22 |
| 24 private: | 23 private: |
| (...skipping 27 matching lines...) Expand all Loading... |
| 52 bookmark_model->bookmark_bar_node(), 0, ASCIIToUTF16("a"), | 51 bookmark_model->bookmark_bar_node(), 0, ASCIIToUTF16("a"), |
| 53 GURL("http://a")); | 52 GURL("http://a")); |
| 54 RecentlyUsedFoldersComboModel model(bookmark_model, new_node); | 53 RecentlyUsedFoldersComboModel model(bookmark_model, new_node); |
| 55 std::set<const BookmarkNode*> nodes; | 54 std::set<const BookmarkNode*> nodes; |
| 56 for (int i = 0; i < model.GetItemCount(); ++i) { | 55 for (int i = 0; i < model.GetItemCount(); ++i) { |
| 57 const BookmarkNode* node = model.GetNodeAt(i); | 56 const BookmarkNode* node = model.GetNodeAt(i); |
| 58 EXPECT_EQ(0u, nodes.count(node)); | 57 EXPECT_EQ(0u, nodes.count(node)); |
| 59 nodes.insert(node); | 58 nodes.insert(node); |
| 60 } | 59 } |
| 61 } | 60 } |
| OLD | NEW |