OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/sync/one_click_signin_sync_starter.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 // Verifies that the continue URL is loaded once signin completes. | 124 // Verifies that the continue URL is loaded once signin completes. |
125 TEST_F(OneClickSigninSyncStarterTest, LoadContinueUrl) { | 125 TEST_F(OneClickSigninSyncStarterTest, LoadContinueUrl) { |
126 content::NavigationController& controller = web_contents()->GetController(); | 126 content::NavigationController& controller = web_contents()->GetController(); |
127 EXPECT_FALSE(controller.GetPendingEntry()); | 127 EXPECT_FALSE(controller.GetPendingEntry()); |
128 | 128 |
129 const GURL kTestURL = GURL("http://www.example.com"); | 129 const GURL kTestURL = GURL("http://www.example.com"); |
130 CreateSyncStarter(base::Bind(&OneClickSigninSyncStarterTest::Callback, | 130 CreateSyncStarter(base::Bind(&OneClickSigninSyncStarterTest::Callback, |
131 base::Unretained(this)), | 131 base::Unretained(this)), |
132 kTestURL); | 132 kTestURL); |
133 sync_starter_->MergeSessionComplete( | 133 sync_starter_->AccountAddedToCookie( |
134 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); | 134 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); |
135 EXPECT_EQ(1, succeeded_count_); | 135 EXPECT_EQ(1, succeeded_count_); |
136 EXPECT_EQ(kTestURL, controller.GetPendingEntry()->GetURL()); | 136 EXPECT_EQ(kTestURL, controller.GetPendingEntry()->GetURL()); |
137 } | 137 } |
OLD | NEW |