OLD | NEW |
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 <deque> | 5 #include <deque> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 3277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3288 ASSERT_TRUE(prerender->contents()); | 3288 ASSERT_TRUE(prerender->contents()); |
3289 prerender->contents()->set_should_be_shown(false); | 3289 prerender->contents()->set_should_be_shown(false); |
3290 OpenDestURLViaClickNewBackgroundTab(); | 3290 OpenDestURLViaClickNewBackgroundTab(); |
3291 } | 3291 } |
3292 | 3292 |
3293 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, | 3293 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, |
3294 NavigateToPrerenderedPageWhenDevToolsAttached) { | 3294 NavigateToPrerenderedPageWhenDevToolsAttached) { |
3295 DisableJavascriptCalls(); | 3295 DisableJavascriptCalls(); |
3296 WebContents* web_contents = | 3296 WebContents* web_contents = |
3297 current_browser()->tab_strip_model()->GetActiveWebContents(); | 3297 current_browser()->tab_strip_model()->GetActiveWebContents(); |
3298 scoped_refptr<DevToolsAgentHost> agent(DevToolsAgentHost::GetOrCreateFor( | 3298 scoped_refptr<DevToolsAgentHost> agent( |
3299 web_contents->GetRenderViewHost())); | 3299 DevToolsAgentHost::GetOrCreateFor(web_contents)); |
3300 DevToolsManager* manager = DevToolsManager::GetInstance(); | 3300 DevToolsManager* manager = DevToolsManager::GetInstance(); |
3301 FakeDevToolsClientHost client_host; | 3301 FakeDevToolsClientHost client_host; |
3302 manager->RegisterDevToolsClientHostFor(agent.get(), &client_host); | 3302 manager->RegisterDevToolsClientHostFor(agent.get(), &client_host); |
3303 const char* url = "files/prerender/prerender_page.html"; | 3303 const char* url = "files/prerender/prerender_page.html"; |
3304 PrerenderTestURL(url, FINAL_STATUS_DEVTOOLS_ATTACHED, 1); | 3304 PrerenderTestURL(url, FINAL_STATUS_DEVTOOLS_ATTACHED, 1); |
3305 NavigateToURLWithDisposition(url, CURRENT_TAB, false); | 3305 NavigateToURLWithDisposition(url, CURRENT_TAB, false); |
3306 manager->ClientHostClosing(&client_host); | 3306 manager->ClientHostClosing(&client_host); |
3307 } | 3307 } |
3308 | 3308 |
3309 // Validate that the sessionStorage namespace remains the same when swapping | 3309 // Validate that the sessionStorage namespace remains the same when swapping |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4419 | 4419 |
4420 // Navigate to the URL entered. | 4420 // Navigate to the URL entered. |
4421 omnibox_view->model()->AcceptInput(CURRENT_TAB, false); | 4421 omnibox_view->model()->AcceptInput(CURRENT_TAB, false); |
4422 | 4422 |
4423 // Prerender should be running, but abandoned. | 4423 // Prerender should be running, but abandoned. |
4424 EXPECT_TRUE( | 4424 EXPECT_TRUE( |
4425 GetAutocompleteActionPredictor()->IsPrerenderAbandonedForTesting()); | 4425 GetAutocompleteActionPredictor()->IsPrerenderAbandonedForTesting()); |
4426 } | 4426 } |
4427 | 4427 |
4428 } // namespace prerender | 4428 } // namespace prerender |
OLD | NEW |