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/policy/cloud/external_policy_data_fetcher.h" | 5 #include "components/policy/core/common/cloud/external_policy_data_fetcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
11 #include "base/test/test_simple_task_runner.h" | 11 #include "base/test/test_simple_task_runner.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "net/url_request/test_url_fetcher_factory.h" | 13 #include "net/url_request/test_url_fetcher_factory.h" |
14 #include "net/url_request/url_fetcher.h" | 14 #include "net/url_request/url_fetcher.h" |
15 #include "net/url_request/url_fetcher_delegate.h" | 15 #include "net/url_request/url_fetcher_delegate.h" |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 // Verify that the callback is invoked with the retrieved data. | 487 // Verify that the callback is invoked with the retrieved data. |
488 owner_task_runner_->RunUntilIdle(); | 488 owner_task_runner_->RunUntilIdle(); |
489 EXPECT_EQ(1, GetAndResetCallbackCount()); | 489 EXPECT_EQ(1, GetAndResetCallbackCount()); |
490 EXPECT_EQ(1, callback_job_index_); | 490 EXPECT_EQ(1, callback_job_index_); |
491 EXPECT_EQ(ExternalPolicyDataFetcher::SUCCESS, callback_result_); | 491 EXPECT_EQ(ExternalPolicyDataFetcher::SUCCESS, callback_result_); |
492 ASSERT_TRUE(callback_data_); | 492 ASSERT_TRUE(callback_data_); |
493 EXPECT_EQ(kExternalPolicyDataPayload, *callback_data_); | 493 EXPECT_EQ(kExternalPolicyDataPayload, *callback_data_); |
494 } | 494 } |
495 | 495 |
496 } // namespace policy | 496 } // namespace policy |
OLD | NEW |