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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "chrome/test/base/testing_profile.h" | 24 #include "chrome/test/base/testing_profile.h" |
25 #include "components/sessions/serialized_navigation_entry_test_helper.h" | 25 #include "components/sessions/serialized_navigation_entry_test_helper.h" |
26 #include "content/public/browser/navigation_entry.h" | 26 #include "content/public/browser/navigation_entry.h" |
27 #include "content/public/browser/notification_observer.h" | 27 #include "content/public/browser/notification_observer.h" |
28 #include "content/public/browser/notification_registrar.h" | 28 #include "content/public/browser/notification_registrar.h" |
29 #include "content/public/browser/notification_service.h" | 29 #include "content/public/browser/notification_service.h" |
30 #include "content/public/common/page_state.h" | 30 #include "content/public/common/page_state.h" |
31 #include "testing/gtest/include/gtest/gtest.h" | 31 #include "testing/gtest/include/gtest/gtest.h" |
32 #include "third_party/WebKit/public/platform/WebData.h" | 32 #include "third_party/WebKit/public/platform/WebData.h" |
33 #include "third_party/WebKit/public/platform/WebHTTPBody.h" | 33 #include "third_party/WebKit/public/platform/WebHTTPBody.h" |
34 #include "third_party/WebKit/public/web/WebHistoryItem.h" | |
35 | 34 |
36 using content::NavigationEntry; | 35 using content::NavigationEntry; |
37 using sessions::SerializedNavigationEntry; | 36 using sessions::SerializedNavigationEntry; |
38 using sessions::SerializedNavigationEntryTestHelper; | 37 using sessions::SerializedNavigationEntryTestHelper; |
39 | 38 |
40 class SessionServiceTest : public BrowserWithTestWindowTest, | 39 class SessionServiceTest : public BrowserWithTestWindowTest, |
41 public content::NotificationObserver { | 40 public content::NotificationObserver { |
42 public: | 41 public: |
43 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0) {} | 42 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0) {} |
44 | 43 |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 service()->ScheduleCommand( | 978 service()->ScheduleCommand( |
980 service()->CreateSetActiveWindowCommand(window_id)); | 979 service()->CreateSetActiveWindowCommand(window_id)); |
981 service()->ScheduleCommand( | 980 service()->ScheduleCommand( |
982 service()->CreateSetActiveWindowCommand(window2_id)); | 981 service()->CreateSetActiveWindowCommand(window2_id)); |
983 | 982 |
984 ScopedVector<SessionWindow> windows; | 983 ScopedVector<SessionWindow> windows; |
985 SessionID::id_type active_window_id = 0; | 984 SessionID::id_type active_window_id = 0; |
986 ReadWindows(&(windows.get()), &active_window_id); | 985 ReadWindows(&(windows.get()), &active_window_id); |
987 EXPECT_EQ(window2_id.id(), active_window_id); | 986 EXPECT_EQ(window2_id.id(), active_window_id); |
988 } | 987 } |
OLD | NEW |