| OLD | NEW |
| 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 "base/threading/thread_task_runner_handle.h" |
| 8 #include "chrome/browser/extensions/api/gcd_private/gcd_private_api.h" | 9 #include "chrome/browser/extensions/api/gcd_private/gcd_private_api.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/local_discovery/test_service_discovery_client.h" | 11 #include "chrome/browser/local_discovery/test_service_discovery_client.h" |
| 11 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 12 #include "extensions/common/switches.h" | 13 #include "extensions/common/switches.h" |
| 13 #include "net/http/http_response_headers.h" | 14 #include "net/http/http_response_headers.h" |
| 14 #include "net/url_request/test_url_fetcher_factory.h" | 15 #include "net/url_request/test_url_fetcher_factory.h" |
| 15 | 16 |
| 16 namespace api = extensions::api; | 17 namespace api = extensions::api; |
| 17 | 18 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 test_service_discovery_client_->SimulateReceive(kAnnouncePacket, | 156 test_service_discovery_client_->SimulateReceive(kAnnouncePacket, |
| 156 sizeof(kAnnouncePacket)); | 157 sizeof(kAnnouncePacket)); |
| 157 url_fetcher_factory_.SetFakeResponse(GURL("http://1.2.3.4:8888/privet/info"), | 158 url_fetcher_factory_.SetFakeResponse(GURL("http://1.2.3.4:8888/privet/info"), |
| 158 kPrivetInfoResponse, | 159 kPrivetInfoResponse, |
| 159 net::HTTP_OK, | 160 net::HTTP_OK, |
| 160 net::URLRequestStatus::SUCCESS); | 161 net::URLRequestStatus::SUCCESS); |
| 161 EXPECT_TRUE(RunExtensionSubtest("gcd_private/api", "session.html")); | 162 EXPECT_TRUE(RunExtensionSubtest("gcd_private/api", "session.html")); |
| 162 } | 163 } |
| 163 | 164 |
| 164 } // namespace | 165 } // namespace |
| OLD | NEW |