OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/file_path.h" | 5 #include "base/file_path.h" |
6 #include "chrome/browser/defaults.h" | 6 #include "chrome/browser/defaults.h" |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/sessions/tab_restore_service.h" | 8 #include "chrome/browser/sessions/tab_restore_service.h" |
9 #include "chrome/browser/tabs/tab_strip_model.h" | 9 #include "chrome/browser/tabs/tab_strip_model.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/browser_window.h" | 11 #include "chrome/browser/ui/browser_window.h" |
12 #include "chrome/common/page_transition_types.h" | |
13 #include "chrome/test/in_process_browser_test.h" | 12 #include "chrome/test/in_process_browser_test.h" |
14 #include "chrome/test/ui_test_utils.h" | 13 #include "chrome/test/ui_test_utils.h" |
15 #include "content/browser/tab_contents/tab_contents.h" | 14 #include "content/browser/tab_contents/tab_contents.h" |
| 15 #include "content/common/page_transition_types.h" |
16 | 16 |
17 typedef InProcessBrowserTest SessionRestoreTest; | 17 typedef InProcessBrowserTest SessionRestoreTest; |
18 | 18 |
19 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) | 19 #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) |
20 // Crashes on Linux Views: http://crbug.com/39476 | 20 // Crashes on Linux Views: http://crbug.com/39476 |
21 #define MAYBE_RestoreOnNewWindowWithNoTabbedBrowsers \ | 21 #define MAYBE_RestoreOnNewWindowWithNoTabbedBrowsers \ |
22 DISABLED_RestoreOnNewWindowWithNoTabbedBrowsers | 22 DISABLED_RestoreOnNewWindowWithNoTabbedBrowsers |
23 #else | 23 #else |
24 #define MAYBE_RestoreOnNewWindowWithNoTabbedBrowsers \ | 24 #define MAYBE_RestoreOnNewWindowWithNoTabbedBrowsers \ |
25 RestoreOnNewWindowWithNoTabbedBrowsers | 25 RestoreOnNewWindowWithNoTabbedBrowsers |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 ASSERT_EQ(TabRestoreService::TAB, service->entries().front()->type); | 135 ASSERT_EQ(TabRestoreService::TAB, service->entries().front()->type); |
136 const TabRestoreService::Tab* tab = | 136 const TabRestoreService::Tab* tab = |
137 static_cast<TabRestoreService::Tab*>(service->entries().front()); | 137 static_cast<TabRestoreService::Tab*>(service->entries().front()); |
138 | 138 |
139 // Restore the tab. | 139 // Restore the tab. |
140 service->RestoreEntryById(NULL, tab->id, false); | 140 service->RestoreEntryById(NULL, tab->id, false); |
141 | 141 |
142 // Make sure the restore was successful. | 142 // Make sure the restore was successful. |
143 EXPECT_EQ(0U, service->entries().size()); | 143 EXPECT_EQ(0U, service->entries().size()); |
144 } | 144 } |
OLD | NEW |