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

Side by Side Diff: chrome/browser/sessions/session_restore_browsertest.cc

Issue 10572015: Session restore: Store and restore persistent IDs for sessionStorage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 8 years, 6 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
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | chrome/browser/sessions/session_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/defaults.h" 9 #include "chrome/browser/defaults.h"
10 #include "chrome/browser/first_run/first_run.h" 10 #include "chrome/browser/first_run/first_run.h"
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 profile, new_browser, 754 profile, new_browser,
755 SessionRestore::CLOBBER_CURRENT_TAB | SessionRestore::SYNCHRONOUS, 755 SessionRestore::CLOBBER_CURRENT_TAB | SessionRestore::SYNCHRONOUS,
756 std::vector<GURL>()); 756 std::vector<GURL>());
757 757
758 // The pinned tab is the selected tab. 758 // The pinned tab is the selected tab.
759 ASSERT_EQ(2, new_browser->tab_count()); 759 ASSERT_EQ(2, new_browser->tab_count());
760 EXPECT_EQ(0, new_browser->active_index()); 760 EXPECT_EQ(0, new_browser->active_index());
761 EXPECT_EQ(url1_, new_browser->GetActiveWebContents()->GetURL()); 761 EXPECT_EQ(url1_, new_browser->GetActiveWebContents()->GetURL());
762 EXPECT_EQ(url2_, new_browser->GetWebContentsAt(1)->GetURL()); 762 EXPECT_EQ(url2_, new_browser->GetWebContentsAt(1)->GetURL());
763 } 763 }
764
765 IN_PROC_BROWSER_TEST_F(SessionRestoreTest, SessionStorage) {
766 ui_test_utils::NavigateToURL(browser(), url1_);
767 const content::NavigationController& controller =
768 browser()->GetActiveWebContents()->GetController();
769 ASSERT_TRUE(controller.GetSessionStorageNamespace());
770 std::string session_storage_persistent_id =
771 controller.GetSessionStorageNamespace()->persistent_id();
772 Browser* new_browser = QuitBrowserAndRestore(browser(), 1);
773 ASSERT_EQ(1u, BrowserList::size());
774 ASSERT_EQ(url1_, new_browser->GetActiveWebContents()->GetURL());
775 const content::NavigationController& new_controller =
776 new_browser->GetActiveWebContents()->GetController();
777 ASSERT_TRUE(new_controller.GetSessionStorageNamespace());
778 std::string restored_session_storage_persistent_id =
779 new_controller.GetSessionStorageNamespace()->persistent_id();
780 EXPECT_EQ(session_storage_persistent_id,
781 restored_session_storage_persistent_id);
782 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | chrome/browser/sessions/session_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698