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

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

Issue 2365623003: Remove unused thread.h include in trace_event_impl.h and fix IWUU. (Closed)
Patch Set: Whitelist base DEPS for all web/tests Created 4 years, 2 months 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
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 "components/policy/core/common/cloud/policy_header_io_helper.h" 5 #include "components/policy/core/common/cloud/policy_header_io_helper.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/message_loop/message_loop.h"
10 #include "base/test/test_simple_task_runner.h" 11 #include "base/test/test_simple_task_runner.h"
11 #include "net/http/http_request_headers.h" 12 #include "net/http/http_request_headers.h"
12 #include "net/url_request/url_request.h" 13 #include "net/url_request/url_request.h"
13 #include "net/url_request/url_request_test_util.h" 14 #include "net/url_request/url_request_test_util.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 16
16 namespace policy { 17 namespace policy {
17 18
18 namespace { 19 namespace {
19 const char kDMServerURL[] = "http://server_url"; 20 const char kDMServerURL[] = "http://server_url";
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 TEST_F(PolicyHeaderIOHelperTest, ChangeToNoHeader) { 80 TEST_F(PolicyHeaderIOHelperTest, ChangeToNoHeader) {
80 helper_->UpdateHeader(""); 81 helper_->UpdateHeader("");
81 task_runner_->RunUntilIdle(); 82 task_runner_->RunUntilIdle();
82 std::unique_ptr<net::URLRequest> request( 83 std::unique_ptr<net::URLRequest> request(
83 context_.CreateRequest(GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL)); 84 context_.CreateRequest(GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL));
84 helper_->AddPolicyHeaders(request->url(), request.get()); 85 helper_->AddPolicyHeaders(request->url(), request.get());
85 EXPECT_TRUE(request->extra_request_headers().IsEmpty()); 86 EXPECT_TRUE(request->extra_request_headers().IsEmpty());
86 } 87 }
87 88
88 } // namespace policy 89 } // namespace policy
OLDNEW
« no previous file with comments | « components/leveldb/leveldb_mojo_proxy.cc ('k') | components/policy/core/common/cloud/policy_header_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698