Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: ios/chrome/browser/sessions/session_service_unittest.mm

Issue 1360993002: Moved NavigationManagerImpl serialization out of CRWSessionController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compilation fix after rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import <Foundation/Foundation.h> 5 #import <Foundation/Foundation.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 TEST_F(SessionServiceTest, LoadWindowFromDirectory) { 124 TEST_F(SessionServiceTest, LoadWindowFromDirectory) {
125 SessionServiceIOS* service = [SessionServiceIOS sharedService]; 125 SessionServiceIOS* service = [SessionServiceIOS sharedService];
126 base::scoped_nsobject<SessionWindowIOS> origSessionWindow( 126 base::scoped_nsobject<SessionWindowIOS> origSessionWindow(
127 [[SessionWindowIOS alloc] init]); 127 [[SessionWindowIOS alloc] init]);
128 [service performSaveWindow:origSessionWindow toDirectory:directoryName_]; 128 [service performSaveWindow:origSessionWindow toDirectory:directoryName_];
129 129
130 SessionWindowIOS* sessionWindow = 130 SessionWindowIOS* sessionWindow =
131 [service loadWindowForBrowserState:chrome_browser_state_.get()]; 131 [service loadWindowForBrowserState:chrome_browser_state_.get()];
132 EXPECT_TRUE(sessionWindow != nil); 132 EXPECT_TRUE(sessionWindow != nil);
133 EXPECT_EQ(NSNotFound, static_cast<NSInteger>(sessionWindow.selectedIndex)); 133 EXPECT_EQ(NSNotFound, static_cast<NSInteger>(sessionWindow.selectedIndex));
134 EXPECT_EQ(0U, sessionWindow.unclaimedSessions); 134 EXPECT_EQ(0U, sessionWindow.sessions.count);
135 } 135 }
136 136
137 TEST_F(SessionServiceTest, LoadCorruptedWindow) { 137 TEST_F(SessionServiceTest, LoadCorruptedWindow) {
138 SessionWindowIOS* sessionWindow = 138 SessionWindowIOS* sessionWindow =
139 LoadSessionFromTestDataFile(FILE_PATH_LITERAL("corrupted.plist")); 139 LoadSessionFromTestDataFile(FILE_PATH_LITERAL("corrupted.plist"));
140 EXPECT_TRUE(sessionWindow == nil); 140 EXPECT_TRUE(sessionWindow == nil);
141 } 141 }
142 142
143 } // anonymous namespace 143 } // anonymous namespace
OLDNEW
« no previous file with comments | « ios/chrome/browser/sessions/session_service.mm ('k') | ios/chrome/browser/sessions/session_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698