OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "components/policy/core/common/cloud/external_policy_data_updater.h" | 5 #include "components/policy/core/common/cloud/external_policy_data_updater.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/test/test_pending_task.h" | 16 #include "base/test/test_pending_task_info.h" |
17 #include "base/test/test_simple_task_runner.h" | 17 #include "base/test/test_simple_task_runner.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "components/policy/core/common/cloud/external_policy_data_fetcher.h" | 19 #include "components/policy/core/common/cloud/external_policy_data_fetcher.h" |
20 #include "crypto/sha2.h" | 20 #include "crypto/sha2.h" |
21 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
22 #include "net/url_request/test_url_fetcher_factory.h" | 22 #include "net/url_request/test_url_fetcher_factory.h" |
23 #include "net/url_request/url_fetcher_delegate.h" | 23 #include "net/url_request/url_fetcher_delegate.h" |
24 #include "net/url_request/url_request_context_getter.h" | 24 #include "net/url_request/url_request_context_getter.h" |
25 #include "net/url_request/url_request_status.h" | 25 #include "net/url_request/url_request_status.h" |
26 #include "testing/gmock/include/gmock/gmock.h" | 26 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 // Verify that the second fetch is no longer running. | 955 // Verify that the second fetch is no longer running. |
956 EXPECT_FALSE(fetcher_factory_.GetFetcherByID(1)); | 956 EXPECT_FALSE(fetcher_factory_.GetFetcherByID(1)); |
957 | 957 |
958 // Verify that the third fetch has been started. | 958 // Verify that the third fetch has been started. |
959 fetcher = fetcher_factory_.GetFetcherByID(2); | 959 fetcher = fetcher_factory_.GetFetcherByID(2); |
960 ASSERT_TRUE(fetcher); | 960 ASSERT_TRUE(fetcher); |
961 EXPECT_EQ(GURL(kExternalPolicyDataURLs[2]), fetcher->GetOriginalURL()); | 961 EXPECT_EQ(GURL(kExternalPolicyDataURLs[2]), fetcher->GetOriginalURL()); |
962 } | 962 } |
963 | 963 |
964 } // namespace policy | 964 } // namespace policy |
OLD | NEW |