| OLD | NEW |
| 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/location.h" | 6 #include "base/location.h" |
| 7 #include "base/md5.h" | 7 #include "base/md5.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 public: | 284 public: |
| 285 scoped_ptr<net::FakeURLFetcher> CreateURLFetcher( | 285 scoped_ptr<net::FakeURLFetcher> CreateURLFetcher( |
| 286 const GURL& url, | 286 const GURL& url, |
| 287 net::URLFetcherDelegate* d, | 287 net::URLFetcherDelegate* d, |
| 288 const std::string& response_data, | 288 const std::string& response_data, |
| 289 net::HttpStatusCode response_code, | 289 net::HttpStatusCode response_code, |
| 290 net::URLRequestStatus::Status status) { | 290 net::URLRequestStatus::Status status) { |
| 291 scoped_ptr<net::FakeURLFetcher> fetcher( | 291 scoped_ptr<net::FakeURLFetcher> fetcher( |
| 292 new net::FakeURLFetcher(url, d, response_data, response_code, status)); | 292 new net::FakeURLFetcher(url, d, response_data, response_code, status)); |
| 293 OnRequestCreate(url, fetcher.get()); | 293 OnRequestCreate(url, fetcher.get()); |
| 294 return fetcher.Pass(); | 294 return fetcher; |
| 295 } | 295 } |
| 296 MOCK_METHOD2(OnRequestCreate, | 296 MOCK_METHOD2(OnRequestCreate, |
| 297 void(const GURL&, net::FakeURLFetcher*)); | 297 void(const GURL&, net::FakeURLFetcher*)); |
| 298 }; | 298 }; |
| 299 | 299 |
| 300 | 300 |
| 301 class MockPrinterJobHandlerDelegate | 301 class MockPrinterJobHandlerDelegate |
| 302 : public PrinterJobHandler::Delegate { | 302 : public PrinterJobHandler::Delegate { |
| 303 public: | 303 public: |
| 304 MOCK_METHOD0(OnAuthError, void()); | 304 MOCK_METHOD0(OnAuthError, void()); |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 .WillOnce(InvokeWithoutArgs( | 818 .WillOnce(InvokeWithoutArgs( |
| 819 this, &PrinterJobHandlerTest::MakeJobFetchReturnNoJobs)); | 819 this, &PrinterJobHandlerTest::MakeJobFetchReturnNoJobs)); |
| 820 | 820 |
| 821 EXPECT_CALL(url_callback_, OnRequestCreate(TicketURI(1), _)) | 821 EXPECT_CALL(url_callback_, OnRequestCreate(TicketURI(1), _)) |
| 822 .Times(AtLeast(kNumRetriesBeforeAbandonJob)); | 822 .Times(AtLeast(kNumRetriesBeforeAbandonJob)); |
| 823 | 823 |
| 824 BeginTest(70); | 824 BeginTest(70); |
| 825 } | 825 } |
| 826 | 826 |
| 827 } // namespace cloud_print | 827 } // namespace cloud_print |
| OLD | NEW |