OLD | NEW |
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 "base/thread_task_runner_handle.h" | 5 #include "base/thread_task_runner_handle.h" |
6 #include "chrome/browser/local_discovery/privet_http_asynchronous_factory.h" | 6 #include "chrome/browser/printing/cloud_print/privet_http_asynchronous_factory.h
" |
7 #include "chrome/browser/local_discovery/privet_http_impl.h" | 7 #include "chrome/browser/printing/cloud_print/privet_http_impl.h" |
8 #include "chrome/browser/local_discovery/privet_notifications.h" | 8 #include "chrome/browser/printing/cloud_print/privet_notifications.h" |
9 #include "net/url_request/test_url_fetcher_factory.h" | 9 #include "net/url_request/test_url_fetcher_factory.h" |
10 #include "net/url_request/url_request_test_util.h" | 10 #include "net/url_request/url_request_test_util.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 using testing::StrictMock; | 14 using testing::StrictMock; |
15 | 15 |
16 using ::testing::_; | 16 using ::testing::_; |
17 using ::testing::SaveArg; | 17 using ::testing::SaveArg; |
18 | 18 |
19 namespace local_discovery { | 19 namespace cloud_print { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 const char kExampleDeviceName[] = "test._privet._tcp.local"; | 23 const char kExampleDeviceName[] = "test._privet._tcp.local"; |
24 const char kExampleDeviceHumanName[] = "Test device"; | 24 const char kExampleDeviceHumanName[] = "Test device"; |
25 const char kExampleDeviceDescription[] = "Testing testing"; | 25 const char kExampleDeviceDescription[] = "Testing testing"; |
26 const char kExampleDeviceID[] = "__test__id"; | 26 const char kExampleDeviceID[] = "__test__id"; |
27 const char kDeviceInfoURL[] = "http://1.2.3.4:8080/privet/info"; | 27 const char kDeviceInfoURL[] = "http://1.2.3.4:8080/privet/info"; |
28 | 28 |
29 const char kInfoResponseUptime20[] = "{\"uptime\": 20}"; | 29 const char kInfoResponseUptime20[] = "{\"uptime\": 20}"; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 notification_listener_->DeviceChanged( | 207 notification_listener_->DeviceChanged( |
208 true, | 208 true, |
209 kExampleDeviceName, | 209 kExampleDeviceName, |
210 description_); | 210 description_); |
211 | 211 |
212 SuccessfulResponseToInfo(kInfoResponseNoUptime); | 212 SuccessfulResponseToInfo(kInfoResponseNoUptime); |
213 } | 213 } |
214 | 214 |
215 } // namespace | 215 } // namespace |
216 | 216 |
217 } // namespace local_discovery | 217 } // namespace cloud_print |
OLD | NEW |