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 "chrome/browser/policy/cloud/external_policy_data_updater.h" | 5 #include "components/policy/core/common/cloud/external_policy_data_updater.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/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/sha1.h" | 12 #include "base/sha1.h" |
13 #include "base/test/test_pending_task.h" | 13 #include "base/test/test_pending_task.h" |
14 #include "base/test/test_simple_task_runner.h" | 14 #include "base/test/test_simple_task_runner.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "chrome/browser/policy/cloud/external_policy_data_fetcher.h" | 16 #include "components/policy/core/common/cloud/external_policy_data_fetcher.h" |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
18 #include "net/url_request/test_url_fetcher_factory.h" | 18 #include "net/url_request/test_url_fetcher_factory.h" |
19 #include "net/url_request/url_fetcher_delegate.h" | 19 #include "net/url_request/url_fetcher_delegate.h" |
20 #include "net/url_request/url_request_context_getter.h" | 20 #include "net/url_request/url_request_context_getter.h" |
21 #include "net/url_request/url_request_status.h" | 21 #include "net/url_request/url_request_status.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
25 | 25 |
26 using testing::Mock; | 26 using testing::Mock; |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 // Verify that the second fetch is no longer running. | 953 // Verify that the second fetch is no longer running. |
954 EXPECT_FALSE(fetcher_factory_.GetFetcherByID(1)); | 954 EXPECT_FALSE(fetcher_factory_.GetFetcherByID(1)); |
955 | 955 |
956 // Verify that the third fetch has been started. | 956 // Verify that the third fetch has been started. |
957 fetcher = fetcher_factory_.GetFetcherByID(2); | 957 fetcher = fetcher_factory_.GetFetcherByID(2); |
958 ASSERT_TRUE(fetcher); | 958 ASSERT_TRUE(fetcher); |
959 EXPECT_EQ(GURL(kExternalPolicyDataURLs[2]), fetcher->GetOriginalURL()); | 959 EXPECT_EQ(GURL(kExternalPolicyDataURLs[2]), fetcher->GetOriginalURL()); |
960 } | 960 } |
961 | 961 |
962 } // namespace policy | 962 } // namespace policy |
OLD | NEW |