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 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/sessions/session_types_test_helper.h" | 21 #include "chrome/browser/sessions/session_types_test_helper.h" |
22 #include "chrome/common/chrome_notification_types.h" | 22 #include "chrome/common/chrome_notification_types.h" |
23 #include "chrome/common/chrome_paths.h" | 23 #include "chrome/common/chrome_paths.h" |
24 #include "chrome/test/base/browser_with_test_window_test.h" | 24 #include "chrome/test/base/browser_with_test_window_test.h" |
25 #include "chrome/test/base/testing_profile.h" | 25 #include "chrome/test/base/testing_profile.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 "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
31 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" | 31 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" |
32 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.
h" | 32 #include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h" |
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
34 #include "webkit/glue/glue_serialize.h" | 34 #include "webkit/glue/glue_serialize.h" |
35 | 35 |
36 using content::NavigationEntry; | 36 using content::NavigationEntry; |
37 | 37 |
38 class SessionServiceTest : public BrowserWithTestWindowTest, | 38 class SessionServiceTest : public BrowserWithTestWindowTest, |
39 public content::NotificationObserver { | 39 public content::NotificationObserver { |
40 public: | 40 public: |
41 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0) {} | 41 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0) {} |
42 | 42 |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 service()->ScheduleCommand( | 965 service()->ScheduleCommand( |
966 service()->CreateSetActiveWindowCommand(window_id)); | 966 service()->CreateSetActiveWindowCommand(window_id)); |
967 service()->ScheduleCommand( | 967 service()->ScheduleCommand( |
968 service()->CreateSetActiveWindowCommand(window2_id)); | 968 service()->CreateSetActiveWindowCommand(window2_id)); |
969 | 969 |
970 ScopedVector<SessionWindow> windows; | 970 ScopedVector<SessionWindow> windows; |
971 SessionID::id_type active_window_id = 0; | 971 SessionID::id_type active_window_id = 0; |
972 ReadWindows(&(windows.get()), &active_window_id); | 972 ReadWindows(&(windows.get()), &active_window_id); |
973 EXPECT_EQ(window2_id.id(), active_window_id); | 973 EXPECT_EQ(window2_id.id(), active_window_id); |
974 } | 974 } |
OLD | NEW |