| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 testing::UnitTest::GetInstance()->current_test_info(); | 99 testing::UnitTest::GetInstance()->current_test_info(); |
| 100 if (strcmp(test_info->name(), "NoSessionRestoreNewWindowChromeOS") != 0) { | 100 if (strcmp(test_info->name(), "NoSessionRestoreNewWindowChromeOS") != 0) { |
| 101 // Undo the effect of kBrowserAliveWithNoWindows in defaults.cc so that we | 101 // Undo the effect of kBrowserAliveWithNoWindows in defaults.cc so that we |
| 102 // can get these test to work without quitting. | 102 // can get these test to work without quitting. |
| 103 SessionServiceTestHelper helper( | 103 SessionServiceTestHelper helper( |
| 104 SessionServiceFactory::GetForProfile(browser()->profile())); | 104 SessionServiceFactory::GetForProfile(browser()->profile())); |
| 105 helper.SetForceBrowserNotAliveWithNoWindows(true); | 105 helper.SetForceBrowserNotAliveWithNoWindows(true); |
| 106 helper.ReleaseService(); | 106 helper.ReleaseService(); |
| 107 } | 107 } |
| 108 #endif | 108 #endif |
| 109 | |
| 110 InProcessBrowserTest::SetUpOnMainThread(); | |
| 111 } | 109 } |
| 112 | 110 |
| 113 bool SetUpUserDataDirectory() override { | 111 bool SetUpUserDataDirectory() override { |
| 114 url1_ = ui_test_utils::GetTestUrl( | 112 url1_ = ui_test_utils::GetTestUrl( |
| 115 base::FilePath().AppendASCII("session_history"), | 113 base::FilePath().AppendASCII("session_history"), |
| 116 base::FilePath().AppendASCII("bot1.html")); | 114 base::FilePath().AppendASCII("bot1.html")); |
| 117 url2_ = ui_test_utils::GetTestUrl( | 115 url2_ = ui_test_utils::GetTestUrl( |
| 118 base::FilePath().AppendASCII("session_history"), | 116 base::FilePath().AppendASCII("session_history"), |
| 119 base::FilePath().AppendASCII("bot2.html")); | 117 base::FilePath().AppendASCII("bot2.html")); |
| 120 url3_ = ui_test_utils::GetTestUrl( | 118 url3_ = ui_test_utils::GetTestUrl( |
| (...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1664 StartupURLsWithSessionRestore) { | 1662 StartupURLsWithSessionRestore) { |
| 1665 // Check that browser is started with restored session and | 1663 // Check that browser is started with restored session and |
| 1666 // tab with startup URL next to it. | 1664 // tab with startup URL next to it. |
| 1667 TabStripModel* tab_strip = browser()->tab_strip_model(); | 1665 TabStripModel* tab_strip = browser()->tab_strip_model(); |
| 1668 ASSERT_EQ(2, tab_strip->count()); | 1666 ASSERT_EQ(2, tab_strip->count()); |
| 1669 EXPECT_EQ(kSessionURL, | 1667 EXPECT_EQ(kSessionURL, |
| 1670 tab_strip->GetWebContentsAt(0)->GetURL().possibly_invalid_spec()); | 1668 tab_strip->GetWebContentsAt(0)->GetURL().possibly_invalid_spec()); |
| 1671 EXPECT_EQ(kStartupURL, | 1669 EXPECT_EQ(kStartupURL, |
| 1672 tab_strip->GetWebContentsAt(1)->GetURL().possibly_invalid_spec()); | 1670 tab_strip->GetWebContentsAt(1)->GetURL().possibly_invalid_spec()); |
| 1673 } | 1671 } |
| OLD | NEW |