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

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

Issue 126103003: Changed RefCountedStaticMemory() to accept a void pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 10 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 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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/devtools/browser_list_tabcontents_provider.cc ('k') | chrome/browser/local_discovery/pwg_raster_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698