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

Side by Side Diff: chrome/browser/media/router/discovery/dial/device_description_fetcher_unittest.cc

Issue 2756483007: [Device Discovery] Move files from browser/extensions/api/dial to browser/media/router/discovery/di… (Closed)
Patch Set: add deps to extension/api/DEPS Created 3 years, 9 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "chrome/browser/extensions/api/dial/device_description_fetcher.h" 12 #include "chrome/browser/media/router/discovery/dial/device_description_fetcher. h"
13 #include "chrome/browser/extensions/api/dial/dial_device_data.h" 13 #include "chrome/browser/media/router/discovery/dial/dial_device_data.h"
14 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
15 #include "content/public/test/test_browser_thread_bundle.h" 15 #include "content/public/test/test_browser_thread_bundle.h"
16 #include "net/http/http_response_headers.h" 16 #include "net/http/http_response_headers.h"
17 #include "net/http/http_status_code.h" 17 #include "net/http/http_status_code.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.h" 19 #include "net/url_request/url_fetcher.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #include "url/gurl.h" 21 #include "url/gurl.h"
22 22
23 namespace extensions { 23 namespace media_router {
24 namespace api {
25 namespace dial {
26 24
27 class DeviceDescriptionFetcherTest : public testing::Test { 25 class DeviceDescriptionFetcherTest : public testing::Test {
28 public: 26 public:
29 DeviceDescriptionFetcherTest() : url_("http://127.0.0.1/description.xml") {} 27 DeviceDescriptionFetcherTest() : url_("http://127.0.0.1/description.xml") {}
30 28
31 void TearDown() override { 29 void TearDown() override {
32 EXPECT_FALSE(error_cb_); 30 EXPECT_FALSE(error_cb_);
33 EXPECT_FALSE(success_cb_); 31 EXPECT_FALSE(success_cb_);
34 } 32 }
35 33
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 165
168 test_fetcher->set_response_code(net::HTTP_OK); 166 test_fetcher->set_response_code(net::HTTP_OK);
169 scoped_refptr<net::HttpResponseHeaders> headers = 167 scoped_refptr<net::HttpResponseHeaders> headers =
170 new net::HttpResponseHeaders(""); 168 new net::HttpResponseHeaders("");
171 headers->AddHeader("Application-URL: http://127.0.0.1/apps"); 169 headers->AddHeader("Application-URL: http://127.0.0.1/apps");
172 test_fetcher->set_response_headers(headers); 170 test_fetcher->set_response_headers(headers);
173 test_fetcher->SetResponseString(std::string(262145, 'd')); 171 test_fetcher->SetResponseString(std::string(262145, 'd'));
174 test_fetcher->delegate()->OnURLFetchComplete(test_fetcher); 172 test_fetcher->delegate()->OnURLFetchComplete(test_fetcher);
175 } 173 }
176 174
177 } // namespace dial 175 } // namespace media_router
178 } // namespace api
179 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698