OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/signin/chrome_signin_client.h" | 5 #include "chrome/browser/signin/chrome_signin_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "build/build_config.h" |
10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 12 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
12 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
13 #include "content/public/test/test_browser_thread_bundle.h" | 14 #include "content/public/test/test_browser_thread_bundle.h" |
14 #include "net/base/network_change_notifier.h" | 15 #include "net/base/network_change_notifier.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
17 // ChromeOS has its own network delay logic. | 18 // ChromeOS has its own network delay logic. |
18 #if !defined(OS_CHROMEOS) | 19 #if !defined(OS_CHROMEOS) |
19 | 20 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 CallbackTester tester; | 110 CallbackTester tester; |
110 signin_client()->DelayNetworkCall(base::Bind(&CallbackTester::Increment, | 111 signin_client()->DelayNetworkCall(base::Bind(&CallbackTester::Increment, |
111 base::Unretained(&tester))); | 112 base::Unretained(&tester))); |
112 ASSERT_FALSE(tester.WasCalledExactlyOnce()); | 113 ASSERT_FALSE(tester.WasCalledExactlyOnce()); |
113 mock->GoOnline(); | 114 mock->GoOnline(); |
114 base::RunLoop().RunUntilIdle(); | 115 base::RunLoop().RunUntilIdle(); |
115 ASSERT_TRUE(tester.WasCalledExactlyOnce()); | 116 ASSERT_TRUE(tester.WasCalledExactlyOnce()); |
116 } | 117 } |
117 | 118 |
118 #endif | 119 #endif |
OLD | NEW |