| 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 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 loader_path_("files/prerender/prerender_loader.html"), | 515 loader_path_("files/prerender/prerender_loader.html"), |
| 516 explicitly_set_browser_(NULL) {} | 516 explicitly_set_browser_(NULL) {} |
| 517 | 517 |
| 518 virtual ~PrerenderBrowserTest() {} | 518 virtual ~PrerenderBrowserTest() {} |
| 519 | 519 |
| 520 content::SessionStorageNamespace* GetSessionStorageNamespace() const { | 520 content::SessionStorageNamespace* GetSessionStorageNamespace() const { |
| 521 TabContents* tab_contents = | 521 TabContents* tab_contents = |
| 522 current_browser()->tab_strip_model()->GetActiveTabContents(); | 522 current_browser()->tab_strip_model()->GetActiveTabContents(); |
| 523 if (!tab_contents) | 523 if (!tab_contents) |
| 524 return NULL; | 524 return NULL; |
| 525 return tab_contents->web_contents()->GetRenderViewHost()-> | 525 return tab_contents->web_contents()->GetController() |
| 526 GetSessionStorageNamespace(); | 526 .GetDefaultSessionStorageNamespace(); |
| 527 } | 527 } |
| 528 | 528 |
| 529 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 529 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 530 #if defined(ENABLE_SAFE_BROWSING) | 530 #if defined(ENABLE_SAFE_BROWSING) |
| 531 SafeBrowsingService::RegisterFactory(safe_browsing_factory_.get()); | 531 SafeBrowsingService::RegisterFactory(safe_browsing_factory_.get()); |
| 532 #endif | 532 #endif |
| 533 } | 533 } |
| 534 | 534 |
| 535 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 535 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 536 command_line->AppendSwitchASCII(switches::kPrerenderMode, | 536 command_line->AppendSwitchASCII(switches::kPrerenderMode, |
| (...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2386 ResultCatcher catcher; | 2386 ResultCatcher catcher; |
| 2387 | 2387 |
| 2388 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); | 2388 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); |
| 2389 NavigateToDestURL(); | 2389 NavigateToDestURL(); |
| 2390 ASSERT_TRUE(IsEmptyPrerenderLinkManager()); | 2390 ASSERT_TRUE(IsEmptyPrerenderLinkManager()); |
| 2391 | 2391 |
| 2392 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 2392 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 2393 } | 2393 } |
| 2394 | 2394 |
| 2395 } // namespace prerender | 2395 } // namespace prerender |
| OLD | NEW |