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

Unified Diff: ios/chrome/browser/tabs/tab_model_unittest.mm

Issue 2678883002: Add a ScopedNSAutoreleasePool to TabModelTest.PersistSelectionChange (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab_model_unittest.mm
diff --git a/ios/chrome/browser/tabs/tab_model_unittest.mm b/ios/chrome/browser/tabs/tab_model_unittest.mm
index 42b4af4061c625814bca4b1e0998a161dde4f6d4..3d6efae16d1fd67599c1920ec87848d2e8379ca2 100644
--- a/ios/chrome/browser/tabs/tab_model_unittest.mm
+++ b/ios/chrome/browser/tabs/tab_model_unittest.mm
@@ -831,6 +831,7 @@ TEST_F(TabModelTest, SetParentModel) {
TEST_F(TabModelTest, PersistSelectionChange) {
TestChromeBrowserState::Builder test_cbs_builder;
auto chrome_browser_state = test_cbs_builder.Build();
+ base::mac::ScopedNSAutoreleasePool pool;
rohitrao (ping after 24h) 2017/02/06 17:31:46 Can you please add a comment explaining why this p
sdefresne 2017/02/06 17:46:43 Done.
NSString* stashPath =
base::SysUTF8ToNSString(chrome_browser_state->GetStatePath().value());
@@ -868,6 +869,8 @@ TEST_F(TabModelTest, PersistSelectionChange) {
browserState:chrome_browser_state.get()]);
EXPECT_EQ(model.get().currentTab, [model tabAtIndex:1]);
[model browserStateDestroyed];
+ model.reset();
+ base::RunLoop().RunUntilIdle();
rohitrao (ping after 24h) 2017/02/06 17:31:46 Why is this necessary? Does this drain the pool?
sdefresne 2017/02/06 17:46:43 This is unrelated to draining the pool. It is the
// Clean up.
EXPECT_TRUE([[NSFileManager defaultManager] removeItemAtPath:stashPath
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698