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 11 matching lines...) Expand all Loading... |
22 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
23 #include "chrome/test/base/browser_with_test_window_test.h" | 23 #include "chrome/test/base/browser_with_test_window_test.h" |
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/Source/Platform/chromium/public/WebData.h" | 32 #include "third_party/WebKit/public/platform/WebData.h" |
33 #include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h" | 33 #include "third_party/WebKit/public/platform/WebHTTPBody.h" |
34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
35 | 35 |
36 using content::NavigationEntry; | 36 using content::NavigationEntry; |
37 using sessions::SerializedNavigationEntry; | 37 using sessions::SerializedNavigationEntry; |
38 using sessions::SerializedNavigationEntryTestHelper; | 38 using sessions::SerializedNavigationEntryTestHelper; |
39 | 39 |
40 class SessionServiceTest : public BrowserWithTestWindowTest, | 40 class SessionServiceTest : public BrowserWithTestWindowTest, |
41 public content::NotificationObserver { | 41 public content::NotificationObserver { |
42 public: | 42 public: |
43 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0) {} | 43 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0) {} |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 service()->ScheduleCommand( | 979 service()->ScheduleCommand( |
980 service()->CreateSetActiveWindowCommand(window_id)); | 980 service()->CreateSetActiveWindowCommand(window_id)); |
981 service()->ScheduleCommand( | 981 service()->ScheduleCommand( |
982 service()->CreateSetActiveWindowCommand(window2_id)); | 982 service()->CreateSetActiveWindowCommand(window2_id)); |
983 | 983 |
984 ScopedVector<SessionWindow> windows; | 984 ScopedVector<SessionWindow> windows; |
985 SessionID::id_type active_window_id = 0; | 985 SessionID::id_type active_window_id = 0; |
986 ReadWindows(&(windows.get()), &active_window_id); | 986 ReadWindows(&(windows.get()), &active_window_id); |
987 EXPECT_EQ(window2_id.id(), active_window_id); | 987 EXPECT_EQ(window2_id.id(), active_window_id); |
988 } | 988 } |
OLD | NEW |