| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/process/launch.h" | 9 #include "base/process/launch.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); | 643 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); |
| 644 ASSERT_EQ(1u, active_browser_list_->size()); | 644 ASSERT_EQ(1u, active_browser_list_->size()); |
| 645 ASSERT_EQ(url2_, | 645 ASSERT_EQ(url2_, |
| 646 new_browser->tab_strip_model()->GetActiveWebContents()->GetURL()); | 646 new_browser->tab_strip_model()->GetActiveWebContents()->GetURL()); |
| 647 GoBack(new_browser); | 647 GoBack(new_browser); |
| 648 ASSERT_EQ(url1_, | 648 ASSERT_EQ(url1_, |
| 649 new_browser->tab_strip_model()->GetActiveWebContents()->GetURL()); | 649 new_browser->tab_strip_model()->GetActiveWebContents()->GetURL()); |
| 650 } | 650 } |
| 651 | 651 |
| 652 IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreWebUI) { | 652 IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreWebUI) { |
| 653 const GURL webui_url("chrome://newtab"); | 653 const GURL webui_url("chrome://omnibox"); |
| 654 ui_test_utils::NavigateToURL(browser(), webui_url); | 654 ui_test_utils::NavigateToURL(browser(), webui_url); |
| 655 const content::WebContents* old_tab = | 655 const content::WebContents* old_tab = |
| 656 browser()->tab_strip_model()->GetActiveWebContents(); | 656 browser()->tab_strip_model()->GetActiveWebContents(); |
| 657 EXPECT_EQ(content::BINDINGS_POLICY_WEB_UI, | 657 EXPECT_EQ(content::BINDINGS_POLICY_WEB_UI, |
| 658 old_tab->GetRenderViewHost()->GetEnabledBindings()); | 658 old_tab->GetRenderViewHost()->GetEnabledBindings()); |
| 659 | 659 |
| 660 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); | 660 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); |
| 661 ASSERT_EQ(1u, active_browser_list_->size()); | 661 ASSERT_EQ(1u, active_browser_list_->size()); |
| 662 const content::WebContents* new_tab = | 662 const content::WebContents* new_tab = |
| 663 new_browser->tab_strip_model()->GetActiveWebContents(); | 663 new_browser->tab_strip_model()->GetActiveWebContents(); |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 content::NavigationController* controller = | 1150 content::NavigationController* controller = |
| 1151 &browser()->tab_strip_model()->GetActiveWebContents()->GetController(); | 1151 &browser()->tab_strip_model()->GetActiveWebContents()->GetController(); |
| 1152 EXPECT_TRUE( | 1152 EXPECT_TRUE( |
| 1153 controller->GetDefaultSessionStorageNamespace()->should_persist()); | 1153 controller->GetDefaultSessionStorageNamespace()->should_persist()); |
| 1154 | 1154 |
| 1155 // Quit and restore. Check that no extra tabs were created. | 1155 // Quit and restore. Check that no extra tabs were created. |
| 1156 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); | 1156 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); |
| 1157 ASSERT_EQ(1u, active_browser_list_->size()); | 1157 ASSERT_EQ(1u, active_browser_list_->size()); |
| 1158 EXPECT_EQ(1, new_browser->tab_strip_model()->count()); | 1158 EXPECT_EQ(1, new_browser->tab_strip_model()->count()); |
| 1159 } | 1159 } |
| OLD | NEW |