OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 test fixture. | 5 // Include test fixture. |
6 GEN_INCLUDE(['net_internals_test.js']); | 6 GEN_INCLUDE(['net_internals_test.js']); |
7 | 7 |
8 // Anonymous namespace | 8 // Anonymous namespace |
9 (function() { | 9 (function() { |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 * Test case for a URLRequest. This includes custom formatting for load flags, | 131 * Test case for a URLRequest. This includes custom formatting for load flags, |
132 * request/response HTTP headers, dependent sources, as well as basic | 132 * request/response HTTP headers, dependent sources, as well as basic |
133 * indentation and grouping. | 133 * indentation and grouping. |
134 */ | 134 */ |
135 function painterTestURLRequest() { | 135 function painterTestURLRequest() { |
136 var testCase = {}; | 136 var testCase = {}; |
137 testCase.tickOffset = '1337911098446'; | 137 testCase.tickOffset = '1337911098446'; |
138 | 138 |
139 testCase.logEntries = [ | 139 testCase.logEntries = [ |
140 { | 140 { |
141 'phase': LogEventPhase.PHASE_BEGIN, | 141 'phase': EventPhase.PHASE_BEGIN, |
142 'source': { | 142 'source': { |
143 'id': 146, | 143 'id': 146, |
144 'type': LogSourceType.URL_REQUEST | 144 'type': EventSourceType.URL_REQUEST |
145 }, | 145 }, |
146 'time': '953534778', | 146 'time': '953534778', |
147 'type': LogEventType.REQUEST_ALIVE | 147 'type': EventType.REQUEST_ALIVE |
148 }, | 148 }, |
149 { | 149 { |
150 'params': { | 150 'params': { |
151 'load_flags': 68223104, | 151 'load_flags': 68223104, |
152 'method': 'GET', | 152 'method': 'GET', |
153 'priority': 4, | 153 'priority': 4, |
154 'url': 'http://www.google.com/' | 154 'url': 'http://www.google.com/' |
155 }, | 155 }, |
156 'phase': LogEventPhase.PHASE_BEGIN, | 156 'phase': EventPhase.PHASE_BEGIN, |
157 'source': { | 157 'source': { |
158 'id': 146, | 158 'id': 146, |
159 'type': LogSourceType.URL_REQUEST | 159 'type': EventSourceType.URL_REQUEST |
160 }, | 160 }, |
161 'time': '953534792', | 161 'time': '953534792', |
162 'type': LogEventType.URL_REQUEST_START_JOB | 162 'type': EventType.URL_REQUEST_START_JOB |
163 }, | 163 }, |
164 { | 164 { |
165 'phase': LogEventPhase.PHASE_END, | 165 'phase': EventPhase.PHASE_END, |
166 'source': { | 166 'source': { |
167 'id': 146, | 167 'id': 146, |
168 'type': LogSourceType.URL_REQUEST | 168 'type': EventSourceType.URL_REQUEST |
169 }, | 169 }, |
170 'time': '953534800', | 170 'time': '953534800', |
171 'type': LogEventType.URL_REQUEST_START_JOB | 171 'type': EventType.URL_REQUEST_START_JOB |
172 }, | 172 }, |
173 { | 173 { |
174 'params': { | 174 'params': { |
175 'load_flags': 68223104, | 175 'load_flags': 68223104, |
176 'method': 'GET', | 176 'method': 'GET', |
177 'priority': 4, | 177 'priority': 4, |
178 'url': 'http://www.google.com/' | 178 'url': 'http://www.google.com/' |
179 }, | 179 }, |
180 'phase': LogEventPhase.PHASE_BEGIN, | 180 'phase': EventPhase.PHASE_BEGIN, |
181 'source': { | 181 'source': { |
182 'id': 146, | 182 'id': 146, |
183 'type': LogSourceType.URL_REQUEST | 183 'type': EventSourceType.URL_REQUEST |
184 }, | 184 }, |
185 'time': '953534802', | 185 'time': '953534802', |
186 'type': LogEventType.URL_REQUEST_START_JOB | 186 'type': EventType.URL_REQUEST_START_JOB |
187 }, | 187 }, |
188 { | 188 { |
189 'phase': LogEventPhase.PHASE_BEGIN, | 189 'phase': EventPhase.PHASE_BEGIN, |
190 'source': { | 190 'source': { |
191 'id': 146, | 191 'id': 146, |
192 'type': LogSourceType.URL_REQUEST | 192 'type': EventSourceType.URL_REQUEST |
193 }, | 193 }, |
194 'time': '953534809', | 194 'time': '953534809', |
195 'type': LogEventType.HTTP_CACHE_GET_BACKEND | 195 'type': EventType.HTTP_CACHE_GET_BACKEND |
196 }, | 196 }, |
197 { | 197 { |
198 'phase': LogEventPhase.PHASE_END, | 198 'phase': EventPhase.PHASE_END, |
199 'source': { | 199 'source': { |
200 'id': 146, | 200 'id': 146, |
201 'type': LogSourceType.URL_REQUEST | 201 'type': EventSourceType.URL_REQUEST |
202 }, | 202 }, |
203 'time': '953534810', | 203 'time': '953534810', |
204 'type': LogEventType.HTTP_CACHE_GET_BACKEND | 204 'type': EventType.HTTP_CACHE_GET_BACKEND |
205 }, | 205 }, |
206 { | 206 { |
207 'phase': LogEventPhase.PHASE_BEGIN, | 207 'phase': EventPhase.PHASE_BEGIN, |
208 'source': { | 208 'source': { |
209 'id': 146, | 209 'id': 146, |
210 'type': LogSourceType.URL_REQUEST | 210 'type': EventSourceType.URL_REQUEST |
211 }, | 211 }, |
212 'time': '953534811', | 212 'time': '953534811', |
213 'type': LogEventType.HTTP_CACHE_OPEN_ENTRY | 213 'type': EventType.HTTP_CACHE_OPEN_ENTRY |
214 }, | 214 }, |
215 { | 215 { |
216 'phase': LogEventPhase.PHASE_END, | 216 'phase': EventPhase.PHASE_END, |
217 'source': { | 217 'source': { |
218 'id': 146, | 218 'id': 146, |
219 'type': LogSourceType.URL_REQUEST | 219 'type': EventSourceType.URL_REQUEST |
220 }, | 220 }, |
221 'time': '953534816', | 221 'time': '953534816', |
222 'type': LogEventType.HTTP_CACHE_OPEN_ENTRY | 222 'type': EventType.HTTP_CACHE_OPEN_ENTRY |
223 }, | 223 }, |
224 { | 224 { |
225 'phase': LogEventPhase.PHASE_BEGIN, | 225 'phase': EventPhase.PHASE_BEGIN, |
226 'source': { | 226 'source': { |
227 'id': 146, | 227 'id': 146, |
228 'type': LogSourceType.URL_REQUEST | 228 'type': EventSourceType.URL_REQUEST |
229 }, | 229 }, |
230 'time': '953534817', | 230 'time': '953534817', |
231 'type': LogEventType.HTTP_CACHE_ADD_TO_ENTRY | 231 'type': EventType.HTTP_CACHE_ADD_TO_ENTRY |
232 }, | 232 }, |
233 { | 233 { |
234 'phase': LogEventPhase.PHASE_END, | 234 'phase': EventPhase.PHASE_END, |
235 'source': { | 235 'source': { |
236 'id': 146, | 236 'id': 146, |
237 'type': LogSourceType.URL_REQUEST | 237 'type': EventSourceType.URL_REQUEST |
238 }, | 238 }, |
239 'time': '953534818', | 239 'time': '953534818', |
240 'type': LogEventType.HTTP_CACHE_ADD_TO_ENTRY | 240 'type': EventType.HTTP_CACHE_ADD_TO_ENTRY |
241 }, | 241 }, |
242 { | 242 { |
243 'phase': LogEventPhase.PHASE_BEGIN, | 243 'phase': EventPhase.PHASE_BEGIN, |
244 'source': { | 244 'source': { |
245 'id': 146, | 245 'id': 146, |
246 'type': LogSourceType.URL_REQUEST | 246 'type': EventSourceType.URL_REQUEST |
247 }, | 247 }, |
248 'time': '953534823', | 248 'time': '953534823', |
249 'type': LogEventType.HTTP_CACHE_READ_INFO | 249 'type': EventType.HTTP_CACHE_READ_INFO |
250 }, | 250 }, |
251 { | 251 { |
252 'phase': LogEventPhase.PHASE_END, | 252 'phase': EventPhase.PHASE_END, |
253 'source': { | 253 'source': { |
254 'id': 146, | 254 'id': 146, |
255 'type': LogSourceType.URL_REQUEST | 255 'type': EventSourceType.URL_REQUEST |
256 }, | 256 }, |
257 'time': '953534827', | 257 'time': '953534827', |
258 'type': LogEventType.HTTP_CACHE_READ_INFO | 258 'type': EventType.HTTP_CACHE_READ_INFO |
259 }, | 259 }, |
260 { | 260 { |
261 'phase': LogEventPhase.PHASE_BEGIN, | 261 'phase': EventPhase.PHASE_BEGIN, |
262 'source': { | 262 'source': { |
263 'id': 146, | 263 'id': 146, |
264 'type': LogSourceType.URL_REQUEST | 264 'type': EventSourceType.URL_REQUEST |
265 }, | 265 }, |
266 'time': '953534830', | 266 'time': '953534830', |
267 'type': LogEventType.HTTP_STREAM_REQUEST | 267 'type': EventType.HTTP_STREAM_REQUEST |
268 }, | 268 }, |
269 { | 269 { |
270 'params': { | 270 'params': { |
271 'source_dependency': { | 271 'source_dependency': { |
272 'id': 149, | 272 'id': 149, |
273 'type': 11 | 273 'type': 11 |
274 } | 274 } |
275 }, | 275 }, |
276 'phase': LogEventPhase.PHASE_NONE, | 276 'phase': EventPhase.PHASE_NONE, |
277 'source': { | 277 'source': { |
278 'id': 146, | 278 'id': 146, |
279 'type': LogSourceType.URL_REQUEST | 279 'type': EventSourceType.URL_REQUEST |
280 }, | 280 }, |
281 'time': '953534898', | 281 'time': '953534898', |
282 'type': LogEventType.HTTP_STREAM_REQUEST_BOUND_TO_JOB | 282 'type': EventType.HTTP_STREAM_REQUEST_BOUND_TO_JOB |
283 }, | 283 }, |
284 { | 284 { |
285 'phase': LogEventPhase.PHASE_END, | 285 'phase': EventPhase.PHASE_END, |
286 'source': { | 286 'source': { |
287 'id': 146, | 287 'id': 146, |
288 'type': LogSourceType.URL_REQUEST | 288 'type': EventSourceType.URL_REQUEST |
289 }, | 289 }, |
290 'time': '953534902', | 290 'time': '953534902', |
291 'type': LogEventType.HTTP_STREAM_REQUEST | 291 'type': EventType.HTTP_STREAM_REQUEST |
292 }, | 292 }, |
293 { | 293 { |
294 'phase': LogEventPhase.PHASE_BEGIN, | 294 'phase': EventPhase.PHASE_BEGIN, |
295 'source': { | 295 'source': { |
296 'id': 146, | 296 'id': 146, |
297 'type': LogSourceType.URL_REQUEST | 297 'type': EventSourceType.URL_REQUEST |
298 }, | 298 }, |
299 'time': '953534906', | 299 'time': '953534906', |
300 'type': LogEventType.HTTP_TRANSACTION_SEND_REQUEST | 300 'type': EventType.HTTP_TRANSACTION_SEND_REQUEST |
301 }, | 301 }, |
302 { | 302 { |
303 'params': { | 303 'params': { |
304 'headers': [ | 304 'headers': [ |
305 'Host: www.google.com', | 305 'Host: www.google.com', |
306 'Connection: keep-alive', | 306 'Connection: keep-alive', |
307 'User-Agent: Mozilla/5.0', | 307 'User-Agent: Mozilla/5.0', |
308 'Accept: text/html', | 308 'Accept: text/html', |
309 'Accept-Encoding: gzip,deflate,sdch', | 309 'Accept-Encoding: gzip,deflate,sdch', |
310 'Accept-Language: en-US,en;q=0.8', | 310 'Accept-Language: en-US,en;q=0.8', |
311 'Accept-Charset: ISO-8859-1' | 311 'Accept-Charset: ISO-8859-1' |
312 ], | 312 ], |
313 'line': 'GET / HTTP/1.1\r\n' | 313 'line': 'GET / HTTP/1.1\r\n' |
314 }, | 314 }, |
315 'phase': LogEventPhase.PHASE_NONE, | 315 'phase': EventPhase.PHASE_NONE, |
316 'source': { | 316 'source': { |
317 'id': 146, | 317 'id': 146, |
318 'type': LogSourceType.URL_REQUEST | 318 'type': EventSourceType.URL_REQUEST |
319 }, | 319 }, |
320 'time': '953534910', | 320 'time': '953534910', |
321 'type': LogEventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS | 321 'type': EventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS |
322 }, | 322 }, |
323 { | 323 { |
324 'phase': LogEventPhase.PHASE_END, | 324 'phase': EventPhase.PHASE_END, |
325 'source': { | 325 'source': { |
326 'id': 146, | 326 'id': 146, |
327 'type': LogSourceType.URL_REQUEST | 327 'type': EventSourceType.URL_REQUEST |
328 }, | 328 }, |
329 'time': '953534915', | 329 'time': '953534915', |
330 'type': LogEventType.HTTP_TRANSACTION_SEND_REQUEST | 330 'type': EventType.HTTP_TRANSACTION_SEND_REQUEST |
331 }, | 331 }, |
332 { | 332 { |
333 'phase': LogEventPhase.PHASE_BEGIN, | 333 'phase': EventPhase.PHASE_BEGIN, |
334 'source': { | 334 'source': { |
335 'id': 146, | 335 'id': 146, |
336 'type': LogSourceType.URL_REQUEST | 336 'type': EventSourceType.URL_REQUEST |
337 }, | 337 }, |
338 'time': '953534916', | 338 'time': '953534916', |
339 'type': LogEventType.HTTP_TRANSACTION_READ_HEADERS | 339 'type': EventType.HTTP_TRANSACTION_READ_HEADERS |
340 }, | 340 }, |
341 { | 341 { |
342 'phase': LogEventPhase.PHASE_BEGIN, | 342 'phase': EventPhase.PHASE_BEGIN, |
343 'source': { | 343 'source': { |
344 'id': 146, | 344 'id': 146, |
345 'type': LogSourceType.URL_REQUEST | 345 'type': EventSourceType.URL_REQUEST |
346 }, | 346 }, |
347 'time': '953534917', | 347 'time': '953534917', |
348 'type': LogEventType.HTTP_STREAM_PARSER_READ_HEADERS | 348 'type': EventType.HTTP_STREAM_PARSER_READ_HEADERS |
349 }, | 349 }, |
350 { | 350 { |
351 'phase': LogEventPhase.PHASE_END, | 351 'phase': EventPhase.PHASE_END, |
352 'source': { | 352 'source': { |
353 'id': 146, | 353 'id': 146, |
354 'type': LogSourceType.URL_REQUEST | 354 'type': EventSourceType.URL_REQUEST |
355 }, | 355 }, |
356 'time': '953534987', | 356 'time': '953534987', |
357 'type': LogEventType.HTTP_STREAM_PARSER_READ_HEADERS | 357 'type': EventType.HTTP_STREAM_PARSER_READ_HEADERS |
358 }, | 358 }, |
359 { | 359 { |
360 'params': { | 360 'params': { |
361 'headers': [ | 361 'headers': [ |
362 'HTTP/1.1 200 OK', | 362 'HTTP/1.1 200 OK', |
363 'Date: Tue, 05 Jun 2012 02:50:33 GMT', | 363 'Date: Tue, 05 Jun 2012 02:50:33 GMT', |
364 'Expires: -1', | 364 'Expires: -1', |
365 'Cache-Control: private, max-age=0', | 365 'Cache-Control: private, max-age=0', |
366 'Content-Type: text/html; charset=UTF-8', | 366 'Content-Type: text/html; charset=UTF-8', |
367 'Content-Encoding: gzip', | 367 'Content-Encoding: gzip', |
368 'Server: gws', | 368 'Server: gws', |
369 'Content-Length: 23798', | 369 'Content-Length: 23798', |
370 ] | 370 ] |
371 }, | 371 }, |
372 'phase': LogEventPhase.PHASE_NONE, | 372 'phase': EventPhase.PHASE_NONE, |
373 'source': { | 373 'source': { |
374 'id': 146, | 374 'id': 146, |
375 'type': LogSourceType.URL_REQUEST | 375 'type': EventSourceType.URL_REQUEST |
376 }, | 376 }, |
377 'time': '953534989', | 377 'time': '953534989', |
378 'type': LogEventType.HTTP_TRANSACTION_READ_RESPONSE_HEADERS | 378 'type': EventType.HTTP_TRANSACTION_READ_RESPONSE_HEADERS |
379 }, | 379 }, |
380 { | 380 { |
381 'phase': LogEventPhase.PHASE_END, | 381 'phase': EventPhase.PHASE_END, |
382 'source': { | 382 'source': { |
383 'id': 146, | 383 'id': 146, |
384 'type': LogSourceType.URL_REQUEST | 384 'type': EventSourceType.URL_REQUEST |
385 }, | 385 }, |
386 'time': '953534992', | 386 'time': '953534992', |
387 'type': LogEventType.HTTP_TRANSACTION_READ_HEADERS | 387 'type': EventType.HTTP_TRANSACTION_READ_HEADERS |
388 }, | 388 }, |
389 { | 389 { |
390 'phase': LogEventPhase.PHASE_BEGIN, | 390 'phase': EventPhase.PHASE_BEGIN, |
391 'source': { | 391 'source': { |
392 'id': 146, | 392 'id': 146, |
393 'type': LogSourceType.URL_REQUEST | 393 'type': EventSourceType.URL_REQUEST |
394 }, | 394 }, |
395 'time': '953534993', | 395 'time': '953534993', |
396 'type': LogEventType.HTTP_CACHE_WRITE_INFO | 396 'type': EventType.HTTP_CACHE_WRITE_INFO |
397 }, | 397 }, |
398 { | 398 { |
399 'phase': LogEventPhase.PHASE_END, | 399 'phase': EventPhase.PHASE_END, |
400 'source': { | 400 'source': { |
401 'id': 146, | 401 'id': 146, |
402 'type': LogSourceType.URL_REQUEST | 402 'type': EventSourceType.URL_REQUEST |
403 }, | 403 }, |
404 'time': '953535023', | 404 'time': '953535023', |
405 'type': LogEventType.HTTP_CACHE_WRITE_INFO | 405 'type': EventType.HTTP_CACHE_WRITE_INFO |
406 }, | 406 }, |
407 { | 407 { |
408 'phase': LogEventPhase.PHASE_BEGIN, | 408 'phase': EventPhase.PHASE_BEGIN, |
409 'source': { | 409 'source': { |
410 'id': 146, | 410 'id': 146, |
411 'type': LogSourceType.URL_REQUEST | 411 'type': EventSourceType.URL_REQUEST |
412 }, | 412 }, |
413 'time': '953535024', | 413 'time': '953535024', |
414 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 414 'type': EventType.HTTP_CACHE_WRITE_DATA |
415 }, | 415 }, |
416 { | 416 { |
417 'phase': LogEventPhase.PHASE_END, | 417 'phase': EventPhase.PHASE_END, |
418 'source': { | 418 'source': { |
419 'id': 146, | 419 'id': 146, |
420 'type': LogSourceType.URL_REQUEST | 420 'type': EventSourceType.URL_REQUEST |
421 }, | 421 }, |
422 'time': '953535062', | 422 'time': '953535062', |
423 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 423 'type': EventType.HTTP_CACHE_WRITE_DATA |
424 }, | 424 }, |
425 { | 425 { |
426 'phase': LogEventPhase.PHASE_BEGIN, | 426 'phase': EventPhase.PHASE_BEGIN, |
427 'source': { | 427 'source': { |
428 'id': 146, | 428 'id': 146, |
429 'type': LogSourceType.URL_REQUEST | 429 'type': EventSourceType.URL_REQUEST |
430 }, | 430 }, |
431 'time': '953535062', | 431 'time': '953535062', |
432 'type': LogEventType.HTTP_CACHE_WRITE_INFO | 432 'type': EventType.HTTP_CACHE_WRITE_INFO |
433 }, | 433 }, |
434 { | 434 { |
435 'phase': LogEventPhase.PHASE_END, | 435 'phase': EventPhase.PHASE_END, |
436 'source': { | 436 'source': { |
437 'id': 146, | 437 'id': 146, |
438 'type': LogSourceType.URL_REQUEST | 438 'type': EventSourceType.URL_REQUEST |
439 }, | 439 }, |
440 'time': '953535075', | 440 'time': '953535075', |
441 'type': LogEventType.HTTP_CACHE_WRITE_INFO | 441 'type': EventType.HTTP_CACHE_WRITE_INFO |
442 }, | 442 }, |
443 { | 443 { |
444 'phase': LogEventPhase.PHASE_END, | 444 'phase': EventPhase.PHASE_END, |
445 'source': { | 445 'source': { |
446 'id': 146, | 446 'id': 146, |
447 'type': LogSourceType.URL_REQUEST | 447 'type': EventSourceType.URL_REQUEST |
448 }, | 448 }, |
449 'time': '953535081', | 449 'time': '953535081', |
450 'type': LogEventType.URL_REQUEST_START_JOB | 450 'type': EventType.URL_REQUEST_START_JOB |
451 }, | 451 }, |
452 { | 452 { |
453 'phase': LogEventPhase.PHASE_BEGIN, | 453 'phase': EventPhase.PHASE_BEGIN, |
454 'source': { | 454 'source': { |
455 'id': 146, | 455 'id': 146, |
456 'type': LogSourceType.URL_REQUEST | 456 'type': EventSourceType.URL_REQUEST |
457 }, | 457 }, |
458 'time': '953535537', | 458 'time': '953535537', |
459 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 459 'type': EventType.HTTP_TRANSACTION_READ_BODY |
460 }, | 460 }, |
461 { | 461 { |
462 'phase': LogEventPhase.PHASE_END, | 462 'phase': EventPhase.PHASE_END, |
463 'source': { | 463 'source': { |
464 'id': 146, | 464 'id': 146, |
465 'type': LogSourceType.URL_REQUEST | 465 'type': EventSourceType.URL_REQUEST |
466 }, | 466 }, |
467 'time': '953535538', | 467 'time': '953535538', |
468 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 468 'type': EventType.HTTP_TRANSACTION_READ_BODY |
469 }, | 469 }, |
470 { | 470 { |
471 'phase': LogEventPhase.PHASE_BEGIN, | 471 'phase': EventPhase.PHASE_BEGIN, |
472 'source': { | 472 'source': { |
473 'id': 146, | 473 'id': 146, |
474 'type': LogSourceType.URL_REQUEST | 474 'type': EventSourceType.URL_REQUEST |
475 }, | 475 }, |
476 'time': '953535538', | 476 'time': '953535538', |
477 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 477 'type': EventType.HTTP_CACHE_WRITE_DATA |
478 }, | 478 }, |
479 { | 479 { |
480 'phase': LogEventPhase.PHASE_END, | 480 'phase': EventPhase.PHASE_END, |
481 'source': { | 481 'source': { |
482 'id': 146, | 482 'id': 146, |
483 'type': LogSourceType.URL_REQUEST | 483 'type': EventSourceType.URL_REQUEST |
484 }, | 484 }, |
485 'time': '953535541', | 485 'time': '953535541', |
486 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 486 'type': EventType.HTTP_CACHE_WRITE_DATA |
487 }, | 487 }, |
488 { | 488 { |
489 'phase': LogEventPhase.PHASE_BEGIN, | 489 'phase': EventPhase.PHASE_BEGIN, |
490 'source': { | 490 'source': { |
491 'id': 146, | 491 'id': 146, |
492 'type': LogSourceType.URL_REQUEST | 492 'type': EventSourceType.URL_REQUEST |
493 }, | 493 }, |
494 'time': '953535542', | 494 'time': '953535542', |
495 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 495 'type': EventType.HTTP_TRANSACTION_READ_BODY |
496 }, | 496 }, |
497 { | 497 { |
498 'phase': LogEventPhase.PHASE_END, | 498 'phase': EventPhase.PHASE_END, |
499 'source': { | 499 'source': { |
500 'id': 146, | 500 'id': 146, |
501 'type': LogSourceType.URL_REQUEST | 501 'type': EventSourceType.URL_REQUEST |
502 }, | 502 }, |
503 'time': '953535545', | 503 'time': '953535545', |
504 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 504 'type': EventType.HTTP_TRANSACTION_READ_BODY |
505 }, | 505 }, |
506 { | 506 { |
507 'phase': LogEventPhase.PHASE_BEGIN, | 507 'phase': EventPhase.PHASE_BEGIN, |
508 'source': { | 508 'source': { |
509 'id': 146, | 509 'id': 146, |
510 'type': LogSourceType.URL_REQUEST | 510 'type': EventSourceType.URL_REQUEST |
511 }, | 511 }, |
512 'time': '953535546', | 512 'time': '953535546', |
513 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 513 'type': EventType.HTTP_CACHE_WRITE_DATA |
514 }, | 514 }, |
515 { | 515 { |
516 'phase': LogEventPhase.PHASE_END, | 516 'phase': EventPhase.PHASE_END, |
517 'source': { | 517 'source': { |
518 'id': 146, | 518 'id': 146, |
519 'type': LogSourceType.URL_REQUEST | 519 'type': EventSourceType.URL_REQUEST |
520 }, | 520 }, |
521 'time': '953535548', | 521 'time': '953535548', |
522 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 522 'type': EventType.HTTP_CACHE_WRITE_DATA |
523 }, | 523 }, |
524 { | 524 { |
525 'phase': LogEventPhase.PHASE_BEGIN, | 525 'phase': EventPhase.PHASE_BEGIN, |
526 'source': { | 526 'source': { |
527 'id': 146, | 527 'id': 146, |
528 'type': LogSourceType.URL_REQUEST | 528 'type': EventSourceType.URL_REQUEST |
529 }, | 529 }, |
530 'time': '953535548', | 530 'time': '953535548', |
531 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 531 'type': EventType.HTTP_TRANSACTION_READ_BODY |
532 }, | 532 }, |
533 { | 533 { |
534 'phase': LogEventPhase.PHASE_END, | 534 'phase': EventPhase.PHASE_END, |
535 'source': { | 535 'source': { |
536 'id': 146, | 536 'id': 146, |
537 'type': LogSourceType.URL_REQUEST | 537 'type': EventSourceType.URL_REQUEST |
538 }, | 538 }, |
539 'time': '953535548', | 539 'time': '953535548', |
540 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 540 'type': EventType.HTTP_TRANSACTION_READ_BODY |
541 }, | 541 }, |
542 { | 542 { |
543 'phase': LogEventPhase.PHASE_BEGIN, | 543 'phase': EventPhase.PHASE_BEGIN, |
544 'source': { | 544 'source': { |
545 'id': 146, | 545 'id': 146, |
546 'type': LogSourceType.URL_REQUEST | 546 'type': EventSourceType.URL_REQUEST |
547 }, | 547 }, |
548 'time': '953535549', | 548 'time': '953535549', |
549 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 549 'type': EventType.HTTP_CACHE_WRITE_DATA |
550 }, | 550 }, |
551 { | 551 { |
552 'phase': LogEventPhase.PHASE_END, | 552 'phase': EventPhase.PHASE_END, |
553 'source': { | 553 'source': { |
554 'id': 146, | 554 'id': 146, |
555 'type': LogSourceType.URL_REQUEST | 555 'type': EventSourceType.URL_REQUEST |
556 }, | 556 }, |
557 'time': '953535549', | 557 'time': '953535549', |
558 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 558 'type': EventType.HTTP_CACHE_WRITE_DATA |
559 }, | 559 }, |
560 { | 560 { |
561 'phase': LogEventPhase.PHASE_BEGIN, | 561 'phase': EventPhase.PHASE_BEGIN, |
562 'source': { | 562 'source': { |
563 'id': 146, | 563 'id': 146, |
564 'type': LogSourceType.URL_REQUEST | 564 'type': EventSourceType.URL_REQUEST |
565 }, | 565 }, |
566 'time': '953535550', | 566 'time': '953535550', |
567 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 567 'type': EventType.HTTP_TRANSACTION_READ_BODY |
568 }, | 568 }, |
569 { | 569 { |
570 'phase': LogEventPhase.PHASE_END, | 570 'phase': EventPhase.PHASE_END, |
571 'source': { | 571 'source': { |
572 'id': 146, | 572 'id': 146, |
573 'type': LogSourceType.URL_REQUEST | 573 'type': EventSourceType.URL_REQUEST |
574 }, | 574 }, |
575 'time': '953535550', | 575 'time': '953535550', |
576 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 576 'type': EventType.HTTP_TRANSACTION_READ_BODY |
577 }, | 577 }, |
578 { | 578 { |
579 'phase': LogEventPhase.PHASE_BEGIN, | 579 'phase': EventPhase.PHASE_BEGIN, |
580 'source': { | 580 'source': { |
581 'id': 146, | 581 'id': 146, |
582 'type': LogSourceType.URL_REQUEST | 582 'type': EventSourceType.URL_REQUEST |
583 }, | 583 }, |
584 'time': '953535550', | 584 'time': '953535550', |
585 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 585 'type': EventType.HTTP_CACHE_WRITE_DATA |
586 }, | 586 }, |
587 { | 587 { |
588 'phase': LogEventPhase.PHASE_END, | 588 'phase': EventPhase.PHASE_END, |
589 'source': { | 589 'source': { |
590 'id': 146, | 590 'id': 146, |
591 'type': LogSourceType.URL_REQUEST | 591 'type': EventSourceType.URL_REQUEST |
592 }, | 592 }, |
593 'time': '953535551', | 593 'time': '953535551', |
594 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 594 'type': EventType.HTTP_CACHE_WRITE_DATA |
595 }, | 595 }, |
596 { | 596 { |
597 'phase': LogEventPhase.PHASE_BEGIN, | 597 'phase': EventPhase.PHASE_BEGIN, |
598 'source': { | 598 'source': { |
599 'id': 146, | 599 'id': 146, |
600 'type': LogSourceType.URL_REQUEST | 600 'type': EventSourceType.URL_REQUEST |
601 }, | 601 }, |
602 'time': '953535552', | 602 'time': '953535552', |
603 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 603 'type': EventType.HTTP_TRANSACTION_READ_BODY |
604 }, | 604 }, |
605 { | 605 { |
606 'phase': LogEventPhase.PHASE_END, | 606 'phase': EventPhase.PHASE_END, |
607 'source': { | 607 'source': { |
608 'id': 146, | 608 'id': 146, |
609 'type': LogSourceType.URL_REQUEST | 609 'type': EventSourceType.URL_REQUEST |
610 }, | 610 }, |
611 'time': '953535553', | 611 'time': '953535553', |
612 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 612 'type': EventType.HTTP_TRANSACTION_READ_BODY |
613 }, | 613 }, |
614 { | 614 { |
615 'phase': LogEventPhase.PHASE_BEGIN, | 615 'phase': EventPhase.PHASE_BEGIN, |
616 'source': { | 616 'source': { |
617 'id': 146, | 617 'id': 146, |
618 'type': LogSourceType.URL_REQUEST | 618 'type': EventSourceType.URL_REQUEST |
619 }, | 619 }, |
620 'time': '953535553', | 620 'time': '953535553', |
621 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 621 'type': EventType.HTTP_CACHE_WRITE_DATA |
622 }, | 622 }, |
623 { | 623 { |
624 'phase': LogEventPhase.PHASE_END, | 624 'phase': EventPhase.PHASE_END, |
625 'source': { | 625 'source': { |
626 'id': 146, | 626 'id': 146, |
627 'type': LogSourceType.URL_REQUEST | 627 'type': EventSourceType.URL_REQUEST |
628 }, | 628 }, |
629 'time': '953535556', | 629 'time': '953535556', |
630 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 630 'type': EventType.HTTP_CACHE_WRITE_DATA |
631 }, | 631 }, |
632 { | 632 { |
633 'phase': LogEventPhase.PHASE_BEGIN, | 633 'phase': EventPhase.PHASE_BEGIN, |
634 'source': { | 634 'source': { |
635 'id': 146, | 635 'id': 146, |
636 'type': LogSourceType.URL_REQUEST | 636 'type': EventSourceType.URL_REQUEST |
637 }, | 637 }, |
638 'time': '953535556', | 638 'time': '953535556', |
639 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 639 'type': EventType.HTTP_TRANSACTION_READ_BODY |
640 }, | 640 }, |
641 { | 641 { |
642 'phase': LogEventPhase.PHASE_END, | 642 'phase': EventPhase.PHASE_END, |
643 'source': { | 643 'source': { |
644 'id': 146, | 644 'id': 146, |
645 'type': LogSourceType.URL_REQUEST | 645 'type': EventSourceType.URL_REQUEST |
646 }, | 646 }, |
647 'time': '953535559', | 647 'time': '953535559', |
648 'type': LogEventType.HTTP_TRANSACTION_READ_BODY | 648 'type': EventType.HTTP_TRANSACTION_READ_BODY |
649 }, | 649 }, |
650 { | 650 { |
651 'phase': LogEventPhase.PHASE_BEGIN, | 651 'phase': EventPhase.PHASE_BEGIN, |
652 'source': { | 652 'source': { |
653 'id': 146, | 653 'id': 146, |
654 'type': LogSourceType.URL_REQUEST | 654 'type': EventSourceType.URL_REQUEST |
655 }, | 655 }, |
656 'time': '953535559', | 656 'time': '953535559', |
657 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 657 'type': EventType.HTTP_CACHE_WRITE_DATA |
658 }, | 658 }, |
659 { | 659 { |
660 'phase': LogEventPhase.PHASE_END, | 660 'phase': EventPhase.PHASE_END, |
661 'source': { | 661 'source': { |
662 'id': 146, | 662 'id': 146, |
663 'type': LogSourceType.URL_REQUEST | 663 'type': EventSourceType.URL_REQUEST |
664 }, | 664 }, |
665 'time': '953535559', | 665 'time': '953535559', |
666 'type': LogEventType.HTTP_CACHE_WRITE_DATA | 666 'type': EventType.HTTP_CACHE_WRITE_DATA |
667 }, | 667 }, |
668 { | 668 { |
669 'phase': LogEventPhase.PHASE_END, | 669 'phase': EventPhase.PHASE_END, |
670 'source': { | 670 'source': { |
671 'id': 146, | 671 'id': 146, |
672 'type': LogSourceType.URL_REQUEST | 672 'type': EventSourceType.URL_REQUEST |
673 }, | 673 }, |
674 'time': '953535567', | 674 'time': '953535567', |
675 'type': LogEventType.REQUEST_ALIVE | 675 'type': EventType.REQUEST_ALIVE |
676 } | 676 } |
677 ]; | 677 ]; |
678 | 678 |
679 testCase.expectedText = | 679 testCase.expectedText = |
680 't=1338864633224 [st= 0] +REQUEST_ALIVE [dt=789]\n' + | 680 't=1338864633224 [st= 0] +REQUEST_ALIVE [dt=789]\n' + |
681 't=1338864633238 [st= 14] URL_REQUEST_START_JOB [dt=8]\n' + | 681 't=1338864633238 [st= 14] URL_REQUEST_START_JOB [dt=8]\n' + |
682 ' --> load_flags = 68223104 ' + | 682 ' --> load_flags = 68223104 ' + |
683 '(ENABLE_LOAD_TIMING | MAIN_FRAME | MAYBE_USER_GESTURE ' + | 683 '(ENABLE_LOAD_TIMING | MAIN_FRAME | MAYBE_USER_GESTURE ' + |
684 '| VERIFY_EV_CERT)\n' + | 684 '| VERIFY_EV_CERT)\n' + |
685 ' --> method = "GET"\n' + | 685 ' --> method = "GET"\n' + |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 /** | 748 /** |
749 * Tests the custom formatting of net_errors across several different event | 749 * Tests the custom formatting of net_errors across several different event |
750 * types. | 750 * types. |
751 */ | 751 */ |
752 function painterTestNetError() { | 752 function painterTestNetError() { |
753 var testCase = {}; | 753 var testCase = {}; |
754 testCase.tickOffset = '1337911098446'; | 754 testCase.tickOffset = '1337911098446'; |
755 | 755 |
756 testCase.logEntries = [ | 756 testCase.logEntries = [ |
757 { | 757 { |
758 'phase': LogEventPhase.PHASE_BEGIN, | 758 'phase': EventPhase.PHASE_BEGIN, |
759 'source': { | 759 'source': { |
760 'id': 318, | 760 'id': 318, |
761 'type': LogSourceType.URL_REQUEST | 761 'type': EventSourceType.URL_REQUEST |
762 }, | 762 }, |
763 'time': '953675448', | 763 'time': '953675448', |
764 'type': LogEventType.REQUEST_ALIVE | 764 'type': EventType.REQUEST_ALIVE |
765 }, | 765 }, |
766 { | 766 { |
767 'params': { | 767 'params': { |
768 'load_flags': 68223104, | 768 'load_flags': 68223104, |
769 'method': 'GET', | 769 'method': 'GET', |
770 'priority': 4, | 770 'priority': 4, |
771 'url': 'http://www.doesnotexistdomain.com/' | 771 'url': 'http://www.doesnotexistdomain.com/' |
772 }, | 772 }, |
773 'phase': LogEventPhase.PHASE_BEGIN, | 773 'phase': EventPhase.PHASE_BEGIN, |
774 'source': { | 774 'source': { |
775 'id': 318, | 775 'id': 318, |
776 'type': LogSourceType.URL_REQUEST | 776 'type': EventSourceType.URL_REQUEST |
777 }, | 777 }, |
778 'time': '953675455', | 778 'time': '953675455', |
779 'type': LogEventType.URL_REQUEST_START_JOB | 779 'type': EventType.URL_REQUEST_START_JOB |
780 }, | 780 }, |
781 { | 781 { |
782 'phase': LogEventPhase.PHASE_END, | 782 'phase': EventPhase.PHASE_END, |
783 'source': { | 783 'source': { |
784 'id': 318, | 784 'id': 318, |
785 'type': LogSourceType.URL_REQUEST | 785 'type': EventSourceType.URL_REQUEST |
786 }, | 786 }, |
787 'time': '953675460', | 787 'time': '953675460', |
788 'type': LogEventType.URL_REQUEST_START_JOB | 788 'type': EventType.URL_REQUEST_START_JOB |
789 }, | 789 }, |
790 { | 790 { |
791 'params': { | 791 'params': { |
792 'load_flags': 68223104, | 792 'load_flags': 68223104, |
793 'method': 'GET', | 793 'method': 'GET', |
794 'priority': 4, | 794 'priority': 4, |
795 'url': 'http://www.doesnotexistdomain.com/' | 795 'url': 'http://www.doesnotexistdomain.com/' |
796 }, | 796 }, |
797 'phase': LogEventPhase.PHASE_BEGIN, | 797 'phase': EventPhase.PHASE_BEGIN, |
798 'source': { | 798 'source': { |
799 'id': 318, | 799 'id': 318, |
800 'type': LogSourceType.URL_REQUEST | 800 'type': EventSourceType.URL_REQUEST |
801 }, | 801 }, |
802 'time': '953675460', | 802 'time': '953675460', |
803 'type': LogEventType.URL_REQUEST_START_JOB | 803 'type': EventType.URL_REQUEST_START_JOB |
804 }, | 804 }, |
805 { | 805 { |
806 'phase': LogEventPhase.PHASE_BEGIN, | 806 'phase': EventPhase.PHASE_BEGIN, |
807 'source': { | 807 'source': { |
808 'id': 318, | 808 'id': 318, |
809 'type': LogSourceType.URL_REQUEST | 809 'type': EventSourceType.URL_REQUEST |
810 }, | 810 }, |
811 'time': '953675469', | 811 'time': '953675469', |
812 'type': LogEventType.HTTP_CACHE_GET_BACKEND | 812 'type': EventType.HTTP_CACHE_GET_BACKEND |
813 }, | 813 }, |
814 { | 814 { |
815 'phase': LogEventPhase.PHASE_END, | 815 'phase': EventPhase.PHASE_END, |
816 'source': { | 816 'source': { |
817 'id': 318, | 817 'id': 318, |
818 'type': LogSourceType.URL_REQUEST | 818 'type': EventSourceType.URL_REQUEST |
819 }, | 819 }, |
820 'time': '953675469', | 820 'time': '953675469', |
821 'type': LogEventType.HTTP_CACHE_GET_BACKEND | 821 'type': EventType.HTTP_CACHE_GET_BACKEND |
822 }, | 822 }, |
823 { | 823 { |
824 'phase': LogEventPhase.PHASE_BEGIN, | 824 'phase': EventPhase.PHASE_BEGIN, |
825 'source': { | 825 'source': { |
826 'id': 318, | 826 'id': 318, |
827 'type': LogSourceType.URL_REQUEST | 827 'type': EventSourceType.URL_REQUEST |
828 }, | 828 }, |
829 'time': '953675469', | 829 'time': '953675469', |
830 'type': LogEventType.HTTP_CACHE_OPEN_ENTRY | 830 'type': EventType.HTTP_CACHE_OPEN_ENTRY |
831 }, | 831 }, |
832 { | 832 { |
833 'params': { | 833 'params': { |
834 'net_error': -2 | 834 'net_error': -2 |
835 }, | 835 }, |
836 'phase': LogEventPhase.PHASE_END, | 836 'phase': EventPhase.PHASE_END, |
837 'source': { | 837 'source': { |
838 'id': 318, | 838 'id': 318, |
839 'type': LogSourceType.URL_REQUEST | 839 'type': EventSourceType.URL_REQUEST |
840 }, | 840 }, |
841 'time': '953675470', | 841 'time': '953675470', |
842 'type': LogEventType.HTTP_CACHE_OPEN_ENTRY | 842 'type': EventType.HTTP_CACHE_OPEN_ENTRY |
843 }, | 843 }, |
844 { | 844 { |
845 'phase': LogEventPhase.PHASE_BEGIN, | 845 'phase': EventPhase.PHASE_BEGIN, |
846 'source': { | 846 'source': { |
847 'id': 318, | 847 'id': 318, |
848 'type': LogSourceType.URL_REQUEST | 848 'type': EventSourceType.URL_REQUEST |
849 }, | 849 }, |
850 'time': '953675471', | 850 'time': '953675471', |
851 'type': LogEventType.HTTP_CACHE_CREATE_ENTRY | 851 'type': EventType.HTTP_CACHE_CREATE_ENTRY |
852 }, | 852 }, |
853 { | 853 { |
854 'phase': LogEventPhase.PHASE_END, | 854 'phase': EventPhase.PHASE_END, |
855 'source': { | 855 'source': { |
856 'id': 318, | 856 'id': 318, |
857 'type': LogSourceType.URL_REQUEST | 857 'type': EventSourceType.URL_REQUEST |
858 }, | 858 }, |
859 'time': '953675473', | 859 'time': '953675473', |
860 'type': LogEventType.HTTP_CACHE_CREATE_ENTRY | 860 'type': EventType.HTTP_CACHE_CREATE_ENTRY |
861 }, | 861 }, |
862 { | 862 { |
863 'phase': LogEventPhase.PHASE_BEGIN, | 863 'phase': EventPhase.PHASE_BEGIN, |
864 'source': { | 864 'source': { |
865 'id': 318, | 865 'id': 318, |
866 'type': LogSourceType.URL_REQUEST | 866 'type': EventSourceType.URL_REQUEST |
867 }, | 867 }, |
868 'time': '953675473', | 868 'time': '953675473', |
869 'type': LogEventType.HTTP_CACHE_ADD_TO_ENTRY | 869 'type': EventType.HTTP_CACHE_ADD_TO_ENTRY |
870 }, | 870 }, |
871 { | 871 { |
872 'phase': LogEventPhase.PHASE_END, | 872 'phase': EventPhase.PHASE_END, |
873 'source': { | 873 'source': { |
874 'id': 318, | 874 'id': 318, |
875 'type': LogSourceType.URL_REQUEST | 875 'type': EventSourceType.URL_REQUEST |
876 }, | 876 }, |
877 'time': '953675474', | 877 'time': '953675474', |
878 'type': LogEventType.HTTP_CACHE_ADD_TO_ENTRY | 878 'type': EventType.HTTP_CACHE_ADD_TO_ENTRY |
879 }, | 879 }, |
880 { | 880 { |
881 'phase': LogEventPhase.PHASE_BEGIN, | 881 'phase': EventPhase.PHASE_BEGIN, |
882 'source': { | 882 'source': { |
883 'id': 318, | 883 'id': 318, |
884 'type': LogSourceType.URL_REQUEST | 884 'type': EventSourceType.URL_REQUEST |
885 }, | 885 }, |
886 'time': '953675474', | 886 'time': '953675474', |
887 'type': LogEventType.HTTP_STREAM_REQUEST | 887 'type': EventType.HTTP_STREAM_REQUEST |
888 }, | 888 }, |
889 { | 889 { |
890 'phase': LogEventPhase.PHASE_END, | 890 'phase': EventPhase.PHASE_END, |
891 'source': { | 891 'source': { |
892 'id': 318, | 892 'id': 318, |
893 'type': LogSourceType.URL_REQUEST | 893 'type': EventSourceType.URL_REQUEST |
894 }, | 894 }, |
895 'time': '953675699', | 895 'time': '953675699', |
896 'type': LogEventType.HTTP_STREAM_REQUEST | 896 'type': EventType.HTTP_STREAM_REQUEST |
897 }, | 897 }, |
898 { | 898 { |
899 'params': { | 899 'params': { |
900 'net_error': -105 | 900 'net_error': -105 |
901 }, | 901 }, |
902 'phase': LogEventPhase.PHASE_END, | 902 'phase': EventPhase.PHASE_END, |
903 'source': { | 903 'source': { |
904 'id': 318, | 904 'id': 318, |
905 'type': LogSourceType.URL_REQUEST | 905 'type': EventSourceType.URL_REQUEST |
906 }, | 906 }, |
907 'time': '953675705', | 907 'time': '953675705', |
908 'type': LogEventType.URL_REQUEST_START_JOB | 908 'type': EventType.URL_REQUEST_START_JOB |
909 }, | 909 }, |
910 { | 910 { |
911 'params': { | 911 'params': { |
912 'net_error': -105 | 912 'net_error': -105 |
913 }, | 913 }, |
914 'phase': LogEventPhase.PHASE_END, | 914 'phase': EventPhase.PHASE_END, |
915 'source': { | 915 'source': { |
916 'id': 318, | 916 'id': 318, |
917 'type': LogSourceType.URL_REQUEST | 917 'type': EventSourceType.URL_REQUEST |
918 }, | 918 }, |
919 'time': '953675923', | 919 'time': '953675923', |
920 'type': LogEventType.REQUEST_ALIVE | 920 'type': EventType.REQUEST_ALIVE |
921 } | 921 } |
922 ]; | 922 ]; |
923 | 923 |
924 testCase.expectedText = | 924 testCase.expectedText = |
925 't=1338864773894 [st= 0] +REQUEST_ALIVE [dt=475]\n' + | 925 't=1338864773894 [st= 0] +REQUEST_ALIVE [dt=475]\n' + |
926 't=1338864773901 [st= 7] URL_REQUEST_START_JOB [dt=5]\n' + | 926 't=1338864773901 [st= 7] URL_REQUEST_START_JOB [dt=5]\n' + |
927 ' --> load_flags = 68223104 (ENABLE_LOAD_TIMING | ' + | 927 ' --> load_flags = 68223104 (ENABLE_LOAD_TIMING | ' + |
928 'MAIN_FRAME | MAYBE_USER_GESTURE | VERIFY_EV_CERT)\n' + | 928 'MAIN_FRAME | MAYBE_USER_GESTURE | VERIFY_EV_CERT)\n' + |
929 ' --> method = "GET"\n' + | 929 ' --> method = "GET"\n' + |
930 ' --> priority = 4\n' + | 930 ' --> priority = 4\n' + |
(...skipping 28 matching lines...) Expand all Loading... |
959 testCase.tickOffset = '1337911098473'; | 959 testCase.tickOffset = '1337911098473'; |
960 | 960 |
961 testCase.logEntries = [ | 961 testCase.logEntries = [ |
962 { | 962 { |
963 'params': { | 963 'params': { |
964 'source_dependency': { | 964 'source_dependency': { |
965 'id': 634, | 965 'id': 634, |
966 'type': 4 | 966 'type': 4 |
967 } | 967 } |
968 }, | 968 }, |
969 'phase': LogEventPhase.PHASE_BEGIN, | 969 'phase': EventPhase.PHASE_BEGIN, |
970 'source': { | 970 'source': { |
971 'id': 637, | 971 'id': 637, |
972 'type': LogSourceType.SOCKET | 972 'type': EventSourceType.SOCKET |
973 }, | 973 }, |
974 'time': '953918459', | 974 'time': '953918459', |
975 'type': LogEventType.SOCKET_ALIVE | 975 'type': EventType.SOCKET_ALIVE |
976 }, | 976 }, |
977 { | 977 { |
978 'params': { | 978 'params': { |
979 'address_list': [ | 979 'address_list': [ |
980 '184.30.253.15:80' | 980 '184.30.253.15:80' |
981 ] | 981 ] |
982 }, | 982 }, |
983 'phase': LogEventPhase.PHASE_BEGIN, | 983 'phase': EventPhase.PHASE_BEGIN, |
984 'source': { | 984 'source': { |
985 'id': 637, | 985 'id': 637, |
986 'type': LogSourceType.SOCKET | 986 'type': EventSourceType.SOCKET |
987 }, | 987 }, |
988 'time': '953918460', | 988 'time': '953918460', |
989 'type': LogEventType.TCP_CONNECT | 989 'type': EventType.TCP_CONNECT |
990 }, | 990 }, |
991 { | 991 { |
992 'params': { | 992 'params': { |
993 'address': '184.30.253.15:80' | 993 'address': '184.30.253.15:80' |
994 }, | 994 }, |
995 'phase': LogEventPhase.PHASE_BEGIN, | 995 'phase': EventPhase.PHASE_BEGIN, |
996 'source': { | 996 'source': { |
997 'id': 637, | 997 'id': 637, |
998 'type': LogSourceType.SOCKET | 998 'type': EventSourceType.SOCKET |
999 }, | 999 }, |
1000 'time': '953918461', | 1000 'time': '953918461', |
1001 'type': LogEventType.TCP_CONNECT_ATTEMPT | 1001 'type': EventType.TCP_CONNECT_ATTEMPT |
1002 }, | 1002 }, |
1003 { | 1003 { |
1004 'phase': LogEventPhase.PHASE_END, | 1004 'phase': EventPhase.PHASE_END, |
1005 'source': { | 1005 'source': { |
1006 'id': 637, | 1006 'id': 637, |
1007 'type': LogSourceType.SOCKET | 1007 'type': EventSourceType.SOCKET |
1008 }, | 1008 }, |
1009 'time': '953918464', | 1009 'time': '953918464', |
1010 'type': LogEventType.TCP_CONNECT_ATTEMPT | 1010 'type': EventType.TCP_CONNECT_ATTEMPT |
1011 }, | 1011 }, |
1012 { | 1012 { |
1013 'params': { | 1013 'params': { |
1014 'source_address': '127.0.0.1:54041' | 1014 'source_address': '127.0.0.1:54041' |
1015 }, | 1015 }, |
1016 'phase': LogEventPhase.PHASE_END, | 1016 'phase': EventPhase.PHASE_END, |
1017 'source': { | 1017 'source': { |
1018 'id': 637, | 1018 'id': 637, |
1019 'type': LogSourceType.SOCKET | 1019 'type': EventSourceType.SOCKET |
1020 }, | 1020 }, |
1021 'time': '953918465', | 1021 'time': '953918465', |
1022 'type': LogEventType.TCP_CONNECT | 1022 'type': EventType.TCP_CONNECT |
1023 }, | 1023 }, |
1024 { | 1024 { |
1025 'params': { | 1025 'params': { |
1026 'source_dependency': { | 1026 'source_dependency': { |
1027 'id': 628, | 1027 'id': 628, |
1028 'type': 11 | 1028 'type': 11 |
1029 } | 1029 } |
1030 }, | 1030 }, |
1031 'phase': LogEventPhase.PHASE_BEGIN, | 1031 'phase': EventPhase.PHASE_BEGIN, |
1032 'source': { | 1032 'source': { |
1033 'id': 637, | 1033 'id': 637, |
1034 'type': LogSourceType.SOCKET | 1034 'type': EventSourceType.SOCKET |
1035 }, | 1035 }, |
1036 'time': '953918472', | 1036 'time': '953918472', |
1037 'type': LogEventType.SOCKET_IN_USE | 1037 'type': EventType.SOCKET_IN_USE |
1038 }, | 1038 }, |
1039 { | 1039 { |
1040 'params': { | 1040 'params': { |
1041 'byte_count': 780, | 1041 'byte_count': 780, |
1042 'hex_encoded_bytes': '474554202F66617669636F6E2E69636F20485454502' + | 1042 'hex_encoded_bytes': '474554202F66617669636F6E2E69636F20485454502' + |
1043 'F312E310D0A486F73743A207777772E6170706C652E' + | 1043 'F312E310D0A486F73743A207777772E6170706C652E' + |
1044 '636F6D0D0A436F6E6E656374696F6E3A20' | 1044 '636F6D0D0A436F6E6E656374696F6E3A20' |
1045 }, | 1045 }, |
1046 'phase': LogEventPhase.PHASE_NONE, | 1046 'phase': EventPhase.PHASE_NONE, |
1047 'source': { | 1047 'source': { |
1048 'id': 637, | 1048 'id': 637, |
1049 'type': LogSourceType.SOCKET | 1049 'type': EventSourceType.SOCKET |
1050 }, | 1050 }, |
1051 'time': '953918484', | 1051 'time': '953918484', |
1052 'type': LogEventType.SOCKET_BYTES_SENT | 1052 'type': EventType.SOCKET_BYTES_SENT |
1053 }, | 1053 }, |
1054 { | 1054 { |
1055 'params': { | 1055 'params': { |
1056 'byte_count': 1024, | 1056 'byte_count': 1024, |
1057 'hex_encoded_bytes': '485454502F312E3120323030204F4B0D0A4C6173742' + | 1057 'hex_encoded_bytes': '485454502F312E3120323030204F4B0D0A4C6173742' + |
1058 'D4D6F6469666965643A204D6F6E2C20313920446563' + | 1058 'D4D6F6469666965643A204D6F6E2C20313920446563' + |
1059 '20323031312032323A34363A353920474D' | 1059 '20323031312032323A34363A353920474D' |
1060 }, | 1060 }, |
1061 'phase': LogEventPhase.PHASE_NONE, | 1061 'phase': EventPhase.PHASE_NONE, |
1062 'source': { | 1062 'source': { |
1063 'id': 637, | 1063 'id': 637, |
1064 'type': LogSourceType.SOCKET | 1064 'type': EventSourceType.SOCKET |
1065 }, | 1065 }, |
1066 'time': '953918596', | 1066 'time': '953918596', |
1067 'type': LogEventType.SOCKET_BYTES_RECEIVED | 1067 'type': EventType.SOCKET_BYTES_RECEIVED |
1068 } | 1068 } |
1069 ]; | 1069 ]; |
1070 | 1070 |
1071 testCase.expectedText = | 1071 testCase.expectedText = |
1072 't=1338865016932 [st= 0] +SOCKET_ALIVE [dt=?]\n' + | 1072 't=1338865016932 [st= 0] +SOCKET_ALIVE [dt=?]\n' + |
1073 ' --> source_dependency = 634 (CONNECT_JOB)\n' + | 1073 ' --> source_dependency = 634 (CONNECT_JOB)\n' + |
1074 't=1338865016933 [st= 1] +TCP_CONNECT [dt=5]\n' + | 1074 't=1338865016933 [st= 1] +TCP_CONNECT [dt=5]\n' + |
1075 ' --> address_list = ["184.30.253.15:80"]\n' + | 1075 ' --> address_list = ["184.30.253.15:80"]\n' + |
1076 't=1338865016934 [st= 2] TCP_CONNECT_ATTEMPT [dt=3]\n' + | 1076 't=1338865016934 [st= 2] TCP_CONNECT_ATTEMPT [dt=3]\n' + |
1077 ' --> address = "184.30.253.15:80"\n' + | 1077 ' --> address = "184.30.253.15:80"\n' + |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1109 testCase.tickOffset = '1337911098481'; | 1109 testCase.tickOffset = '1337911098481'; |
1110 | 1110 |
1111 testCase.logEntries = [ | 1111 testCase.logEntries = [ |
1112 { | 1112 { |
1113 'params': { | 1113 'params': { |
1114 'certificates': [ | 1114 'certificates': [ |
1115 '-----BEGIN CERTIFICATE-----\n1\n-----END CERTIFICATE-----\n', | 1115 '-----BEGIN CERTIFICATE-----\n1\n-----END CERTIFICATE-----\n', |
1116 '-----BEGIN CERTIFICATE-----\n2\n-----END CERTIFICATE-----\n', | 1116 '-----BEGIN CERTIFICATE-----\n2\n-----END CERTIFICATE-----\n', |
1117 ] | 1117 ] |
1118 }, | 1118 }, |
1119 'phase': LogEventPhase.PHASE_BEGIN, | 1119 'phase': EventPhase.PHASE_BEGIN, |
1120 'source': { | 1120 'source': { |
1121 'id': 752, | 1121 'id': 752, |
1122 'type': LogSourceType.CERT_VERIFIER_JOB | 1122 'type': EventSourceType.CERT_VERIFIER_JOB |
1123 }, | 1123 }, |
1124 'time': '954124663', | 1124 'time': '954124663', |
1125 'type': LogEventType.CERT_VERIFIER_JOB | 1125 'type': EventType.CERT_VERIFIER_JOB |
1126 }, | 1126 }, |
1127 { | 1127 { |
1128 'phase': LogEventPhase.PHASE_END, | 1128 'phase': EventPhase.PHASE_END, |
1129 'source': { | 1129 'source': { |
1130 'id': 752, | 1130 'id': 752, |
1131 'type': LogSourceType.CERT_VERIFIER_JOB | 1131 'type': EventSourceType.CERT_VERIFIER_JOB |
1132 }, | 1132 }, |
1133 'time': '954124697', | 1133 'time': '954124697', |
1134 'type': LogEventType.CERT_VERIFIER_JOB | 1134 'type': EventType.CERT_VERIFIER_JOB |
1135 } | 1135 } |
1136 ]; | 1136 ]; |
1137 | 1137 |
1138 testCase.expectedText = | 1138 testCase.expectedText = |
1139 't=1338865223144 [st=0] CERT_VERIFIER_JOB [dt=34]\n' + | 1139 't=1338865223144 [st=0] CERT_VERIFIER_JOB [dt=34]\n' + |
1140 ' --> certificates =\n' + | 1140 ' --> certificates =\n' + |
1141 ' -----BEGIN CERTIFICATE-----\n' + | 1141 ' -----BEGIN CERTIFICATE-----\n' + |
1142 ' 1\n' + | 1142 ' 1\n' + |
1143 ' -----END CERTIFICATE-----\n' + | 1143 ' -----END CERTIFICATE-----\n' + |
1144 ' \n' + | 1144 ' \n' + |
(...skipping 21 matching lines...) Expand all Loading... |
1166 'foo', | 1166 'foo', |
1167 '<local>' | 1167 '<local>' |
1168 ], | 1168 ], |
1169 'pac_url': 'https://config/wpad.dat', | 1169 'pac_url': 'https://config/wpad.dat', |
1170 'single_proxy': 'cache-proxy:3128' | 1170 'single_proxy': 'cache-proxy:3128' |
1171 }, | 1171 }, |
1172 'old_config': { | 1172 'old_config': { |
1173 'auto_detect': true | 1173 'auto_detect': true |
1174 } | 1174 } |
1175 }, | 1175 }, |
1176 'phase': LogEventPhase.PHASE_NONE, | 1176 'phase': EventPhase.PHASE_NONE, |
1177 'source': { | 1177 'source': { |
1178 'id': 814, | 1178 'id': 814, |
1179 'type': LogSourceType.NONE | 1179 'type': EventSourceType.NONE |
1180 }, | 1180 }, |
1181 'time': '954443578', | 1181 'time': '954443578', |
1182 'type': LogEventType.PROXY_CONFIG_CHANGED | 1182 'type': EventType.PROXY_CONFIG_CHANGED |
1183 } | 1183 } |
1184 ]; | 1184 ]; |
1185 | 1185 |
1186 testCase.expectedText = | 1186 testCase.expectedText = |
1187 't=1338865542059 [st=0] PROXY_CONFIG_CHANGED\n' + | 1187 't=1338865542059 [st=0] PROXY_CONFIG_CHANGED\n' + |
1188 ' --> old_config =\n' + | 1188 ' --> old_config =\n' + |
1189 ' Auto-detect\n' + | 1189 ' Auto-detect\n' + |
1190 ' --> new_config =\n' + | 1190 ' --> new_config =\n' + |
1191 ' (1) Auto-detect\n' + | 1191 ' (1) Auto-detect\n' + |
1192 ' (2) PAC script: https://config/wpad.dat\n' + | 1192 ' (2) PAC script: https://config/wpad.dat\n' + |
(...skipping 25 matching lines...) Expand all Loading... |
1218 'Location: http://msdn.microsoft.com', | 1218 'Location: http://msdn.microsoft.com', |
1219 'Server: Microsoft-IIS/7.5', | 1219 'Server: Microsoft-IIS/7.5', |
1220 'Set-Cookie: MyMagicPony', | 1220 'Set-Cookie: MyMagicPony', |
1221 'P3P: CP=\"ALL\"', | 1221 'P3P: CP=\"ALL\"', |
1222 'X-Powered-By: ASP.NET', | 1222 'X-Powered-By: ASP.NET', |
1223 'X-UA-Compatible: IE=EmulateIE7', | 1223 'X-UA-Compatible: IE=EmulateIE7', |
1224 'Date: Tue, 05 Jun 2012 21:06:45 GMT', | 1224 'Date: Tue, 05 Jun 2012 21:06:45 GMT', |
1225 'Connection: close' | 1225 'Connection: close' |
1226 ] | 1226 ] |
1227 }, | 1227 }, |
1228 'phase': LogEventPhase.PHASE_NONE, | 1228 'phase': EventPhase.PHASE_NONE, |
1229 'source': { | 1229 'source': { |
1230 'id': 829, | 1230 'id': 829, |
1231 'type': LogSourceType.URL_REQUEST | 1231 'type': EventSourceType.URL_REQUEST |
1232 }, | 1232 }, |
1233 'time': '1019307339', | 1233 'time': '1019307339', |
1234 'type': LogEventType.HTTP_TRANSACTION_READ_RESPONSE_HEADERS | 1234 'type': EventType.HTTP_TRANSACTION_READ_RESPONSE_HEADERS |
1235 }, | 1235 }, |
1236 { | 1236 { |
1237 'params': { | 1237 'params': { |
1238 'headers': [ | 1238 'headers': [ |
1239 'Host: msdn.microsoft.com', | 1239 'Host: msdn.microsoft.com', |
1240 'Connection: keep-alive', | 1240 'Connection: keep-alive', |
1241 'User-Agent: Mozilla/5.0', | 1241 'User-Agent: Mozilla/5.0', |
1242 'Accept: text/html', | 1242 'Accept: text/html', |
1243 'Accept-Encoding: gzip,deflate,sdch', | 1243 'Accept-Encoding: gzip,deflate,sdch', |
1244 'Accept-Language: en-US,en;q=0.8', | 1244 'Accept-Language: en-US,en;q=0.8', |
1245 'Accept-Charset: ISO-8859-1', | 1245 'Accept-Charset: ISO-8859-1', |
1246 'Cookie: MyMagicPony' | 1246 'Cookie: MyMagicPony' |
1247 ], | 1247 ], |
1248 'line': 'GET / HTTP/1.1\r\n' | 1248 'line': 'GET / HTTP/1.1\r\n' |
1249 }, | 1249 }, |
1250 'phase': LogEventPhase.PHASE_NONE, | 1250 'phase': EventPhase.PHASE_NONE, |
1251 'source': { | 1251 'source': { |
1252 'id': 829, | 1252 'id': 829, |
1253 'type': LogSourceType.URL_REQUEST | 1253 'type': EventSourceType.URL_REQUEST |
1254 }, | 1254 }, |
1255 'time': '1019307458', | 1255 'time': '1019307458', |
1256 'type': LogEventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS | 1256 'type': EventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS |
1257 } | 1257 } |
1258 ]; | 1258 ]; |
1259 | 1259 |
1260 testCase.expectedText = | 1260 testCase.expectedText = |
1261 't=1338930405478 [st= 0] HTTP_TRANSACTION_READ_RESPONSE_HEADERS\n' + | 1261 't=1338930405478 [st= 0] HTTP_TRANSACTION_READ_RESPONSE_HEADERS\n' + |
1262 ' --> HTTP/1.1 301 Moved Permanently\n' + | 1262 ' --> HTTP/1.1 301 Moved Permanently\n' + |
1263 ' Cache-Control: private\n' + | 1263 ' Cache-Control: private\n' + |
1264 ' Content-Length: 23\n' + | 1264 ' Content-Length: 23\n' + |
1265 ' Content-Type: text/html\n' + | 1265 ' Content-Type: text/html\n' + |
1266 ' Location: http://msdn.microsoft.com\n' + | 1266 ' Location: http://msdn.microsoft.com\n' + |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 ':version: HTTP/1.1', | 1317 ':version: HTTP/1.1', |
1318 'accept: text/html', | 1318 'accept: text/html', |
1319 'accept-charset: ISO-8859-1', | 1319 'accept-charset: ISO-8859-1', |
1320 'accept-encoding: gzip,deflate,sdch', | 1320 'accept-encoding: gzip,deflate,sdch', |
1321 'accept-language: en-US,en;q=0.8', | 1321 'accept-language: en-US,en;q=0.8', |
1322 'cookie: MyLittlePony', | 1322 'cookie: MyLittlePony', |
1323 'user-agent: Mozilla/5.0' | 1323 'user-agent: Mozilla/5.0' |
1324 ], | 1324 ], |
1325 'stream_id': 1 | 1325 'stream_id': 1 |
1326 }, | 1326 }, |
1327 'phase': LogEventPhase.PHASE_NONE, | 1327 'phase': EventPhase.PHASE_NONE, |
1328 'source': { | 1328 'source': { |
1329 'id': 153, | 1329 'id': 153, |
1330 'type': LogSourceType.SPDY_SESSION | 1330 'type': EventSourceType.SPDY_SESSION |
1331 }, | 1331 }, |
1332 'time': '1012984638', | 1332 'time': '1012984638', |
1333 'type': LogEventType.SPDY_SESSION_SYN_STREAM | 1333 'type': EventType.SPDY_SESSION_SYN_STREAM |
1334 }, | 1334 }, |
1335 { | 1335 { |
1336 'params': { | 1336 'params': { |
1337 'flags': 0, | 1337 'flags': 0, |
1338 'headers': [ | 1338 'headers': [ |
1339 ':status: 204 No Content', | 1339 ':status: 204 No Content', |
1340 ':version: HTTP/1.1', | 1340 ':version: HTTP/1.1', |
1341 'date: Tue, 05 Jun 2012 19:21:30 GMT', | 1341 'date: Tue, 05 Jun 2012 19:21:30 GMT', |
1342 'server: GSE', | 1342 'server: GSE', |
1343 'set-cookie: MyLittlePony', | 1343 'set-cookie: MyLittlePony', |
1344 'x-random-header: sup' | 1344 'x-random-header: sup' |
1345 ], | 1345 ], |
1346 'stream_id': 5 | 1346 'stream_id': 5 |
1347 }, | 1347 }, |
1348 'phase': LogEventPhase.PHASE_NONE, | 1348 'phase': EventPhase.PHASE_NONE, |
1349 'source': { | 1349 'source': { |
1350 'id': 153, | 1350 'id': 153, |
1351 'type': LogSourceType.SPDY_SESSION | 1351 'type': EventSourceType.SPDY_SESSION |
1352 }, | 1352 }, |
1353 'time': '1012992266', | 1353 'time': '1012992266', |
1354 'type': LogEventType.SPDY_SESSION_SYN_REPLY | 1354 'type': EventType.SPDY_SESSION_SYN_REPLY |
1355 } | 1355 } |
1356 ]; | 1356 ]; |
1357 | 1357 |
1358 testCase.expectedText = | 1358 testCase.expectedText = |
1359 't=1338924082421 [st= 0] SPDY_SESSION_SYN_STREAM\n' + | 1359 't=1338924082421 [st= 0] SPDY_SESSION_SYN_STREAM\n' + |
1360 ' --> flags = 1\n' + | 1360 ' --> flags = 1\n' + |
1361 ' --> :host: mail.google.com\n' + | 1361 ' --> :host: mail.google.com\n' + |
1362 ' :method: GET\n' + | 1362 ' :method: GET\n' + |
1363 ' :path: /a/google.com\n' + | 1363 ' :path: /a/google.com\n' + |
1364 ' :scheme: https\n' + | 1364 ' :scheme: https\n' + |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 { | 1406 { |
1407 'params': { | 1407 'params': { |
1408 'headers': [ | 1408 'headers': [ |
1409 'Host: www.google.com', | 1409 'Host: www.google.com', |
1410 'Connection: keep-alive' | 1410 'Connection: keep-alive' |
1411 ], | 1411 ], |
1412 'line': 'GET / HTTP/1.1\r\n', | 1412 'line': 'GET / HTTP/1.1\r\n', |
1413 // This is unexpected! | 1413 // This is unexpected! |
1414 'hello': 'yo dawg, i heard you like strings' | 1414 'hello': 'yo dawg, i heard you like strings' |
1415 }, | 1415 }, |
1416 'phase': LogEventPhase.PHASE_NONE, | 1416 'phase': EventPhase.PHASE_NONE, |
1417 'source': { | 1417 'source': { |
1418 'id': 146, | 1418 'id': 146, |
1419 'type': LogSourceType.URL_REQUEST | 1419 'type': EventSourceType.URL_REQUEST |
1420 }, | 1420 }, |
1421 'time': '953534910', | 1421 'time': '953534910', |
1422 'type': LogEventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS | 1422 'type': EventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS |
1423 }, | 1423 }, |
1424 ]; | 1424 ]; |
1425 | 1425 |
1426 testCase.expectedText = | 1426 testCase.expectedText = |
1427 't=1338864633356 [st=0] HTTP_TRANSACTION_SEND_REQUEST_HEADERS\n' + | 1427 't=1338864633356 [st=0] HTTP_TRANSACTION_SEND_REQUEST_HEADERS\n' + |
1428 ' --> GET / HTTP/1.1\n' + | 1428 ' --> GET / HTTP/1.1\n' + |
1429 ' Host: www.google.com\n' + | 1429 ' Host: www.google.com\n' + |
1430 ' Connection: keep-alive\n' + | 1430 ' Connection: keep-alive\n' + |
1431 ' --> hello = "yo dawg, i heard you like strings"'; | 1431 ' --> hello = "yo dawg, i heard you like strings"'; |
1432 | 1432 |
(...skipping 11 matching lines...) Expand all Loading... |
1444 testCase.logEntries = [ | 1444 testCase.logEntries = [ |
1445 { | 1445 { |
1446 'params': { | 1446 'params': { |
1447 // The expectation is for this to be called "headers". | 1447 // The expectation is for this to be called "headers". |
1448 'headersWRONG': [ | 1448 'headersWRONG': [ |
1449 'Host: www.google.com', | 1449 'Host: www.google.com', |
1450 'Connection: keep-alive' | 1450 'Connection: keep-alive' |
1451 ], | 1451 ], |
1452 'line': 'GET / HTTP/1.1\r\n' | 1452 'line': 'GET / HTTP/1.1\r\n' |
1453 }, | 1453 }, |
1454 'phase': LogEventPhase.PHASE_NONE, | 1454 'phase': EventPhase.PHASE_NONE, |
1455 'source': { | 1455 'source': { |
1456 'id': 146, | 1456 'id': 146, |
1457 'type': LogSourceType.URL_REQUEST | 1457 'type': EventSourceType.URL_REQUEST |
1458 }, | 1458 }, |
1459 'time': '953534910', | 1459 'time': '953534910', |
1460 'type': LogEventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS | 1460 'type': EventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS |
1461 }, | 1461 }, |
1462 ]; | 1462 ]; |
1463 | 1463 |
1464 testCase.expectedText = | 1464 testCase.expectedText = |
1465 't=1338864633356 [st=0] HTTP_TRANSACTION_SEND_REQUEST_HEADERS\n' + | 1465 't=1338864633356 [st=0] HTTP_TRANSACTION_SEND_REQUEST_HEADERS\n' + |
1466 ' --> headersWRONG = ["Host: www.google.com",' + | 1466 ' --> headersWRONG = ["Host: www.google.com",' + |
1467 '"Connection: keep-alive"]\n' + | 1467 '"Connection: keep-alive"]\n' + |
1468 ' --> line = "GET / HTTP/1.1\\r\\n"'; | 1468 ' --> line = "GET / HTTP/1.1\\r\\n"'; |
1469 | 1469 |
1470 return testCase; | 1470 return testCase; |
1471 } | 1471 } |
1472 | 1472 |
1473 /** | 1473 /** |
1474 * Tests the formatting for an SSL version fallback event. | 1474 * Tests the formatting for an SSL version fallback event. |
1475 */ | 1475 */ |
1476 function painterTestSSLVersionFallback() { | 1476 function painterTestSSLVersionFallback() { |
1477 var testCase = {}; | 1477 var testCase = {}; |
1478 testCase.tickOffset = '1337911098400'; | 1478 testCase.tickOffset = '1337911098400'; |
1479 | 1479 |
1480 testCase.logEntries = [ | 1480 testCase.logEntries = [ |
1481 { | 1481 { |
1482 'params': { | 1482 'params': { |
1483 'host_and_port': 'www-927.ibm.com:443', | 1483 'host_and_port': 'www-927.ibm.com:443', |
1484 'net_error': -107, | 1484 'net_error': -107, |
1485 'version_after': 0x301, | 1485 'version_after': 0x301, |
1486 'version_before': 0x302 | 1486 'version_before': 0x302 |
1487 }, | 1487 }, |
1488 'phase': LogEventPhase.PHASE_NONE, | 1488 'phase': EventPhase.PHASE_NONE, |
1489 'source': { | 1489 'source': { |
1490 'id': 124, | 1490 'id': 124, |
1491 'type': LogSourceType.URL_REQUEST | 1491 'type': EventSourceType.URL_REQUEST |
1492 }, | 1492 }, |
1493 'time': '1119062679', | 1493 'time': '1119062679', |
1494 'type': LogEventType.SSL_VERSION_FALLBACK | 1494 'type': EventType.SSL_VERSION_FALLBACK |
1495 }, | 1495 }, |
1496 { | 1496 { |
1497 'params': { | 1497 'params': { |
1498 'host_and_port': 'www-927.ibm.com:443', | 1498 'host_and_port': 'www-927.ibm.com:443', |
1499 'net_error': -107, | 1499 'net_error': -107, |
1500 'version_after': 0x300, | 1500 'version_after': 0x300, |
1501 'version_before': 0x301 | 1501 'version_before': 0x301 |
1502 }, | 1502 }, |
1503 'phase': LogEventPhase.PHASE_NONE, | 1503 'phase': EventPhase.PHASE_NONE, |
1504 'source': { | 1504 'source': { |
1505 'id': 124, | 1505 'id': 124, |
1506 'type': LogSourceType.URL_REQUEST | 1506 'type': EventSourceType.URL_REQUEST |
1507 }, | 1507 }, |
1508 'time': '1119062850', | 1508 'time': '1119062850', |
1509 'type': LogEventType.SSL_VERSION_FALLBACK | 1509 'type': EventType.SSL_VERSION_FALLBACK |
1510 }, | 1510 }, |
1511 { | 1511 { |
1512 'params': { | 1512 'params': { |
1513 'version_after': 0x123456, | 1513 'version_after': 0x123456, |
1514 'version_before': 0x300 | 1514 'version_before': 0x300 |
1515 }, | 1515 }, |
1516 'phase': LogEventPhase.PHASE_NONE, | 1516 'phase': EventPhase.PHASE_NONE, |
1517 'source': { | 1517 'source': { |
1518 'id': 124, | 1518 'id': 124, |
1519 'type': LogSourceType.URL_REQUEST | 1519 'type': EventSourceType.URL_REQUEST |
1520 }, | 1520 }, |
1521 'time': '1119062850', | 1521 'time': '1119062850', |
1522 'type': LogEventType.SSL_VERSION_FALLBACK | 1522 'type': EventType.SSL_VERSION_FALLBACK |
1523 }, | 1523 }, |
1524 ]; | 1524 ]; |
1525 | 1525 |
1526 testCase.expectedText = | 1526 testCase.expectedText = |
1527 't=1339030161079 [st= 0] SSL_VERSION_FALLBACK\n' + | 1527 't=1339030161079 [st= 0] SSL_VERSION_FALLBACK\n' + |
1528 ' --> TLS 1.1 ==> TLS 1.0\n' + | 1528 ' --> TLS 1.1 ==> TLS 1.0\n' + |
1529 ' --> host_and_port = "www-927.ibm.com:443"\n' + | 1529 ' --> host_and_port = "www-927.ibm.com:443"\n' + |
1530 ' --> net_error = -107 (ERR_SSL_PROTOCOL_ERROR)\n' + | 1530 ' --> net_error = -107 (ERR_SSL_PROTOCOL_ERROR)\n' + |
1531 't=1339030161250 [st=171] SSL_VERSION_FALLBACK\n' + | 1531 't=1339030161250 [st=171] SSL_VERSION_FALLBACK\n' + |
1532 ' --> TLS 1.0 ==> SSL 3.0\n' + | 1532 ' --> TLS 1.0 ==> SSL 3.0\n' + |
1533 ' --> host_and_port = "www-927.ibm.com:443"\n' + | 1533 ' --> host_and_port = "www-927.ibm.com:443"\n' + |
1534 ' --> net_error = -107 (ERR_SSL_PROTOCOL_ERROR)\n' + | 1534 ' --> net_error = -107 (ERR_SSL_PROTOCOL_ERROR)\n' + |
1535 't=1339030161250 [st=171] SSL_VERSION_FALLBACK\n' + | 1535 't=1339030161250 [st=171] SSL_VERSION_FALLBACK\n' + |
1536 ' --> SSL 3.0 ==> SSL 0x123456'; | 1536 ' --> SSL 3.0 ==> SSL 0x123456'; |
1537 | 1537 |
1538 return testCase; | 1538 return testCase; |
1539 } | 1539 } |
1540 | 1540 |
1541 })(); // Anonymous namespace | 1541 })(); // Anonymous namespace |
OLD | NEW |