| 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 <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" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 // PageNavigator implementation that records the URL. | 28 // PageNavigator implementation that records the URL. |
| 29 class TestingPageNavigator : public PageNavigator { | 29 class TestingPageNavigator : public PageNavigator { |
| 30 public: | 30 public: |
| 31 // Deprecated. Please use one-argument variant. | 31 // Deprecated. Please use one-argument variant. |
| 32 // TODO(adriansc): Remove this method once refactoring changed all call | 32 // TODO(adriansc): Remove this method once refactoring changed all call |
| 33 // sites. | 33 // sites. |
| 34 virtual TabContents* OpenURL(const GURL& url, | 34 virtual TabContents* OpenURL(const GURL& url, |
| 35 const GURL& referrer, | 35 const GURL& referrer, |
| 36 WindowOpenDisposition disposition, | 36 WindowOpenDisposition disposition, |
| 37 PageTransition::Type transition) OVERRIDE { | 37 content::PageTransition transition) OVERRIDE { |
| 38 return OpenURL(OpenURLParams(url, referrer, disposition, transition)); | 38 return OpenURL(OpenURLParams(url, referrer, disposition, transition)); |
| 39 } | 39 } |
| 40 | 40 |
| 41 virtual TabContents* OpenURL(const OpenURLParams& params) OVERRIDE { | 41 virtual TabContents* OpenURL(const OpenURLParams& params) OVERRIDE { |
| 42 urls_.push_back(params.url); | 42 urls_.push_back(params.url); |
| 43 return NULL; | 43 return NULL; |
| 44 } | 44 } |
| 45 | 45 |
| 46 std::vector<GURL> urls_; | 46 std::vector<GURL> urls_; |
| 47 }; | 47 }; |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); | 312 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); |
| 313 | 313 |
| 314 controller.reset(new BookmarkContextMenu( | 314 controller.reset(new BookmarkContextMenu( |
| 315 NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false)); | 315 NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false)); |
| 316 // Cut the URL. | 316 // Cut the URL. |
| 317 controller->ExecuteCommand(IDC_CUT); | 317 controller->ExecuteCommand(IDC_CUT); |
| 318 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); | 318 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); |
| 319 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); | 319 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); |
| 320 ASSERT_EQ(old_count, bb_node->child_count()); | 320 ASSERT_EQ(old_count, bb_node->child_count()); |
| 321 } | 321 } |
| OLD | NEW |