| OLD | NEW |
| 1 library googleapis.pagespeedonline.v2.test; | 1 library googleapis.pagespeedonline.v2.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 buildCounterPagespeedApiFormatStringV2ArgsRects++; | 69 buildCounterPagespeedApiFormatStringV2ArgsRects++; |
| 70 if (buildCounterPagespeedApiFormatStringV2ArgsRects < 3) { | 70 if (buildCounterPagespeedApiFormatStringV2ArgsRects < 3) { |
| 71 unittest.expect(o.height, unittest.equals(42)); | 71 unittest.expect(o.height, unittest.equals(42)); |
| 72 unittest.expect(o.left, unittest.equals(42)); | 72 unittest.expect(o.left, unittest.equals(42)); |
| 73 unittest.expect(o.top, unittest.equals(42)); | 73 unittest.expect(o.top, unittest.equals(42)); |
| 74 unittest.expect(o.width, unittest.equals(42)); | 74 unittest.expect(o.width, unittest.equals(42)); |
| 75 } | 75 } |
| 76 buildCounterPagespeedApiFormatStringV2ArgsRects--; | 76 buildCounterPagespeedApiFormatStringV2ArgsRects--; |
| 77 } | 77 } |
| 78 | 78 |
| 79 buildUnnamed996() { | 79 buildUnnamed1953() { |
| 80 var o = new core.List<api.PagespeedApiFormatStringV2ArgsRects>(); | 80 var o = new core.List<api.PagespeedApiFormatStringV2ArgsRects>(); |
| 81 o.add(buildPagespeedApiFormatStringV2ArgsRects()); | 81 o.add(buildPagespeedApiFormatStringV2ArgsRects()); |
| 82 o.add(buildPagespeedApiFormatStringV2ArgsRects()); | 82 o.add(buildPagespeedApiFormatStringV2ArgsRects()); |
| 83 return o; | 83 return o; |
| 84 } | 84 } |
| 85 | 85 |
| 86 checkUnnamed996(core.List<api.PagespeedApiFormatStringV2ArgsRects> o) { | 86 checkUnnamed1953(core.List<api.PagespeedApiFormatStringV2ArgsRects> o) { |
| 87 unittest.expect(o, unittest.hasLength(2)); | 87 unittest.expect(o, unittest.hasLength(2)); |
| 88 checkPagespeedApiFormatStringV2ArgsRects(o[0]); | 88 checkPagespeedApiFormatStringV2ArgsRects(o[0]); |
| 89 checkPagespeedApiFormatStringV2ArgsRects(o[1]); | 89 checkPagespeedApiFormatStringV2ArgsRects(o[1]); |
| 90 } | 90 } |
| 91 | 91 |
| 92 core.int buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects = 0; | 92 core.int buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects = 0; |
| 93 buildPagespeedApiFormatStringV2ArgsSecondaryRects() { | 93 buildPagespeedApiFormatStringV2ArgsSecondaryRects() { |
| 94 var o = new api.PagespeedApiFormatStringV2ArgsSecondaryRects(); | 94 var o = new api.PagespeedApiFormatStringV2ArgsSecondaryRects(); |
| 95 buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects++; | 95 buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects++; |
| 96 if (buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects < 3) { | 96 if (buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects < 3) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 107 buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects++; | 107 buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects++; |
| 108 if (buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects < 3) { | 108 if (buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects < 3) { |
| 109 unittest.expect(o.height, unittest.equals(42)); | 109 unittest.expect(o.height, unittest.equals(42)); |
| 110 unittest.expect(o.left, unittest.equals(42)); | 110 unittest.expect(o.left, unittest.equals(42)); |
| 111 unittest.expect(o.top, unittest.equals(42)); | 111 unittest.expect(o.top, unittest.equals(42)); |
| 112 unittest.expect(o.width, unittest.equals(42)); | 112 unittest.expect(o.width, unittest.equals(42)); |
| 113 } | 113 } |
| 114 buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects--; | 114 buildCounterPagespeedApiFormatStringV2ArgsSecondaryRects--; |
| 115 } | 115 } |
| 116 | 116 |
| 117 buildUnnamed997() { | 117 buildUnnamed1954() { |
| 118 var o = new core.List<api.PagespeedApiFormatStringV2ArgsSecondaryRects>(); | 118 var o = new core.List<api.PagespeedApiFormatStringV2ArgsSecondaryRects>(); |
| 119 o.add(buildPagespeedApiFormatStringV2ArgsSecondaryRects()); | 119 o.add(buildPagespeedApiFormatStringV2ArgsSecondaryRects()); |
| 120 o.add(buildPagespeedApiFormatStringV2ArgsSecondaryRects()); | 120 o.add(buildPagespeedApiFormatStringV2ArgsSecondaryRects()); |
| 121 return o; | 121 return o; |
| 122 } | 122 } |
| 123 | 123 |
| 124 checkUnnamed997(core.List<api.PagespeedApiFormatStringV2ArgsSecondaryRects> o) { | 124 checkUnnamed1954(core.List<api.PagespeedApiFormatStringV2ArgsSecondaryRects> o)
{ |
| 125 unittest.expect(o, unittest.hasLength(2)); | 125 unittest.expect(o, unittest.hasLength(2)); |
| 126 checkPagespeedApiFormatStringV2ArgsSecondaryRects(o[0]); | 126 checkPagespeedApiFormatStringV2ArgsSecondaryRects(o[0]); |
| 127 checkPagespeedApiFormatStringV2ArgsSecondaryRects(o[1]); | 127 checkPagespeedApiFormatStringV2ArgsSecondaryRects(o[1]); |
| 128 } | 128 } |
| 129 | 129 |
| 130 core.int buildCounterPagespeedApiFormatStringV2Args = 0; | 130 core.int buildCounterPagespeedApiFormatStringV2Args = 0; |
| 131 buildPagespeedApiFormatStringV2Args() { | 131 buildPagespeedApiFormatStringV2Args() { |
| 132 var o = new api.PagespeedApiFormatStringV2Args(); | 132 var o = new api.PagespeedApiFormatStringV2Args(); |
| 133 buildCounterPagespeedApiFormatStringV2Args++; | 133 buildCounterPagespeedApiFormatStringV2Args++; |
| 134 if (buildCounterPagespeedApiFormatStringV2Args < 3) { | 134 if (buildCounterPagespeedApiFormatStringV2Args < 3) { |
| 135 o.key = "foo"; | 135 o.key = "foo"; |
| 136 o.rects = buildUnnamed996(); | 136 o.rects = buildUnnamed1953(); |
| 137 o.secondaryRects = buildUnnamed997(); | 137 o.secondaryRects = buildUnnamed1954(); |
| 138 o.type = "foo"; | 138 o.type = "foo"; |
| 139 o.value = "foo"; | 139 o.value = "foo"; |
| 140 } | 140 } |
| 141 buildCounterPagespeedApiFormatStringV2Args--; | 141 buildCounterPagespeedApiFormatStringV2Args--; |
| 142 return o; | 142 return o; |
| 143 } | 143 } |
| 144 | 144 |
| 145 checkPagespeedApiFormatStringV2Args(api.PagespeedApiFormatStringV2Args o) { | 145 checkPagespeedApiFormatStringV2Args(api.PagespeedApiFormatStringV2Args o) { |
| 146 buildCounterPagespeedApiFormatStringV2Args++; | 146 buildCounterPagespeedApiFormatStringV2Args++; |
| 147 if (buildCounterPagespeedApiFormatStringV2Args < 3) { | 147 if (buildCounterPagespeedApiFormatStringV2Args < 3) { |
| 148 unittest.expect(o.key, unittest.equals('foo')); | 148 unittest.expect(o.key, unittest.equals('foo')); |
| 149 checkUnnamed996(o.rects); | 149 checkUnnamed1953(o.rects); |
| 150 checkUnnamed997(o.secondaryRects); | 150 checkUnnamed1954(o.secondaryRects); |
| 151 unittest.expect(o.type, unittest.equals('foo')); | 151 unittest.expect(o.type, unittest.equals('foo')); |
| 152 unittest.expect(o.value, unittest.equals('foo')); | 152 unittest.expect(o.value, unittest.equals('foo')); |
| 153 } | 153 } |
| 154 buildCounterPagespeedApiFormatStringV2Args--; | 154 buildCounterPagespeedApiFormatStringV2Args--; |
| 155 } | 155 } |
| 156 | 156 |
| 157 buildUnnamed998() { | 157 buildUnnamed1955() { |
| 158 var o = new core.List<api.PagespeedApiFormatStringV2Args>(); | 158 var o = new core.List<api.PagespeedApiFormatStringV2Args>(); |
| 159 o.add(buildPagespeedApiFormatStringV2Args()); | 159 o.add(buildPagespeedApiFormatStringV2Args()); |
| 160 o.add(buildPagespeedApiFormatStringV2Args()); | 160 o.add(buildPagespeedApiFormatStringV2Args()); |
| 161 return o; | 161 return o; |
| 162 } | 162 } |
| 163 | 163 |
| 164 checkUnnamed998(core.List<api.PagespeedApiFormatStringV2Args> o) { | 164 checkUnnamed1955(core.List<api.PagespeedApiFormatStringV2Args> o) { |
| 165 unittest.expect(o, unittest.hasLength(2)); | 165 unittest.expect(o, unittest.hasLength(2)); |
| 166 checkPagespeedApiFormatStringV2Args(o[0]); | 166 checkPagespeedApiFormatStringV2Args(o[0]); |
| 167 checkPagespeedApiFormatStringV2Args(o[1]); | 167 checkPagespeedApiFormatStringV2Args(o[1]); |
| 168 } | 168 } |
| 169 | 169 |
| 170 core.int buildCounterPagespeedApiFormatStringV2 = 0; | 170 core.int buildCounterPagespeedApiFormatStringV2 = 0; |
| 171 buildPagespeedApiFormatStringV2() { | 171 buildPagespeedApiFormatStringV2() { |
| 172 var o = new api.PagespeedApiFormatStringV2(); | 172 var o = new api.PagespeedApiFormatStringV2(); |
| 173 buildCounterPagespeedApiFormatStringV2++; | 173 buildCounterPagespeedApiFormatStringV2++; |
| 174 if (buildCounterPagespeedApiFormatStringV2 < 3) { | 174 if (buildCounterPagespeedApiFormatStringV2 < 3) { |
| 175 o.args = buildUnnamed998(); | 175 o.args = buildUnnamed1955(); |
| 176 o.format = "foo"; | 176 o.format = "foo"; |
| 177 } | 177 } |
| 178 buildCounterPagespeedApiFormatStringV2--; | 178 buildCounterPagespeedApiFormatStringV2--; |
| 179 return o; | 179 return o; |
| 180 } | 180 } |
| 181 | 181 |
| 182 checkPagespeedApiFormatStringV2(api.PagespeedApiFormatStringV2 o) { | 182 checkPagespeedApiFormatStringV2(api.PagespeedApiFormatStringV2 o) { |
| 183 buildCounterPagespeedApiFormatStringV2++; | 183 buildCounterPagespeedApiFormatStringV2++; |
| 184 if (buildCounterPagespeedApiFormatStringV2 < 3) { | 184 if (buildCounterPagespeedApiFormatStringV2 < 3) { |
| 185 checkUnnamed998(o.args); | 185 checkUnnamed1955(o.args); |
| 186 unittest.expect(o.format, unittest.equals('foo')); | 186 unittest.expect(o.format, unittest.equals('foo')); |
| 187 } | 187 } |
| 188 buildCounterPagespeedApiFormatStringV2--; | 188 buildCounterPagespeedApiFormatStringV2--; |
| 189 } | 189 } |
| 190 | 190 |
| 191 core.int buildCounterPagespeedApiImageV2PageRect = 0; | 191 core.int buildCounterPagespeedApiImageV2PageRect = 0; |
| 192 buildPagespeedApiImageV2PageRect() { | 192 buildPagespeedApiImageV2PageRect() { |
| 193 var o = new api.PagespeedApiImageV2PageRect(); | 193 var o = new api.PagespeedApiImageV2PageRect(); |
| 194 buildCounterPagespeedApiImageV2PageRect++; | 194 buildCounterPagespeedApiImageV2PageRect++; |
| 195 if (buildCounterPagespeedApiImageV2PageRect < 3) { | 195 if (buildCounterPagespeedApiImageV2PageRect < 3) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 unittest.expect(o.data, unittest.equals('foo')); | 235 unittest.expect(o.data, unittest.equals('foo')); |
| 236 unittest.expect(o.height, unittest.equals(42)); | 236 unittest.expect(o.height, unittest.equals(42)); |
| 237 unittest.expect(o.key, unittest.equals('foo')); | 237 unittest.expect(o.key, unittest.equals('foo')); |
| 238 unittest.expect(o.mimeType, unittest.equals('foo')); | 238 unittest.expect(o.mimeType, unittest.equals('foo')); |
| 239 checkPagespeedApiImageV2PageRect(o.pageRect); | 239 checkPagespeedApiImageV2PageRect(o.pageRect); |
| 240 unittest.expect(o.width, unittest.equals(42)); | 240 unittest.expect(o.width, unittest.equals(42)); |
| 241 } | 241 } |
| 242 buildCounterPagespeedApiImageV2--; | 242 buildCounterPagespeedApiImageV2--; |
| 243 } | 243 } |
| 244 | 244 |
| 245 buildUnnamed999() { | 245 buildUnnamed1956() { |
| 246 var o = new core.List<core.String>(); | 246 var o = new core.List<core.String>(); |
| 247 o.add("foo"); | 247 o.add("foo"); |
| 248 o.add("foo"); | 248 o.add("foo"); |
| 249 return o; | 249 return o; |
| 250 } | 250 } |
| 251 | 251 |
| 252 checkUnnamed999(core.List<core.String> o) { | 252 checkUnnamed1956(core.List<core.String> o) { |
| 253 unittest.expect(o, unittest.hasLength(2)); | 253 unittest.expect(o, unittest.hasLength(2)); |
| 254 unittest.expect(o[0], unittest.equals('foo')); | 254 unittest.expect(o[0], unittest.equals('foo')); |
| 255 unittest.expect(o[1], unittest.equals('foo')); | 255 unittest.expect(o[1], unittest.equals('foo')); |
| 256 } | 256 } |
| 257 | 257 |
| 258 buildUnnamed1000() { | 258 buildUnnamed1957() { |
| 259 var o = new core.List<api.PagespeedApiFormatStringV2>(); | 259 var o = new core.List<api.PagespeedApiFormatStringV2>(); |
| 260 o.add(buildPagespeedApiFormatStringV2()); | 260 o.add(buildPagespeedApiFormatStringV2()); |
| 261 o.add(buildPagespeedApiFormatStringV2()); | 261 o.add(buildPagespeedApiFormatStringV2()); |
| 262 return o; | 262 return o; |
| 263 } | 263 } |
| 264 | 264 |
| 265 checkUnnamed1000(core.List<api.PagespeedApiFormatStringV2> o) { | 265 checkUnnamed1957(core.List<api.PagespeedApiFormatStringV2> o) { |
| 266 unittest.expect(o, unittest.hasLength(2)); | 266 unittest.expect(o, unittest.hasLength(2)); |
| 267 checkPagespeedApiFormatStringV2(o[0]); | 267 checkPagespeedApiFormatStringV2(o[0]); |
| 268 checkPagespeedApiFormatStringV2(o[1]); | 268 checkPagespeedApiFormatStringV2(o[1]); |
| 269 } | 269 } |
| 270 | 270 |
| 271 core.int buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls = 0; | 271 core.int buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls = 0; |
| 272 buildResultFormattedResultsRuleResultsValueUrlBlocksUrls() { | 272 buildResultFormattedResultsRuleResultsValueUrlBlocksUrls() { |
| 273 var o = new api.ResultFormattedResultsRuleResultsValueUrlBlocksUrls(); | 273 var o = new api.ResultFormattedResultsRuleResultsValueUrlBlocksUrls(); |
| 274 buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls++; | 274 buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls++; |
| 275 if (buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls < 3) { | 275 if (buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls < 3) { |
| 276 o.details = buildUnnamed1000(); | 276 o.details = buildUnnamed1957(); |
| 277 o.result = buildPagespeedApiFormatStringV2(); | 277 o.result = buildPagespeedApiFormatStringV2(); |
| 278 } | 278 } |
| 279 buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls--; | 279 buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls--; |
| 280 return o; | 280 return o; |
| 281 } | 281 } |
| 282 | 282 |
| 283 checkResultFormattedResultsRuleResultsValueUrlBlocksUrls(api.ResultFormattedResu
ltsRuleResultsValueUrlBlocksUrls o) { | 283 checkResultFormattedResultsRuleResultsValueUrlBlocksUrls(api.ResultFormattedResu
ltsRuleResultsValueUrlBlocksUrls o) { |
| 284 buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls++; | 284 buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls++; |
| 285 if (buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls < 3) { | 285 if (buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls < 3) { |
| 286 checkUnnamed1000(o.details); | 286 checkUnnamed1957(o.details); |
| 287 checkPagespeedApiFormatStringV2(o.result); | 287 checkPagespeedApiFormatStringV2(o.result); |
| 288 } | 288 } |
| 289 buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls--; | 289 buildCounterResultFormattedResultsRuleResultsValueUrlBlocksUrls--; |
| 290 } | 290 } |
| 291 | 291 |
| 292 buildUnnamed1001() { | 292 buildUnnamed1958() { |
| 293 var o = new core.List<api.ResultFormattedResultsRuleResultsValueUrlBlocksUrls>
(); | 293 var o = new core.List<api.ResultFormattedResultsRuleResultsValueUrlBlocksUrls>
(); |
| 294 o.add(buildResultFormattedResultsRuleResultsValueUrlBlocksUrls()); | 294 o.add(buildResultFormattedResultsRuleResultsValueUrlBlocksUrls()); |
| 295 o.add(buildResultFormattedResultsRuleResultsValueUrlBlocksUrls()); | 295 o.add(buildResultFormattedResultsRuleResultsValueUrlBlocksUrls()); |
| 296 return o; | 296 return o; |
| 297 } | 297 } |
| 298 | 298 |
| 299 checkUnnamed1001(core.List<api.ResultFormattedResultsRuleResultsValueUrlBlocksUr
ls> o) { | 299 checkUnnamed1958(core.List<api.ResultFormattedResultsRuleResultsValueUrlBlocksUr
ls> o) { |
| 300 unittest.expect(o, unittest.hasLength(2)); | 300 unittest.expect(o, unittest.hasLength(2)); |
| 301 checkResultFormattedResultsRuleResultsValueUrlBlocksUrls(o[0]); | 301 checkResultFormattedResultsRuleResultsValueUrlBlocksUrls(o[0]); |
| 302 checkResultFormattedResultsRuleResultsValueUrlBlocksUrls(o[1]); | 302 checkResultFormattedResultsRuleResultsValueUrlBlocksUrls(o[1]); |
| 303 } | 303 } |
| 304 | 304 |
| 305 core.int buildCounterResultFormattedResultsRuleResultsValueUrlBlocks = 0; | 305 core.int buildCounterResultFormattedResultsRuleResultsValueUrlBlocks = 0; |
| 306 buildResultFormattedResultsRuleResultsValueUrlBlocks() { | 306 buildResultFormattedResultsRuleResultsValueUrlBlocks() { |
| 307 var o = new api.ResultFormattedResultsRuleResultsValueUrlBlocks(); | 307 var o = new api.ResultFormattedResultsRuleResultsValueUrlBlocks(); |
| 308 buildCounterResultFormattedResultsRuleResultsValueUrlBlocks++; | 308 buildCounterResultFormattedResultsRuleResultsValueUrlBlocks++; |
| 309 if (buildCounterResultFormattedResultsRuleResultsValueUrlBlocks < 3) { | 309 if (buildCounterResultFormattedResultsRuleResultsValueUrlBlocks < 3) { |
| 310 o.header = buildPagespeedApiFormatStringV2(); | 310 o.header = buildPagespeedApiFormatStringV2(); |
| 311 o.urls = buildUnnamed1001(); | 311 o.urls = buildUnnamed1958(); |
| 312 } | 312 } |
| 313 buildCounterResultFormattedResultsRuleResultsValueUrlBlocks--; | 313 buildCounterResultFormattedResultsRuleResultsValueUrlBlocks--; |
| 314 return o; | 314 return o; |
| 315 } | 315 } |
| 316 | 316 |
| 317 checkResultFormattedResultsRuleResultsValueUrlBlocks(api.ResultFormattedResultsR
uleResultsValueUrlBlocks o) { | 317 checkResultFormattedResultsRuleResultsValueUrlBlocks(api.ResultFormattedResultsR
uleResultsValueUrlBlocks o) { |
| 318 buildCounterResultFormattedResultsRuleResultsValueUrlBlocks++; | 318 buildCounterResultFormattedResultsRuleResultsValueUrlBlocks++; |
| 319 if (buildCounterResultFormattedResultsRuleResultsValueUrlBlocks < 3) { | 319 if (buildCounterResultFormattedResultsRuleResultsValueUrlBlocks < 3) { |
| 320 checkPagespeedApiFormatStringV2(o.header); | 320 checkPagespeedApiFormatStringV2(o.header); |
| 321 checkUnnamed1001(o.urls); | 321 checkUnnamed1958(o.urls); |
| 322 } | 322 } |
| 323 buildCounterResultFormattedResultsRuleResultsValueUrlBlocks--; | 323 buildCounterResultFormattedResultsRuleResultsValueUrlBlocks--; |
| 324 } | 324 } |
| 325 | 325 |
| 326 buildUnnamed1002() { | 326 buildUnnamed1959() { |
| 327 var o = new core.List<api.ResultFormattedResultsRuleResultsValueUrlBlocks>(); | 327 var o = new core.List<api.ResultFormattedResultsRuleResultsValueUrlBlocks>(); |
| 328 o.add(buildResultFormattedResultsRuleResultsValueUrlBlocks()); | 328 o.add(buildResultFormattedResultsRuleResultsValueUrlBlocks()); |
| 329 o.add(buildResultFormattedResultsRuleResultsValueUrlBlocks()); | 329 o.add(buildResultFormattedResultsRuleResultsValueUrlBlocks()); |
| 330 return o; | 330 return o; |
| 331 } | 331 } |
| 332 | 332 |
| 333 checkUnnamed1002(core.List<api.ResultFormattedResultsRuleResultsValueUrlBlocks>
o) { | 333 checkUnnamed1959(core.List<api.ResultFormattedResultsRuleResultsValueUrlBlocks>
o) { |
| 334 unittest.expect(o, unittest.hasLength(2)); | 334 unittest.expect(o, unittest.hasLength(2)); |
| 335 checkResultFormattedResultsRuleResultsValueUrlBlocks(o[0]); | 335 checkResultFormattedResultsRuleResultsValueUrlBlocks(o[0]); |
| 336 checkResultFormattedResultsRuleResultsValueUrlBlocks(o[1]); | 336 checkResultFormattedResultsRuleResultsValueUrlBlocks(o[1]); |
| 337 } | 337 } |
| 338 | 338 |
| 339 core.int buildCounterResultFormattedResultsRuleResultsValue = 0; | 339 core.int buildCounterResultFormattedResultsRuleResultsValue = 0; |
| 340 buildResultFormattedResultsRuleResultsValue() { | 340 buildResultFormattedResultsRuleResultsValue() { |
| 341 var o = new api.ResultFormattedResultsRuleResultsValue(); | 341 var o = new api.ResultFormattedResultsRuleResultsValue(); |
| 342 buildCounterResultFormattedResultsRuleResultsValue++; | 342 buildCounterResultFormattedResultsRuleResultsValue++; |
| 343 if (buildCounterResultFormattedResultsRuleResultsValue < 3) { | 343 if (buildCounterResultFormattedResultsRuleResultsValue < 3) { |
| 344 o.groups = buildUnnamed999(); | 344 o.groups = buildUnnamed1956(); |
| 345 o.localizedRuleName = "foo"; | 345 o.localizedRuleName = "foo"; |
| 346 o.ruleImpact = 42.0; | 346 o.ruleImpact = 42.0; |
| 347 o.summary = buildPagespeedApiFormatStringV2(); | 347 o.summary = buildPagespeedApiFormatStringV2(); |
| 348 o.urlBlocks = buildUnnamed1002(); | 348 o.urlBlocks = buildUnnamed1959(); |
| 349 } | 349 } |
| 350 buildCounterResultFormattedResultsRuleResultsValue--; | 350 buildCounterResultFormattedResultsRuleResultsValue--; |
| 351 return o; | 351 return o; |
| 352 } | 352 } |
| 353 | 353 |
| 354 checkResultFormattedResultsRuleResultsValue(api.ResultFormattedResultsRuleResult
sValue o) { | 354 checkResultFormattedResultsRuleResultsValue(api.ResultFormattedResultsRuleResult
sValue o) { |
| 355 buildCounterResultFormattedResultsRuleResultsValue++; | 355 buildCounterResultFormattedResultsRuleResultsValue++; |
| 356 if (buildCounterResultFormattedResultsRuleResultsValue < 3) { | 356 if (buildCounterResultFormattedResultsRuleResultsValue < 3) { |
| 357 checkUnnamed999(o.groups); | 357 checkUnnamed1956(o.groups); |
| 358 unittest.expect(o.localizedRuleName, unittest.equals('foo')); | 358 unittest.expect(o.localizedRuleName, unittest.equals('foo')); |
| 359 unittest.expect(o.ruleImpact, unittest.equals(42.0)); | 359 unittest.expect(o.ruleImpact, unittest.equals(42.0)); |
| 360 checkPagespeedApiFormatStringV2(o.summary); | 360 checkPagespeedApiFormatStringV2(o.summary); |
| 361 checkUnnamed1002(o.urlBlocks); | 361 checkUnnamed1959(o.urlBlocks); |
| 362 } | 362 } |
| 363 buildCounterResultFormattedResultsRuleResultsValue--; | 363 buildCounterResultFormattedResultsRuleResultsValue--; |
| 364 } | 364 } |
| 365 | 365 |
| 366 buildUnnamed1003() { | 366 buildUnnamed1960() { |
| 367 var o = new core.Map<core.String, api.ResultFormattedResultsRuleResultsValue>(
); | 367 var o = new core.Map<core.String, api.ResultFormattedResultsRuleResultsValue>(
); |
| 368 o["x"] = buildResultFormattedResultsRuleResultsValue(); | 368 o["x"] = buildResultFormattedResultsRuleResultsValue(); |
| 369 o["y"] = buildResultFormattedResultsRuleResultsValue(); | 369 o["y"] = buildResultFormattedResultsRuleResultsValue(); |
| 370 return o; | 370 return o; |
| 371 } | 371 } |
| 372 | 372 |
| 373 checkUnnamed1003(core.Map<core.String, api.ResultFormattedResultsRuleResultsValu
e> o) { | 373 checkUnnamed1960(core.Map<core.String, api.ResultFormattedResultsRuleResultsValu
e> o) { |
| 374 unittest.expect(o, unittest.hasLength(2)); | 374 unittest.expect(o, unittest.hasLength(2)); |
| 375 checkResultFormattedResultsRuleResultsValue(o["x"]); | 375 checkResultFormattedResultsRuleResultsValue(o["x"]); |
| 376 checkResultFormattedResultsRuleResultsValue(o["y"]); | 376 checkResultFormattedResultsRuleResultsValue(o["y"]); |
| 377 } | 377 } |
| 378 | 378 |
| 379 core.int buildCounterResultFormattedResults = 0; | 379 core.int buildCounterResultFormattedResults = 0; |
| 380 buildResultFormattedResults() { | 380 buildResultFormattedResults() { |
| 381 var o = new api.ResultFormattedResults(); | 381 var o = new api.ResultFormattedResults(); |
| 382 buildCounterResultFormattedResults++; | 382 buildCounterResultFormattedResults++; |
| 383 if (buildCounterResultFormattedResults < 3) { | 383 if (buildCounterResultFormattedResults < 3) { |
| 384 o.locale = "foo"; | 384 o.locale = "foo"; |
| 385 o.ruleResults = buildUnnamed1003(); | 385 o.ruleResults = buildUnnamed1960(); |
| 386 } | 386 } |
| 387 buildCounterResultFormattedResults--; | 387 buildCounterResultFormattedResults--; |
| 388 return o; | 388 return o; |
| 389 } | 389 } |
| 390 | 390 |
| 391 checkResultFormattedResults(api.ResultFormattedResults o) { | 391 checkResultFormattedResults(api.ResultFormattedResults o) { |
| 392 buildCounterResultFormattedResults++; | 392 buildCounterResultFormattedResults++; |
| 393 if (buildCounterResultFormattedResults < 3) { | 393 if (buildCounterResultFormattedResults < 3) { |
| 394 unittest.expect(o.locale, unittest.equals('foo')); | 394 unittest.expect(o.locale, unittest.equals('foo')); |
| 395 checkUnnamed1003(o.ruleResults); | 395 checkUnnamed1960(o.ruleResults); |
| 396 } | 396 } |
| 397 buildCounterResultFormattedResults--; | 397 buildCounterResultFormattedResults--; |
| 398 } | 398 } |
| 399 | 399 |
| 400 buildUnnamed1004() { | 400 buildUnnamed1961() { |
| 401 var o = new core.List<core.String>(); | 401 var o = new core.List<core.String>(); |
| 402 o.add("foo"); | 402 o.add("foo"); |
| 403 o.add("foo"); | 403 o.add("foo"); |
| 404 return o; | 404 return o; |
| 405 } | 405 } |
| 406 | 406 |
| 407 checkUnnamed1004(core.List<core.String> o) { | 407 checkUnnamed1961(core.List<core.String> o) { |
| 408 unittest.expect(o, unittest.hasLength(2)); | 408 unittest.expect(o, unittest.hasLength(2)); |
| 409 unittest.expect(o[0], unittest.equals('foo')); | 409 unittest.expect(o[0], unittest.equals('foo')); |
| 410 unittest.expect(o[1], unittest.equals('foo')); | 410 unittest.expect(o[1], unittest.equals('foo')); |
| 411 } | 411 } |
| 412 | 412 |
| 413 core.int buildCounterResultPageStats = 0; | 413 core.int buildCounterResultPageStats = 0; |
| 414 buildResultPageStats() { | 414 buildResultPageStats() { |
| 415 var o = new api.ResultPageStats(); | 415 var o = new api.ResultPageStats(); |
| 416 buildCounterResultPageStats++; | 416 buildCounterResultPageStats++; |
| 417 if (buildCounterResultPageStats < 3) { | 417 if (buildCounterResultPageStats < 3) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 } | 465 } |
| 466 | 466 |
| 467 checkResultRuleGroupsValue(api.ResultRuleGroupsValue o) { | 467 checkResultRuleGroupsValue(api.ResultRuleGroupsValue o) { |
| 468 buildCounterResultRuleGroupsValue++; | 468 buildCounterResultRuleGroupsValue++; |
| 469 if (buildCounterResultRuleGroupsValue < 3) { | 469 if (buildCounterResultRuleGroupsValue < 3) { |
| 470 unittest.expect(o.score, unittest.equals(42)); | 470 unittest.expect(o.score, unittest.equals(42)); |
| 471 } | 471 } |
| 472 buildCounterResultRuleGroupsValue--; | 472 buildCounterResultRuleGroupsValue--; |
| 473 } | 473 } |
| 474 | 474 |
| 475 buildUnnamed1005() { | 475 buildUnnamed1962() { |
| 476 var o = new core.Map<core.String, api.ResultRuleGroupsValue>(); | 476 var o = new core.Map<core.String, api.ResultRuleGroupsValue>(); |
| 477 o["x"] = buildResultRuleGroupsValue(); | 477 o["x"] = buildResultRuleGroupsValue(); |
| 478 o["y"] = buildResultRuleGroupsValue(); | 478 o["y"] = buildResultRuleGroupsValue(); |
| 479 return o; | 479 return o; |
| 480 } | 480 } |
| 481 | 481 |
| 482 checkUnnamed1005(core.Map<core.String, api.ResultRuleGroupsValue> o) { | 482 checkUnnamed1962(core.Map<core.String, api.ResultRuleGroupsValue> o) { |
| 483 unittest.expect(o, unittest.hasLength(2)); | 483 unittest.expect(o, unittest.hasLength(2)); |
| 484 checkResultRuleGroupsValue(o["x"]); | 484 checkResultRuleGroupsValue(o["x"]); |
| 485 checkResultRuleGroupsValue(o["y"]); | 485 checkResultRuleGroupsValue(o["y"]); |
| 486 } | 486 } |
| 487 | 487 |
| 488 core.int buildCounterResultVersion = 0; | 488 core.int buildCounterResultVersion = 0; |
| 489 buildResultVersion() { | 489 buildResultVersion() { |
| 490 var o = new api.ResultVersion(); | 490 var o = new api.ResultVersion(); |
| 491 buildCounterResultVersion++; | 491 buildCounterResultVersion++; |
| 492 if (buildCounterResultVersion < 3) { | 492 if (buildCounterResultVersion < 3) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 506 buildCounterResultVersion--; | 506 buildCounterResultVersion--; |
| 507 } | 507 } |
| 508 | 508 |
| 509 core.int buildCounterResult = 0; | 509 core.int buildCounterResult = 0; |
| 510 buildResult() { | 510 buildResult() { |
| 511 var o = new api.Result(); | 511 var o = new api.Result(); |
| 512 buildCounterResult++; | 512 buildCounterResult++; |
| 513 if (buildCounterResult < 3) { | 513 if (buildCounterResult < 3) { |
| 514 o.formattedResults = buildResultFormattedResults(); | 514 o.formattedResults = buildResultFormattedResults(); |
| 515 o.id = "foo"; | 515 o.id = "foo"; |
| 516 o.invalidRules = buildUnnamed1004(); | 516 o.invalidRules = buildUnnamed1961(); |
| 517 o.kind = "foo"; | 517 o.kind = "foo"; |
| 518 o.pageStats = buildResultPageStats(); | 518 o.pageStats = buildResultPageStats(); |
| 519 o.responseCode = 42; | 519 o.responseCode = 42; |
| 520 o.ruleGroups = buildUnnamed1005(); | 520 o.ruleGroups = buildUnnamed1962(); |
| 521 o.screenshot = buildPagespeedApiImageV2(); | 521 o.screenshot = buildPagespeedApiImageV2(); |
| 522 o.title = "foo"; | 522 o.title = "foo"; |
| 523 o.version = buildResultVersion(); | 523 o.version = buildResultVersion(); |
| 524 } | 524 } |
| 525 buildCounterResult--; | 525 buildCounterResult--; |
| 526 return o; | 526 return o; |
| 527 } | 527 } |
| 528 | 528 |
| 529 checkResult(api.Result o) { | 529 checkResult(api.Result o) { |
| 530 buildCounterResult++; | 530 buildCounterResult++; |
| 531 if (buildCounterResult < 3) { | 531 if (buildCounterResult < 3) { |
| 532 checkResultFormattedResults(o.formattedResults); | 532 checkResultFormattedResults(o.formattedResults); |
| 533 unittest.expect(o.id, unittest.equals('foo')); | 533 unittest.expect(o.id, unittest.equals('foo')); |
| 534 checkUnnamed1004(o.invalidRules); | 534 checkUnnamed1961(o.invalidRules); |
| 535 unittest.expect(o.kind, unittest.equals('foo')); | 535 unittest.expect(o.kind, unittest.equals('foo')); |
| 536 checkResultPageStats(o.pageStats); | 536 checkResultPageStats(o.pageStats); |
| 537 unittest.expect(o.responseCode, unittest.equals(42)); | 537 unittest.expect(o.responseCode, unittest.equals(42)); |
| 538 checkUnnamed1005(o.ruleGroups); | 538 checkUnnamed1962(o.ruleGroups); |
| 539 checkPagespeedApiImageV2(o.screenshot); | 539 checkPagespeedApiImageV2(o.screenshot); |
| 540 unittest.expect(o.title, unittest.equals('foo')); | 540 unittest.expect(o.title, unittest.equals('foo')); |
| 541 checkResultVersion(o.version); | 541 checkResultVersion(o.version); |
| 542 } | 542 } |
| 543 buildCounterResult--; | 543 buildCounterResult--; |
| 544 } | 544 } |
| 545 | 545 |
| 546 buildUnnamed1006() { | 546 buildUnnamed1963() { |
| 547 var o = new core.List<core.String>(); | 547 var o = new core.List<core.String>(); |
| 548 o.add("foo"); | 548 o.add("foo"); |
| 549 o.add("foo"); | 549 o.add("foo"); |
| 550 return o; | 550 return o; |
| 551 } | 551 } |
| 552 | 552 |
| 553 checkUnnamed1006(core.List<core.String> o) { | 553 checkUnnamed1963(core.List<core.String> o) { |
| 554 unittest.expect(o, unittest.hasLength(2)); | 554 unittest.expect(o, unittest.hasLength(2)); |
| 555 unittest.expect(o[0], unittest.equals('foo')); | 555 unittest.expect(o[0], unittest.equals('foo')); |
| 556 unittest.expect(o[1], unittest.equals('foo')); | 556 unittest.expect(o[1], unittest.equals('foo')); |
| 557 } | 557 } |
| 558 | 558 |
| 559 | 559 |
| 560 main() { | 560 main() { |
| 561 unittest.group("obj-schema-PagespeedApiFormatStringV2ArgsRects", () { | 561 unittest.group("obj-schema-PagespeedApiFormatStringV2ArgsRects", () { |
| 562 unittest.test("to-json--from-json", () { | 562 unittest.test("to-json--from-json", () { |
| 563 var o = buildPagespeedApiFormatStringV2ArgsRects(); | 563 var o = buildPagespeedApiFormatStringV2ArgsRects(); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 | 685 |
| 686 | 686 |
| 687 unittest.group("resource-PagespeedapiResourceApi", () { | 687 unittest.group("resource-PagespeedapiResourceApi", () { |
| 688 unittest.test("method--runpagespeed", () { | 688 unittest.test("method--runpagespeed", () { |
| 689 | 689 |
| 690 var mock = new HttpServerMock(); | 690 var mock = new HttpServerMock(); |
| 691 api.PagespeedapiResourceApi res = new api.PagespeedonlineApi(mock).pagespe
edapi; | 691 api.PagespeedapiResourceApi res = new api.PagespeedonlineApi(mock).pagespe
edapi; |
| 692 var arg_url = "foo"; | 692 var arg_url = "foo"; |
| 693 var arg_filterThirdPartyResources = true; | 693 var arg_filterThirdPartyResources = true; |
| 694 var arg_locale = "foo"; | 694 var arg_locale = "foo"; |
| 695 var arg_rule = buildUnnamed1006(); | 695 var arg_rule = buildUnnamed1963(); |
| 696 var arg_screenshot = true; | 696 var arg_screenshot = true; |
| 697 var arg_strategy = "foo"; | 697 var arg_strategy = "foo"; |
| 698 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 698 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 699 var path = (req.url).path; | 699 var path = (req.url).path; |
| 700 var pathOffset = 0; | 700 var pathOffset = 0; |
| 701 var index; | 701 var index; |
| 702 var subPart; | 702 var subPart; |
| 703 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 703 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 704 pathOffset += 1; | 704 pathOffset += 1; |
| 705 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("pagespeedonline/v2/")); | 705 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("pagespeedonline/v2/")); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 res.runpagespeed(arg_url, filterThirdPartyResources: arg_filterThirdPartyR
esources, locale: arg_locale, rule: arg_rule, screenshot: arg_screenshot, strate
gy: arg_strategy).then(unittest.expectAsync(((api.Result response) { | 740 res.runpagespeed(arg_url, filterThirdPartyResources: arg_filterThirdPartyR
esources, locale: arg_locale, rule: arg_rule, screenshot: arg_screenshot, strate
gy: arg_strategy).then(unittest.expectAsync(((api.Result response) { |
| 741 checkResult(response); | 741 checkResult(response); |
| 742 }))); | 742 }))); |
| 743 }); | 743 }); |
| 744 | 744 |
| 745 }); | 745 }); |
| 746 | 746 |
| 747 | 747 |
| 748 } | 748 } |
| 749 | 749 |
| OLD | NEW |