| 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 "components/sync/driver/sync_stopped_reporter.h" | 5 #include "components/sync/driver/sync_stopped_reporter.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/test/scoped_mock_time_message_loop_task_runner.h" | 9 #include "base/test/scoped_mock_time_message_loop_task_runner.h" |
| 10 #include "base/threading/non_thread_safe.h" | |
| 11 #include "components/sync/protocol/sync.pb.h" | 10 #include "components/sync/protocol/sync.pb.h" |
| 12 #include "net/http/http_status_code.h" | 11 #include "net/http/http_status_code.h" |
| 13 #include "net/url_request/test_url_fetcher_factory.h" | 12 #include "net/url_request/test_url_fetcher_factory.h" |
| 14 #include "net/url_request/url_request_test_util.h" | 13 #include "net/url_request/url_request_test_util.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 15 |
| 17 namespace syncer { | 16 namespace syncer { |
| 18 | 17 |
| 19 const char kTestURL[] = "http://chromium.org/test"; | 18 const char kTestURL[] = "http://chromium.org/test"; |
| 20 const char kTestURLTrailingSlash[] = "http://chromium.org/test/"; | 19 const char kTestURLTrailingSlash[] = "http://chromium.org/test/"; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 185 |
| 187 // Begin request. | 186 // Begin request. |
| 188 ssr.ReportSyncStopped(kAuthToken, kCacheGuid, kBirthday); | 187 ssr.ReportSyncStopped(kAuthToken, kCacheGuid, kBirthday); |
| 189 | 188 |
| 190 // Trigger the timeout. | 189 // Trigger the timeout. |
| 191 ASSERT_TRUE(mock_main_runner->HasPendingTask()); | 190 ASSERT_TRUE(mock_main_runner->HasPendingTask()); |
| 192 mock_main_runner->FastForwardUntilNoTasksRemain(); | 191 mock_main_runner->FastForwardUntilNoTasksRemain(); |
| 193 } | 192 } |
| 194 | 193 |
| 195 } // namespace syncer | 194 } // namespace syncer |
| OLD | NEW |