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

Side by Side Diff: chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 <string> 5 #include <string>
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/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/bookmarks/bookmark_context_menu_controller.h" 10 #include "chrome/browser/bookmarks/bookmark_context_menu_controller.h"
11 #include "chrome/browser/bookmarks/bookmark_model.h" 11 #include "chrome/browser/bookmarks/bookmark_model.h"
12 #include "chrome/browser/bookmarks/bookmark_utils.h" 12 #include "chrome/browser/bookmarks/bookmark_utils.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
15 #include "content/browser/tab_contents/page_navigator.h" 15 #include "content/browser/tab_contents/page_navigator.h"
16 #include "content/test/test_browser_thread.h" 16 #include "content/test/test_browser_thread.h"
17 #include "grit/generated_resources.h" 17 #include "grit/generated_resources.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 #if defined(OS_WIN) 20 #if defined(OS_WIN)
21 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 21 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
22 #endif 22 #endif
23 23
24 using content::BrowserThread;
25
24 // PageNavigator implementation that records the URL. 26 // PageNavigator implementation that records the URL.
25 class TestingPageNavigator : public PageNavigator { 27 class TestingPageNavigator : public PageNavigator {
26 public: 28 public:
27 // Deprecated. Please use the one-argument variant. 29 // Deprecated. Please use the one-argument variant.
28 // TODO(adriansc): Remove this method once refactoring changed all call 30 // TODO(adriansc): Remove this method once refactoring changed all call
29 // sites. 31 // sites.
30 virtual TabContents* OpenURL(const GURL& url, 32 virtual TabContents* OpenURL(const GURL& url,
31 const GURL& referrer, 33 const GURL& referrer,
32 WindowOpenDisposition disposition, 34 WindowOpenDisposition disposition,
33 content::PageTransition transition) OVERRIDE { 35 content::PageTransition transition) OVERRIDE {
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); 313 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url());
312 314
313 controller.reset(new BookmarkContextMenuController( 315 controller.reset(new BookmarkContextMenuController(
314 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes)); 316 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes));
315 // Cut the URL. 317 // Cut the URL.
316 controller->ExecuteCommand(IDC_CUT); 318 controller->ExecuteCommand(IDC_CUT);
317 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); 319 ASSERT_TRUE(bb_node->GetChild(0)->is_url());
318 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); 320 ASSERT_TRUE(bb_node->GetChild(1)->is_folder());
319 ASSERT_EQ(old_count, bb_node->child_count()); 321 ASSERT_EQ(old_count, bb_node->child_count());
320 } 322 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698