| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 7 #include "chrome/browser/local_discovery/privet_http_impl.h" | 7 #include "chrome/browser/local_discovery/privet_http_impl.h" |
| 8 #include "net/base/host_port_pair.h" | 8 #include "net/base/host_port_pair.h" |
| 9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 10 #include "net/url_request/test_url_fetcher_factory.h" | 10 #include "net/url_request/test_url_fetcher_factory.h" |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 public: | 381 public: |
| 382 FakePWGRasterConverter() { | 382 FakePWGRasterConverter() { |
| 383 } | 383 } |
| 384 | 384 |
| 385 virtual ~FakePWGRasterConverter() { | 385 virtual ~FakePWGRasterConverter() { |
| 386 } | 386 } |
| 387 | 387 |
| 388 virtual void Start(base::RefCountedMemory* data, | 388 virtual void Start(base::RefCountedMemory* data, |
| 389 const printing::PdfRenderSettings& conversion_settings, | 389 const printing::PdfRenderSettings& conversion_settings, |
| 390 const ResultCallback& callback) OVERRIDE { | 390 const ResultCallback& callback) OVERRIDE { |
| 391 std::string data_str((const char*)data->front(), data->size()); | 391 std::string data_str(data->front_as<char>(), data->size()); |
| 392 callback.Run(true, base::FilePath().AppendASCII(data_str + "test.pdf")); | 392 callback.Run(true, base::FilePath().AppendASCII(data_str + "test.pdf")); |
| 393 } | 393 } |
| 394 }; | 394 }; |
| 395 | 395 |
| 396 TEST_F(PrivetHTTPTest, CreatePrivetStorageList) { | 396 TEST_F(PrivetHTTPTest, CreatePrivetStorageList) { |
| 397 MockJSONCallback mock_callback; | 397 MockJSONCallback mock_callback; |
| 398 scoped_ptr<PrivetJSONOperation> storage_list_operation = | 398 scoped_ptr<PrivetJSONOperation> storage_list_operation = |
| 399 privet_client_->CreateStorageListOperation( | 399 privet_client_->CreateStorageListOperation( |
| 400 "/path/to/nothing", | 400 "/path/to/nothing", |
| 401 mock_callback.callback()); | 401 mock_callback.callback()); |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 | 987 |
| 988 EXPECT_TRUE(SuccessfulResponseToURL( | 988 EXPECT_TRUE(SuccessfulResponseToURL( |
| 989 GURL("http://10.0.0.8:6006/privet/printer/createjob"), | 989 GURL("http://10.0.0.8:6006/privet/printer/createjob"), |
| 990 kSampleCreatejobResponse)); | 990 kSampleCreatejobResponse)); |
| 991 }; | 991 }; |
| 992 | 992 |
| 993 | 993 |
| 994 } // namespace | 994 } // namespace |
| 995 | 995 |
| 996 } // namespace local_discovery | 996 } // namespace local_discovery |
| OLD | NEW |