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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.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 #include <vector> 6 #include <vector>
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
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"
11 #include "chrome/app/chrome_command_ids.h" 11 #include "chrome/app/chrome_command_ids.h"
12 #include "chrome/browser/bookmarks/bookmark_model.h" 12 #include "chrome/browser/bookmarks/bookmark_model.h"
13 #include "chrome/browser/bookmarks/bookmark_utils.h" 13 #include "chrome/browser/bookmarks/bookmark_utils.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h" 15 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h"
16 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "content/browser/tab_contents/page_navigator.h" 17 #include "content/browser/tab_contents/page_navigator.h"
18 #include "content/test/test_browser_thread.h" 18 #include "content/test/test_browser_thread.h"
19 #include "grit/generated_resources.h" 19 #include "grit/generated_resources.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 21
22 #if defined(OS_WIN) 22 #if defined(OS_WIN)
23 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 23 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
24 #endif 24 #endif
25 25
26 using content::BrowserThread;
27
26 namespace { 28 namespace {
27 29
28 // PageNavigator implementation that records the URL. 30 // PageNavigator implementation that records the URL.
29 class TestingPageNavigator : public PageNavigator { 31 class TestingPageNavigator : public PageNavigator {
30 public: 32 public:
31 // Deprecated. Please use one-argument variant. 33 // Deprecated. Please use one-argument variant.
32 // TODO(adriansc): Remove this method once refactoring changed all call 34 // TODO(adriansc): Remove this method once refactoring changed all call
33 // sites. 35 // sites.
34 virtual TabContents* OpenURL(const GURL& url, 36 virtual TabContents* OpenURL(const GURL& url,
35 const GURL& referrer, 37 const GURL& referrer,
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); 321 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url());
320 322
321 controller.reset(new BookmarkContextMenu( 323 controller.reset(new BookmarkContextMenu(
322 NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false)); 324 NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false));
323 // Cut the URL. 325 // Cut the URL.
324 controller->ExecuteCommand(IDC_CUT); 326 controller->ExecuteCommand(IDC_CUT);
325 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); 327 ASSERT_TRUE(bb_node->GetChild(0)->is_url());
326 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); 328 ASSERT_TRUE(bb_node->GetChild(1)->is_folder());
327 ASSERT_EQ(old_count, bb_node->child_count()); 329 ASSERT_EQ(old_count, bb_node->child_count());
328 } 330 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698