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

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

Issue 8224023: Don't show URL for pending new navigations initiated by the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 9 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 13 matching lines...) Expand all
24 // PageNavigator implementation that records the URL. 24 // PageNavigator implementation that records the URL.
25 class TestingPageNavigator : public PageNavigator { 25 class TestingPageNavigator : public PageNavigator {
26 public: 26 public:
27 // Deprecated. Please use the one-argument variant. 27 // Deprecated. Please use the one-argument variant.
28 // TODO(adriansc): Remove this method once refactoring changed all call 28 // TODO(adriansc): Remove this method once refactoring changed all call
29 // sites. 29 // sites.
30 virtual TabContents* OpenURL(const GURL& url, 30 virtual TabContents* OpenURL(const GURL& url,
31 const GURL& referrer, 31 const GURL& referrer,
32 WindowOpenDisposition disposition, 32 WindowOpenDisposition disposition,
33 content::PageTransition transition) OVERRIDE { 33 content::PageTransition transition) OVERRIDE {
34 return OpenURL(OpenURLParams(url, referrer, disposition, transition)); 34 return OpenURL(OpenURLParams(url, referrer, disposition, transition,
35 false));
35 } 36 }
36 37
37 virtual TabContents* OpenURL(const OpenURLParams& params) OVERRIDE { 38 virtual TabContents* OpenURL(const OpenURLParams& params) OVERRIDE {
38 urls_.push_back(params.url); 39 urls_.push_back(params.url);
39 return NULL; 40 return NULL;
40 } 41 }
41 42
42 std::vector<GURL> urls_; 43 std::vector<GURL> urls_;
43 }; 44 };
44 45
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); 311 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url());
311 312
312 controller.reset(new BookmarkContextMenuController( 313 controller.reset(new BookmarkContextMenuController(
313 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes)); 314 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes));
314 // Cut the URL. 315 // Cut the URL.
315 controller->ExecuteCommand(IDC_CUT); 316 controller->ExecuteCommand(IDC_CUT);
316 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); 317 ASSERT_TRUE(bb_node->GetChild(0)->is_url());
317 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); 318 ASSERT_TRUE(bb_node->GetChild(1)->is_folder());
318 ASSERT_EQ(old_count, bb_node->child_count()); 319 ASSERT_EQ(old_count, bb_node->child_count());
319 } 320 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698