| 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/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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 i+1); | 202 i+1); |
| 203 if (i != num_jobs-1) job_objects = job_objects + ","; | 203 if (i != num_jobs-1) job_objects = job_objects + ","; |
| 204 } | 204 } |
| 205 return StringPrintf(kExampleJobListResponse, job_objects.c_str()); | 205 return StringPrintf(kExampleJobListResponse, job_objects.c_str()); |
| 206 } | 206 } |
| 207 | 207 |
| 208 GURL JobListURI(const char* reason) { | 208 GURL JobListURI(const char* reason) { |
| 209 return GURL(StringPrintf(kExamplePrinterJobListURI, reason)); | 209 return GURL(StringPrintf(kExamplePrinterJobListURI, reason)); |
| 210 } | 210 } |
| 211 | 211 |
| 212 std::string JobID(int job_num) { | |
| 213 return StringPrintf(kExampleJobID, job_num); | |
| 214 } | |
| 215 | |
| 216 GURL DoneURI(int job_num) { | 212 GURL DoneURI(int job_num) { |
| 217 return GURL(StringPrintf(kExampleUpdateDoneURI, job_num)); | 213 return GURL(StringPrintf(kExampleUpdateDoneURI, job_num)); |
| 218 } | 214 } |
| 219 | 215 |
| 220 GURL ErrorURI(int job_num) { | 216 GURL ErrorURI(int job_num) { |
| 221 return GURL(StringPrintf(kExampleUpdateErrorURI, job_num)); | 217 return GURL(StringPrintf(kExampleUpdateErrorURI, job_num)); |
| 222 } | 218 } |
| 223 | 219 |
| 224 GURL TicketURI(int job_num) { | 220 GURL TicketURI(int job_num) { |
| 225 return GURL(StringPrintf(kExamplePrintTicketURI, job_num)); | 221 return GURL(StringPrintf(kExamplePrintTicketURI, job_num)); |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 .WillOnce(InvokeWithoutArgs( | 800 .WillOnce(InvokeWithoutArgs( |
| 805 this, &PrinterJobHandlerTest::MakeJobFetchReturnNoJobs)); | 801 this, &PrinterJobHandlerTest::MakeJobFetchReturnNoJobs)); |
| 806 | 802 |
| 807 EXPECT_CALL(url_callback_, OnRequestCreate(TicketURI(1), _)) | 803 EXPECT_CALL(url_callback_, OnRequestCreate(TicketURI(1), _)) |
| 808 .Times(AtLeast(kNumRetriesBeforeAbandonJob)); | 804 .Times(AtLeast(kNumRetriesBeforeAbandonJob)); |
| 809 | 805 |
| 810 BeginTest(70); | 806 BeginTest(70); |
| 811 } | 807 } |
| 812 | 808 |
| 813 } // namespace cloud_print | 809 } // namespace cloud_print |
| OLD | NEW |