OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/scoped_vector.h" | 8 #include "base/scoped_vector.h" |
9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/defaults.h" | 13 #include "chrome/browser/defaults.h" |
14 #include "chrome/browser/sessions/session_backend.h" | 14 #include "chrome/browser/sessions/session_backend.h" |
15 #include "chrome/browser/sessions/session_service.h" | 15 #include "chrome/browser/sessions/session_service.h" |
16 #include "chrome/browser/sessions/session_service_test_helper.h" | 16 #include "chrome/browser/sessions/session_service_test_helper.h" |
17 #include "chrome/browser/sessions/session_types.h" | 17 #include "chrome/browser/sessions/session_types.h" |
18 #include "chrome/browser/tab_contents/navigation_entry.h" | |
19 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
20 #include "chrome/common/notification_observer.h" | 19 #include "chrome/common/notification_observer.h" |
21 #include "chrome/common/notification_registrar.h" | 20 #include "chrome/common/notification_registrar.h" |
22 #include "chrome/common/notification_service.h" | 21 #include "chrome/common/notification_service.h" |
23 #include "chrome/common/notification_type.h" | 22 #include "chrome/common/notification_type.h" |
24 #include "chrome/test/browser_with_test_window_test.h" | 23 #include "chrome/test/browser_with_test_window_test.h" |
25 #include "chrome/test/file_test_utils.h" | 24 #include "chrome/test/file_test_utils.h" |
26 #include "chrome/test/testing_profile.h" | 25 #include "chrome/test/testing_profile.h" |
| 26 #include "content/browser/tab_contents/navigation_entry.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 | 28 |
29 class SessionServiceTest : public BrowserWithTestWindowTest, | 29 class SessionServiceTest : public BrowserWithTestWindowTest, |
30 public NotificationObserver { | 30 public NotificationObserver { |
31 public: | 31 public: |
32 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0){} | 32 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0){} |
33 | 33 |
34 protected: | 34 protected: |
35 virtual void SetUp() { | 35 virtual void SetUp() { |
36 BrowserWithTestWindowTest::SetUp(); | 36 BrowserWithTestWindowTest::SetUp(); |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 655 |
656 helper_.PrepareTabInWindow(window_id, tab_id, 0, true); | 656 helper_.PrepareTabInWindow(window_id, tab_id, 0, true); |
657 UpdateNavigation(window_id, tab_id, nav1, 0, true); | 657 UpdateNavigation(window_id, tab_id, nav1, 0, true); |
658 service()->TabClosed(window_id, tab_id, true); | 658 service()->TabClosed(window_id, tab_id, true); |
659 | 659 |
660 ScopedVector<SessionWindow> windows; | 660 ScopedVector<SessionWindow> windows; |
661 ReadWindows(&(windows.get())); | 661 ReadWindows(&(windows.get())); |
662 | 662 |
663 ASSERT_TRUE(windows->empty()); | 663 ASSERT_TRUE(windows->empty()); |
664 } | 664 } |
OLD | NEW |