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

Side by Side Diff: chrome/service/cloud_print/printer_job_handler_unittest.cc

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/md5.h" 6 #include "base/md5.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 628
629 MockJobSpooler::MockJobSpooler() : delegate_(NULL) { 629 MockJobSpooler::MockJobSpooler() : delegate_(NULL) {
630 ON_CALL(*this, Spool(_, _, _, _, _, _, _)) 630 ON_CALL(*this, Spool(_, _, _, _, _, _, _))
631 .WillByDefault(DoAll(SaveArg<6>(&delegate_), Return(true))); 631 .WillByDefault(DoAll(SaveArg<6>(&delegate_), Return(true)));
632 } 632 }
633 633
634 MockPrintSystem::MockPrintSystem() 634 MockPrintSystem::MockPrintSystem()
635 : job_spooler_(new NiceMock<MockJobSpooler>()), 635 : job_spooler_(new NiceMock<MockJobSpooler>()),
636 printer_watcher_(new NiceMock<MockPrinterWatcher>()), 636 printer_watcher_(new NiceMock<MockPrinterWatcher>()),
637 print_server_watcher_(new NiceMock<MockPrintServerWatcher>()) { 637 print_server_watcher_(new NiceMock<MockPrintServerWatcher>()) {
638 ON_CALL(*this, CreateJobSpooler()) 638 ON_CALL(*this, CreateJobSpooler()).WillByDefault(Return(job_spooler_.get()));
639 .WillByDefault(Return(job_spooler_));
640 639
641 ON_CALL(*this, CreatePrinterWatcher(_)) 640 ON_CALL(*this, CreatePrinterWatcher(_))
642 .WillByDefault(Return(printer_watcher_)); 641 .WillByDefault(Return(printer_watcher_.get()));
643 642
644 ON_CALL(*this, CreatePrintServerWatcher()) 643 ON_CALL(*this, CreatePrintServerWatcher())
645 .WillByDefault(Return(print_server_watcher_)); 644 .WillByDefault(Return(print_server_watcher_.get()));
646 645
647 ON_CALL(*this, IsValidPrinter(_)). 646 ON_CALL(*this, IsValidPrinter(_)).
648 WillByDefault(Return(true)); 647 WillByDefault(Return(true));
649 648
650 ON_CALL(*this, ValidatePrintTicket(_, _)). 649 ON_CALL(*this, ValidatePrintTicket(_, _)).
651 WillByDefault(Return(true)); 650 WillByDefault(Return(true));
652 }; 651 };
653 652
654 // This test simulates an end-to-end printing of a document 653 // This test simulates an end-to-end printing of a document
655 // but tests only non-failure cases. 654 // but tests only non-failure cases.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 .WillOnce(InvokeWithoutArgs( 772 .WillOnce(InvokeWithoutArgs(
774 this, &PrinterJobHandlerTest::MakeJobFetchReturnNoJobs)); 773 this, &PrinterJobHandlerTest::MakeJobFetchReturnNoJobs));
775 774
776 EXPECT_CALL(url_callback_, OnRequestCreate(GURL(TicketURI(1)), _)) 775 EXPECT_CALL(url_callback_, OnRequestCreate(GURL(TicketURI(1)), _))
777 .Times(AtLeast(kNumRetriesBeforeAbandonJob)); 776 .Times(AtLeast(kNumRetriesBeforeAbandonJob));
778 777
779 BeginTest(70); 778 BeginTest(70);
780 } 779 }
781 780
782 } // namespace cloud_print 781 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/common/extensions/sync_type_unittest.cc ('k') | components/webdata/common/web_database_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698