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

Side by Side Diff: chrome/browser/chromeos/login/signin/merge_session_load_page_unittest.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "chrome/browser/chromeos/login/signin/merge_session_load_page.h" 10 #include "chrome/browser/chromeos/login/signin/merge_session_load_page.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 void SetSessionRestoreStart(const base::Time& time) { 113 void SetSessionRestoreStart(const base::Time& time) {
114 OAuth2LoginManager* login_manager = GetOAuth2LoginManager(); 114 OAuth2LoginManager* login_manager = GetOAuth2LoginManager();
115 ASSERT_TRUE(login_manager); 115 ASSERT_TRUE(login_manager);
116 login_manager->SetSessionRestoreStartForTesting(time); 116 login_manager->SetSessionRestoreStartForTesting(time);
117 } 117 }
118 118
119 private: 119 private:
120 ScopedTestDeviceSettingsService test_device_settings_service_; 120 ScopedTestDeviceSettingsService test_device_settings_service_;
121 ScopedTestCrosSettings test_cros_settings_; 121 ScopedTestCrosSettings test_cros_settings_;
122 scoped_ptr<chromeos::ScopedTestUserManager> test_user_manager_; 122 std::unique_ptr<chromeos::ScopedTestUserManager> test_user_manager_;
123 }; 123 };
124 124
125 TEST_F(MergeSessionLoadPageTest, MergeSessionPageNotShown) { 125 TEST_F(MergeSessionLoadPageTest, MergeSessionPageNotShown) {
126 SetMergeSessionState(OAuth2LoginManager::SESSION_RESTORE_DONE); 126 SetMergeSessionState(OAuth2LoginManager::SESSION_RESTORE_DONE);
127 // Start a load. 127 // Start a load.
128 Navigate(kURL1, 1, 0, true); 128 Navigate(kURL1, 1, 0, true);
129 // Load next page. 129 // Load next page.
130 controller().LoadURL(GURL(kURL2), content::Referrer(), 130 controller().LoadURL(GURL(kURL2), content::Referrer(),
131 ui::PAGE_TRANSITION_TYPED, std::string()); 131 ui::PAGE_TRANSITION_TYPED, std::string());
132 132
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 // The URL remains to be URL2. 178 // The URL remains to be URL2.
179 EXPECT_EQ(kURL2, web_contents()->GetVisibleURL().spec()); 179 EXPECT_EQ(kURL2, web_contents()->GetVisibleURL().spec());
180 180
181 // Commit navigation and the interstitial page is gone. 181 // Commit navigation and the interstitial page is gone.
182 Navigate(kURL2, 2, pending_id, true); 182 Navigate(kURL2, 2, pending_id, true);
183 EXPECT_FALSE(GetMergeSessionLoadPage()); 183 EXPECT_FALSE(GetMergeSessionLoadPage());
184 } 184 }
185 185
186 } // namespace chromeos 186 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698