Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: components/policy/core/common/cloud/external_policy_data_fetcher_unittest.cc

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698