OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/service/cloud_print/printer_job_handler_unittest_constants.h" |
| 6 |
| 7 |
| 8 namespace cloud_print { |
| 9 const char kExampleJobListResponse[] = "{" |
| 10 " \"success\": true," |
| 11 " \"jobs\": [" |
| 12 " {" |
| 13 " \"tags\": [" |
| 14 " \"^own\"" |
| 15 " ]," |
| 16 " \"printerName\": \"Example Printer\"," |
| 17 " \"status\": \"QUEUED\"," |
| 18 " \"ownerId\": \"sampleuser@gmail.com\"," |
| 19 " \"ticketUrl\": \"https://www.google.com/cloudprint/ticket?exampleURI1\"," |
| 20 " \"printerid\": \"__example_printer_id\"," |
| 21 " \"printerType\": \"GOOGLE\"," |
| 22 " \"contentType\": \"text/html\"," |
| 23 " \"fileUrl\": \"https://www.google.com/cloudprint/download?exampleURI1\"," |
| 24 " \"id\": \"__example_job_id1\"," |
| 25 " \"message\": \"\"," |
| 26 " \"title\": \"Example Job 1\"," |
| 27 " \"errorCode\": \"\"," |
| 28 " \"numberOfPages\": 3" |
| 29 " }" |
| 30 " ]," |
| 31 " \"xsrf_token\": \"AIp06DjUd3AV6BO0aujB9NvM2a9ZbogxOQ:1360021066932\"," |
| 32 " \"request\": {" |
| 33 " \"time\": \"0\"," |
| 34 " \"users\": [" |
| 35 " \"sampleuser@gmail.com\"" |
| 36 " ]," |
| 37 " \"params\": {" |
| 38 " \"printerid\": [" |
| 39 " \"__example_printer_id\"" |
| 40 " ]" |
| 41 " }," |
| 42 " \"user\": \"sampleuser@gmail.com\"" |
| 43 " }" |
| 44 "}"; |
| 45 |
| 46 const char kExampleJobListResponseEmpty[] = "{" |
| 47 " \"success\": true," |
| 48 " \"jobs\": [" |
| 49 " ]," |
| 50 " \"xsrf_token\": \"AIp06DjUd3AV6BO0aujB9NvM2a9ZbogxOQ:1360021066932\"," |
| 51 " \"request\": {" |
| 52 " \"time\": \"0\"," |
| 53 " \"users\": [" |
| 54 " \"sampleuser@gmail.com\"" |
| 55 " ]," |
| 56 " \"params\": {" |
| 57 " \"printerid\": [" |
| 58 " \"__example_printer_id\"" |
| 59 " ]" |
| 60 " }," |
| 61 " \"user\": \"sampleuser@gmail.com\"" |
| 62 " }" |
| 63 "}"; |
| 64 |
| 65 |
| 66 |
| 67 const char kExampleJobID[] = "__example_job_id1"; |
| 68 |
| 69 const char kExampleCloudPrintServerURL[] = "https://www.google.com/cloudprint/"; |
| 70 |
| 71 const char kExamplePrintTicket[] = "{\"MediaType\":\"plain\"," |
| 72 "\"Resolution\":\"300x300dpi\",\"PageRegion\":\"Letter\"," |
| 73 "\"InputSlot\":\"auto\",\"PageSize\":\"Letter\",\"EconoMode\":\"off\"}"; |
| 74 |
| 75 const char kExamplePrintTicketURI[] = |
| 76 "https://www.google.com/cloudprint/ticket?exampleURI1"; |
| 77 |
| 78 const char kExamplePrintDownloadURI[] = |
| 79 "https://www.google.com/cloudprint/download?exampleURI1"; |
| 80 |
| 81 // Use StringPrintf to construct |
| 82 const char kExamplePrinterJobListURI[] = |
| 83 "https://www.google.com/cloudprint/fetch" |
| 84 "?printerid=__example_printer_id&deb=%s"; |
| 85 |
| 86 // Use StringPrintf to construct |
| 87 const char kExamplePrinterJobControlURI[] = |
| 88 "https://www.google.com/cloudprint/control" |
| 89 "?jobid=__example_printer_id&status=%s"; |
| 90 |
| 91 |
| 92 // Use StringPrintf to construct |
| 93 const char kExampleControlResponse[] = "{" |
| 94 " \"success\": true," |
| 95 " \"message\": \"Print job updated successfully.\"," |
| 96 " \"xsrf_token\": \"AIp06DjKgbfGalbqzj23V1bU6i-vtR2B4w:1360023068789\"," |
| 97 " \"request\": {" |
| 98 " \"time\": \"0\"," |
| 99 " \"users\": [" |
| 100 " \"sampleuser@gmail.com\"" |
| 101 " ]," |
| 102 " \"params\": {" |
| 103 " \"xsrf\": [" |
| 104 " \"AIp06DgeGIETs42Cj28QWmxGPWVDiaXwVQ:1360023041852\"" |
| 105 " ]," |
| 106 " \"status\": [" |
| 107 " \"%s\"" |
| 108 " ]," |
| 109 " \"jobid\": [" |
| 110 " \"__example_job_id1\"" |
| 111 " ]" |
| 112 " }," |
| 113 " \"user\": \"sampleuser@gmail.com\"" |
| 114 " }," |
| 115 " \"job\": {" |
| 116 " \"tags\": [" |
| 117 " \"^own\"" |
| 118 " ]," |
| 119 " \"printerName\": \"Example Printer\"," |
| 120 " \"status\": \"%s\"," |
| 121 " \"ownerId\": \"sampleuser@gmail.com\"," |
| 122 " \"ticketUrl\": \"https://www.google.com/cloudprint/ticket?exampleURI1\"," |
| 123 " \"printerid\": \"__example_printer_id\"," |
| 124 " \"contentType\": \"text/html\"," |
| 125 " \"fileUrl\": \"https://www.google.com/cloudprint/download?exampleURI1\"," |
| 126 " \"id\": \"__example_job_id1\"," |
| 127 " \"message\": \"\"," |
| 128 " \"title\": \"Example Job\"," |
| 129 " \"errorCode\": \"\"," |
| 130 " \"numberOfPages\": 3" |
| 131 " }" |
| 132 "}"; |
| 133 |
| 134 const char kExamplePrinterID[] = "__example_printer_id"; |
| 135 |
| 136 const char kExamplePrinterCapabilities[] = ""; |
| 137 |
| 138 const char kExampleCapsMimeType[] = ""; |
| 139 |
| 140 // These can stay empty |
| 141 const char kExampleDefaults[] = ""; |
| 142 |
| 143 const char kExampleDefaultMimeType[] = ""; |
| 144 |
| 145 // Since we're not connecting to the server, this can be any non-empty string. |
| 146 const char kExampleCloudPrintOAuthToken[] = "__SAMPLE_TOKEN"; |
| 147 |
| 148 |
| 149 // Not actually printing, no need for real PDF. |
| 150 const char kExamplePrintData[] = "__EXAMPLE_PRINT_DATA"; |
| 151 |
| 152 const char kExampleJobDownloadResponseHeaders[] = |
| 153 "Content-Type: Application/PDF\n"; |
| 154 |
| 155 const char kExampleUpdateDoneURL[] = |
| 156 "https://www.google.com/cloudprint/control?jobid=__example_job_id1" |
| 157 "&status=DONE&code=0&message=&numpages=0&pagesprinted=0"; |
| 158 |
| 159 const char kExamplePrinterName[] = "Example Printer"; |
| 160 |
| 161 const char kExamplePrinterDescription[] = "Example Description"; |
| 162 } // namespace cloud_print |
| 163 |
OLD | NEW |