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 "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h" | 5 #include "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 | 57 |
58 virtual void TearDown() OVERRIDE { | 58 virtual void TearDown() OVERRIDE { |
59 ui::Clipboard::DestroyClipboardForCurrentThread(); | 59 ui::Clipboard::DestroyClipboardForCurrentThread(); |
60 | 60 |
61 // Flush the message loop to make application verifiers happy. | 61 // Flush the message loop to make application verifiers happy. |
62 message_loop_.RunUntilIdle(); | 62 message_loop_.RunUntilIdle(); |
63 } | 63 } |
64 | 64 |
65 protected: | 65 protected: |
66 MessageLoopForUI message_loop_; | 66 base::MessageLoopForUI message_loop_; |
67 content::TestBrowserThread ui_thread_; | 67 content::TestBrowserThread ui_thread_; |
68 content::TestBrowserThread file_thread_; | 68 content::TestBrowserThread file_thread_; |
69 scoped_ptr<TestingProfile> profile_; | 69 scoped_ptr<TestingProfile> profile_; |
70 BookmarkModel* model_; | 70 BookmarkModel* model_; |
71 TestingPageNavigator navigator_; | 71 TestingPageNavigator navigator_; |
72 | 72 |
73 private: | 73 private: |
74 // Creates the following structure: | 74 // Creates the following structure: |
75 // a | 75 // a |
76 // F1 | 76 // F1 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); | 317 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); |
318 | 318 |
319 controller.reset(new BookmarkContextMenuController( | 319 controller.reset(new BookmarkContextMenuController( |
320 NULL, NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes)); | 320 NULL, NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes)); |
321 // Cut the URL. | 321 // Cut the URL. |
322 controller->ExecuteCommand(IDC_CUT, 0); | 322 controller->ExecuteCommand(IDC_CUT, 0); |
323 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); | 323 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); |
324 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); | 324 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); |
325 ASSERT_EQ(old_count, bb_node->child_count()); | 325 ASSERT_EQ(old_count, bb_node->child_count()); |
326 } | 326 } |
OLD | NEW |