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

Unified Diff: ios/chrome/browser/sessions/session_window_unittest.mm

Issue 2720983002: Remove windowName from CRWSessionController. (Closed)
Patch Set: Address comments. Created 3 years, 10 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
Index: ios/chrome/browser/sessions/session_window_unittest.mm
diff --git a/ios/chrome/browser/sessions/session_window_unittest.mm b/ios/chrome/browser/sessions/session_window_unittest.mm
index 52101b1706e5203e8828e6c61ed61621b7165d67..15508700496f76af83d555ed462ada726288e168 100644
--- a/ios/chrome/browser/sessions/session_window_unittest.mm
+++ b/ios/chrome/browser/sessions/session_window_unittest.mm
@@ -40,12 +40,9 @@ class SessionWindowIOSTest : public PlatformTest {
chrome_browser_state_ = test_cbs_builder.Build();
}
- WebStateImpl* CreateWebState(NSString* window_name,
- NSString* opener,
- BOOL openedByDOM) const {
+ WebStateImpl* CreateWebState(BOOL openedByDOM) const {
WebStateImpl* webState = new WebStateImpl(chrome_browser_state_.get());
- webState->GetNavigationManagerImpl().InitializeSession(window_name,
- openedByDOM);
+ webState->GetNavigationManagerImpl().InitializeSession(openedByDOM);
return webState;
}
@@ -62,8 +59,8 @@ TEST_F(SessionWindowIOSTest, InitEmpty) {
}
TEST_F(SessionWindowIOSTest, InitAddingSessions) {
- std::unique_ptr<WebStateImpl> webState1(CreateWebState(@"window1", nil, NO));
- std::unique_ptr<WebStateImpl> webState2(CreateWebState(@"window2", nil, NO));
+ std::unique_ptr<WebStateImpl> webState1(CreateWebState(NO));
+ std::unique_ptr<WebStateImpl> webState2(CreateWebState(NO));
base::scoped_nsobject<SessionWindowIOS> sessionWindow(
[[SessionWindowIOS alloc] init]);
[sessionWindow addSerializedSessionStorage:webState1->BuildSessionStorage()];
@@ -77,14 +74,11 @@ TEST_F(SessionWindowIOSTest, InitAddingSessions) {
}
TEST_F(SessionWindowIOSTest, CodingEncoding) {
- NSString* windowName1 = @"window1";
- NSString* windowName2 = @"window2";
base::scoped_nsobject<SessionWindowIOS> sessionWindow(
[[SessionWindowIOS alloc] init]);
- std::unique_ptr<WebStateImpl> webState1(
- CreateWebState(windowName1, nil, YES));
- std::unique_ptr<WebStateImpl> webState2(CreateWebState(windowName2, nil, NO));
+ std::unique_ptr<WebStateImpl> webState1(CreateWebState(YES));
+ std::unique_ptr<WebStateImpl> webState2(CreateWebState(NO));
[sessionWindow addSerializedSessionStorage:webState1->BuildSessionStorage()];
[sessionWindow addSerializedSessionStorage:webState2->BuildSessionStorage()];
@@ -102,11 +96,9 @@ TEST_F(SessionWindowIOSTest, CodingEncoding) {
NSArray* sessions = unarchivedObj.sessions;
ASSERT_EQ(2U, sessions.count);
CRWSessionStorage* unarchivedSession1 = sessions[0];
- EXPECT_NSEQ(windowName1, unarchivedSession1.windowName);
EXPECT_TRUE(unarchivedSession1.openedByDOM);
CRWSessionStorage* unarchivedSession2 = sessions[1];
- EXPECT_NSEQ(windowName2, unarchivedSession2.windowName);
EXPECT_FALSE(unarchivedSession2.openedByDOM);
}
« no previous file with comments | « ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm ('k') | ios/chrome/browser/tabs/tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698