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

Side by Side Diff: content/browser/debugger/devtools_manager_unittest.cc

Issue 10690048: Clean up RenderViewHostManager swapping logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/time.h" 6 #include "base/time.h"
7 #include "content/browser/debugger/devtools_manager_impl.h" 7 #include "content/browser/debugger/devtools_manager_impl.h"
8 #include "content/browser/debugger/render_view_devtools_agent_host.h" 8 #include "content/browser/debugger/render_view_devtools_agent_host.h"
9 #include "content/browser/renderer_host/test_render_view_host.h" 9 #include "content/browser/renderer_host/test_render_view_host.h"
10 #include "content/browser/web_contents/test_web_contents.h" 10 #include "content/browser/web_contents/test_web_contents.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 private: 87 private:
88 bool renderer_unresponsive_received_; 88 bool renderer_unresponsive_received_;
89 }; 89 };
90 90
91 class DevToolsManagerTestBrowserClient : public TestContentBrowserClient { 91 class DevToolsManagerTestBrowserClient : public TestContentBrowserClient {
92 public: 92 public:
93 DevToolsManagerTestBrowserClient() { 93 DevToolsManagerTestBrowserClient() {
94 } 94 }
95 95
96 virtual bool ShouldSwapProcessesForNavigation( 96 virtual bool ShouldSwapBrowsingInstanceForNavigation(
97 content::BrowserContext* browser_context,
97 const GURL& current_url, 98 const GURL& current_url,
98 const GURL& new_url) OVERRIDE { 99 const GURL& new_url) OVERRIDE {
99 return true; 100 return true;
100 } 101 }
101 102
102 private: 103 private:
103 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerTestBrowserClient); 104 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerTestBrowserClient);
104 }; 105 };
105 106
106 } // namespace 107 } // namespace
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 controller().LoadURL( 235 controller().LoadURL(
235 url, Referrer(), PAGE_TRANSITION_TYPED, std::string()); 236 url, Referrer(), PAGE_TRANSITION_TYPED, std::string());
236 contents()->TestDidNavigate(rvh(), 1, url, PAGE_TRANSITION_TYPED); 237 contents()->TestDidNavigate(rvh(), 1, url, PAGE_TRANSITION_TYPED);
237 EXPECT_FALSE(contents()->cross_navigation_pending()); 238 EXPECT_FALSE(contents()->cross_navigation_pending());
238 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( 239 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor(
239 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh()))); 240 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh())));
240 client_host.Close(DevToolsManager::GetInstance()); 241 client_host.Close(DevToolsManager::GetInstance());
241 } 242 }
242 243
243 } // namespace content 244 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698