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

Unified Diff: ios/chrome/browser/sessions/session_service.h

Issue 2732063003: Add unittests checking that old saved session can be restored. (Closed)
Patch Set: Rebase and document -performSaveToDirectoryInBackground:. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/sessions/BUILD.gn ('k') | ios/chrome/browser/sessions/session_service.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/sessions/session_service.h
diff --git a/ios/chrome/browser/sessions/session_service.h b/ios/chrome/browser/sessions/session_service.h
index 661b6779b83ab92f31db282acb6daae9b8673a2f..0676b2e4298b6e729a7d8911c95cc79bb859ec67 100644
--- a/ios/chrome/browser/sessions/session_service.h
+++ b/ios/chrome/browser/sessions/session_service.h
@@ -25,7 +25,8 @@ class ChromeBrowserState;
// Inits exactly as initForReadingWithData: does, additionally setting
// |browserState| on the receiver.
- (instancetype)initForReadingWithData:(NSData*)data
- browserState:(ios::ChromeBrowserState*)browserState;
+ browserState:(ios::ChromeBrowserState*)browserState
+ NS_DESIGNATED_INITIALIZER;
@end
@@ -65,4 +66,15 @@ class ChromeBrowserState;
@end
+@interface SessionServiceIOS (Testing)
+
+// For some of the unit tests, we need to make sure the session is saved
+// immediately so we can read it back in to verify various attributes. This
+// is not a situation we normally expect to be in because we never
+// want the session being saved on the main thread in the production app.
+- (void)performSaveWindow:(SessionWindowIOS*)window
+ toDirectory:(NSString*)directory;
+
+@end
+
#endif // IOS_CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_
« no previous file with comments | « ios/chrome/browser/sessions/BUILD.gn ('k') | ios/chrome/browser/sessions/session_service.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698