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

Side by Side Diff: chrome/browser/extensions/api/gcd_private/gcd_private_apitest.cc

Issue 1558513002: Global conversion of Pass()→std::move() on OS=linux (GYP edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatted Created 4 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input_ime/input_ime_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/extensions/api/gcd_private/gcd_private_api.h" 8 #include "chrome/browser/extensions/api/gcd_private/gcd_private_api.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/local_discovery/test_service_discovery_client.h" 10 #include "chrome/browser/local_discovery/test_service_discovery_client.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 net::URLFetcherDelegate* fetcher_delegate, 96 net::URLFetcherDelegate* fetcher_delegate,
97 const std::string& response_data, 97 const std::string& response_data,
98 net::HttpStatusCode response_code, 98 net::HttpStatusCode response_code,
99 net::URLRequestStatus::Status status) { 99 net::URLRequestStatus::Status status) {
100 scoped_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher( 100 scoped_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher(
101 url, fetcher_delegate, response_data, response_code, status)); 101 url, fetcher_delegate, response_data, response_code, status));
102 scoped_refptr<net::HttpResponseHeaders> headers = 102 scoped_refptr<net::HttpResponseHeaders> headers =
103 new net::HttpResponseHeaders(""); 103 new net::HttpResponseHeaders("");
104 headers->AddHeader("Content-Type: application/json"); 104 headers->AddHeader("Content-Type: application/json");
105 fetcher->set_response_headers(headers); 105 fetcher->set_response_headers(headers);
106 return fetcher.Pass(); 106 return fetcher;
107 } 107 }
108 108
109 protected: 109 protected:
110 net::URLFetcherImplFactory url_fetcher_impl_factory_; 110 net::URLFetcherImplFactory url_fetcher_impl_factory_;
111 net::FakeURLFetcherFactory url_fetcher_factory_; 111 net::FakeURLFetcherFactory url_fetcher_factory_;
112 }; 112 };
113 113
114 class GcdPrivateWithMdnsAPITest : public GcdPrivateAPITest { 114 class GcdPrivateWithMdnsAPITest : public GcdPrivateAPITest {
115 public: 115 public:
116 void SetUpOnMainThread() override { 116 void SetUpOnMainThread() override {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 test_service_discovery_client_->SimulateReceive(kAnnouncePacket, 154 test_service_discovery_client_->SimulateReceive(kAnnouncePacket,
155 sizeof(kAnnouncePacket)); 155 sizeof(kAnnouncePacket));
156 url_fetcher_factory_.SetFakeResponse(GURL("http://1.2.3.4:8888/privet/info"), 156 url_fetcher_factory_.SetFakeResponse(GURL("http://1.2.3.4:8888/privet/info"),
157 kPrivetInfoResponse, 157 kPrivetInfoResponse,
158 net::HTTP_OK, 158 net::HTTP_OK,
159 net::URLRequestStatus::SUCCESS); 159 net::URLRequestStatus::SUCCESS);
160 EXPECT_TRUE(RunExtensionSubtest("gcd_private/api", "session.html")); 160 EXPECT_TRUE(RunExtensionSubtest("gcd_private/api", "session.html"));
161 } 161 }
162 162
163 } // namespace 163 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input_ime/input_ime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698