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

Side by Side Diff: chrome/browser/local_discovery/privet_http_unittest.cc

Issue 78173002: Pass PWG raster conversion settings from Preview to Converter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 // it's easier to test that way. Instead of using a mock, we simply check if the 399 // it's easier to test that way. Instead of using a mock, we simply check if the
400 // request is uploading a file that is based on this pattern. 400 // request is uploading a file that is based on this pattern.
401 class FakePWGRasterConverter : public PWGRasterConverter { 401 class FakePWGRasterConverter : public PWGRasterConverter {
402 public: 402 public:
403 FakePWGRasterConverter() { 403 FakePWGRasterConverter() {
404 } 404 }
405 405
406 virtual ~FakePWGRasterConverter() { 406 virtual ~FakePWGRasterConverter() {
407 } 407 }
408 408
409 virtual void Start(base::RefCountedBytes* data, 409 virtual void Start(base::RefCountedMemory* data,
410 const printing::PdfRenderSettings& conversion_settings,
410 const ResultCallback& callback) OVERRIDE { 411 const ResultCallback& callback) OVERRIDE {
411 std::string data_str((const char*)data->front(), data->size()); 412 std::string data_str((const char*)data->front(), data->size());
412 callback.Run(true, base::FilePath().AppendASCII(data_str + "test.pdf")); 413 callback.Run(true, base::FilePath().AppendASCII(data_str + "test.pdf"));
413 } 414 }
414 }; 415 };
415 416
416 417
417 class PrivetInfoTest : public PrivetHTTPTest { 418 class PrivetInfoTest : public PrivetHTTPTest {
418 public: 419 public:
419 PrivetInfoTest() {} 420 PrivetInfoTest() {}
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 981
981 EXPECT_TRUE(SuccessfulResponseToURL( 982 EXPECT_TRUE(SuccessfulResponseToURL(
982 GURL("http://10.0.0.8:6006/privet/printer/createjob"), 983 GURL("http://10.0.0.8:6006/privet/printer/createjob"),
983 kSampleCreatejobResponse)); 984 kSampleCreatejobResponse));
984 }; 985 };
985 986
986 987
987 } // namespace 988 } // namespace
988 989
989 } // namespace local_discovery 990 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/local_discovery/privet_http_impl.cc ('k') | chrome/browser/local_discovery/pwg_raster_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698