OLD | NEW |
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 "base/base64url.h" | 5 #include "base/base64url.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "base/strings/string_split.h" | 7 #include "base/strings/string_split.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "build/build_config.h" |
10 #include "components/invalidation/impl/gcm_network_channel.h" | 11 #include "components/invalidation/impl/gcm_network_channel.h" |
11 #include "google_apis/gaia/google_service_auth_error.h" | 12 #include "google_apis/gaia/google_service_auth_error.h" |
12 #include "net/url_request/test_url_fetcher_factory.h" | 13 #include "net/url_request/test_url_fetcher_factory.h" |
13 #include "net/url_request/url_request_test_util.h" | 14 #include "net/url_request/url_request_test_util.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 | 16 |
16 namespace syncer { | 17 namespace syncer { |
17 | 18 |
18 class TestGCMNetworkChannelDelegate : public GCMNetworkChannelDelegate { | 19 class TestGCMNetworkChannelDelegate : public GCMNetworkChannelDelegate { |
19 public: | 20 public: |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 delegate()->request_token_callback.Run( | 471 delegate()->request_token_callback.Run( |
471 GoogleServiceAuthError::AuthErrorNone(), "access.token"); | 472 GoogleServiceAuthError::AuthErrorNone(), "access.token"); |
472 RunLoopUntilIdle(); | 473 RunLoopUntilIdle(); |
473 EXPECT_EQ(url_fetchers_created_count(), 3); | 474 EXPECT_EQ(url_fetchers_created_count(), 3); |
474 // Echo_token should be from second message. | 475 // Echo_token should be from second message. |
475 EXPECT_EQ("echo.token", get_last_echo_token()); | 476 EXPECT_EQ("echo.token", get_last_echo_token()); |
476 } | 477 } |
477 #endif | 478 #endif |
478 | 479 |
479 } // namespace syncer | 480 } // namespace syncer |
OLD | NEW |