| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/memory/memory_pressure_listener.h" | 9 #include "base/memory/memory_pressure_listener.h" |
| 10 #include "base/process/launch.h" | 10 #include "base/process/launch.h" |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // And the first url should be url. | 389 // And the first url should be url. |
| 390 EXPECT_EQ(url, new_browser->tab_strip_model()->GetWebContentsAt(0)->GetURL()); | 390 EXPECT_EQ(url, new_browser->tab_strip_model()->GetWebContentsAt(0)->GetURL()); |
| 391 } | 391 } |
| 392 #endif // !OS_CHROMEOS | 392 #endif // !OS_CHROMEOS |
| 393 | 393 |
| 394 IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) { | 394 IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) { |
| 395 GURL url1(ui_test_utils::GetTestUrl( | 395 GURL url1(ui_test_utils::GetTestUrl( |
| 396 base::FilePath(base::FilePath::kCurrentDirectory), | 396 base::FilePath(base::FilePath::kCurrentDirectory), |
| 397 base::FilePath(FILE_PATH_LITERAL("title1.html")))); | 397 base::FilePath(FILE_PATH_LITERAL("title1.html")))); |
| 398 // Any page that will yield a 200 status code will work here. | 398 // Any page that will yield a 200 status code will work here. |
| 399 GURL url2("about:version"); | 399 GURL url2("chrome://version"); |
| 400 GURL url3(ui_test_utils::GetTestUrl( | 400 GURL url3(ui_test_utils::GetTestUrl( |
| 401 base::FilePath(base::FilePath::kCurrentDirectory), | 401 base::FilePath(base::FilePath::kCurrentDirectory), |
| 402 base::FilePath(FILE_PATH_LITERAL("title3.html")))); | 402 base::FilePath(FILE_PATH_LITERAL("title3.html")))); |
| 403 | 403 |
| 404 // Add and navigate three tabs. | 404 // Add and navigate three tabs. |
| 405 ui_test_utils::NavigateToURL(browser(), url1); | 405 ui_test_utils::NavigateToURL(browser(), url1); |
| 406 { | 406 { |
| 407 content::WindowedNotificationObserver observer( | 407 content::WindowedNotificationObserver observer( |
| 408 content::NOTIFICATION_LOAD_STOP, | 408 content::NOTIFICATION_LOAD_STOP, |
| 409 content::NotificationService::AllSources()); | 409 content::NotificationService::AllSources()); |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1260 content::NavigationController* controller = | 1260 content::NavigationController* controller = |
| 1261 &browser()->tab_strip_model()->GetActiveWebContents()->GetController(); | 1261 &browser()->tab_strip_model()->GetActiveWebContents()->GetController(); |
| 1262 EXPECT_TRUE( | 1262 EXPECT_TRUE( |
| 1263 controller->GetDefaultSessionStorageNamespace()->should_persist()); | 1263 controller->GetDefaultSessionStorageNamespace()->should_persist()); |
| 1264 | 1264 |
| 1265 // Quit and restore. Check that no extra tabs were created. | 1265 // Quit and restore. Check that no extra tabs were created. |
| 1266 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); | 1266 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); |
| 1267 ASSERT_EQ(1u, active_browser_list_->size()); | 1267 ASSERT_EQ(1u, active_browser_list_->size()); |
| 1268 EXPECT_EQ(1, new_browser->tab_strip_model()->count()); | 1268 EXPECT_EQ(1, new_browser->tab_strip_model()->count()); |
| 1269 } | 1269 } |
| OLD | NEW |