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/test/test_simple_task_runner.h" | 5 #include "base/test/test_simple_task_runner.h" |
6 #include "base/threading/thread_task_runner_handle.h" | 6 #include "base/threading/thread_task_runner_handle.h" |
7 #include "components/gcm_driver/gcm_channel_status_request.h" | 7 #include "components/gcm_driver/gcm_channel_status_request.h" |
| 8 #include "components/sync/protocol/experiment_status.pb.h" |
| 9 #include "components/sync/protocol/experiments_specifics.pb.h" |
8 #include "net/url_request/test_url_fetcher_factory.h" | 10 #include "net/url_request/test_url_fetcher_factory.h" |
9 #include "net/url_request/url_request_test_util.h" | 11 #include "net/url_request/url_request_test_util.h" |
10 #include "sync/protocol/experiment_status.pb.h" | |
11 #include "sync/protocol/experiments_specifics.pb.h" | |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace gcm { | 14 namespace gcm { |
15 | 15 |
16 class GCMChannelStatusRequestTest : public testing::Test { | 16 class GCMChannelStatusRequestTest : public testing::Test { |
17 public: | 17 public: |
18 GCMChannelStatusRequestTest(); | 18 GCMChannelStatusRequestTest(); |
19 ~GCMChannelStatusRequestTest() override; | 19 ~GCMChannelStatusRequestTest() override; |
20 | 20 |
21 protected: | 21 protected: |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 SetResponseProtoData(GCM_DISABLED, poll_interval_seconds); | 234 SetResponseProtoData(GCM_DISABLED, poll_interval_seconds); |
235 CompleteFetch(); | 235 CompleteFetch(); |
236 | 236 |
237 EXPECT_TRUE(request_callback_invoked_); | 237 EXPECT_TRUE(request_callback_invoked_); |
238 EXPECT_TRUE(update_received_); | 238 EXPECT_TRUE(update_received_); |
239 EXPECT_FALSE(enabled_); | 239 EXPECT_FALSE(enabled_); |
240 EXPECT_EQ(poll_interval_seconds, poll_interval_seconds_); | 240 EXPECT_EQ(poll_interval_seconds, poll_interval_seconds_); |
241 } | 241 } |
242 | 242 |
243 } // namespace gcm | 243 } // namespace gcm |
OLD | NEW |