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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 10831116: Move SessionStorageNamespace entirely into NavigationController and support StoragePartitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style fixes. Created 8 years, 4 months 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 <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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698