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

Side by Side Diff: content/browser/tab_contents/tab_contents_delegate_unittest.cc

Issue 8772041: Remove deprecated TabContentsDelegate::OpenURLFromTab variant (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "content/browser/tab_contents/tab_contents.h" 8 #include "content/browser/tab_contents/tab_contents.h"
9 #include "content/browser/tab_contents/tab_contents_delegate.h" 9 #include "content/browser/tab_contents/tab_contents_delegate.h"
10 #include "content/test/test_browser_context.h" 10 #include "content/test/test_browser_context.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace { 13 namespace {
14 14
15 class MockTabContentsDelegate : public TabContentsDelegate { 15 class MockTabContentsDelegate : public TabContentsDelegate {
16 public: 16 public:
17 virtual ~MockTabContentsDelegate() {} 17 virtual ~MockTabContentsDelegate() {}
18 18
19 // TODO(adriansc): Remove this method when refactoring changed all call sites.
20 virtual TabContents* OpenURLFromTab(
21 TabContents* source,
22 const GURL& url,
23 const GURL& referrer,
24 WindowOpenDisposition disposition,
25 content::PageTransition transition) OVERRIDE {
26 return NULL;
27 }
28
29 virtual TabContents* OpenURLFromTab(TabContents* source, 19 virtual TabContents* OpenURLFromTab(TabContents* source,
30 const OpenURLParams& params) OVERRIDE { 20 const OpenURLParams& params) OVERRIDE {
31 return NULL; 21 return NULL;
32 } 22 }
33 23
34 virtual void NavigationStateChanged(const TabContents* source, 24 virtual void NavigationStateChanged(const TabContents* source,
35 unsigned changed_flags) OVERRIDE {} 25 unsigned changed_flags) OVERRIDE {}
36 26
37 virtual void AddNavigationHeaders( 27 virtual void AddNavigationHeaders(
38 const GURL& url, std::string* headers) OVERRIDE { 28 const GURL& url, std::string* headers) OVERRIDE {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 EXPECT_TRUE(contents_a->delegate() == NULL); 94 EXPECT_TRUE(contents_a->delegate() == NULL);
105 EXPECT_TRUE(contents_b->delegate() == NULL); 95 EXPECT_TRUE(contents_b->delegate() == NULL);
106 96
107 // Destroy the tab contents and run the message loop to prevent leaks. 97 // Destroy the tab contents and run the message loop to prevent leaks.
108 contents_a.reset(NULL); 98 contents_a.reset(NULL);
109 contents_b.reset(NULL); 99 contents_b.reset(NULL);
110 loop.RunAllPending(); 100 loop.RunAllPending();
111 } 101 }
112 102
113 } // namespace 103 } // namespace
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents_delegate.cc ('k') | content/browser/tab_contents/tab_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698