Commit 2e50e01
committed
Only lint JavaScript belonging to the tested page
A browsertime HAR can contain more than one page, for example when a
concurrent browsertime run on the same host races for the same Chrome
DevTools port and its crossed CDP session records another website's
page load into this run's recording (see
Webperf-se/webperf_core#1557).
This analyzer linted every JavaScript response body and every inline
script in the whole HAR, so a crossed-in recording could attribute
another website's JavaScript issues to the tested website.
Filter entries to the ones belonging to the first page in the HAR's
pages array, and verify that the recording's first request matches the
tested URL's hostname (the URL API normalizes IDN hostnames to
punycode on both sides). On mismatch nothing is analyzed. HARs without
a pages array and entries without pageref behave as before.1 parent 9360a63 commit 2e50e01
1 file changed
Lines changed: 42 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
32 | 73 | | |
33 | 74 | | |
34 | 75 | | |
| |||
41 | 82 | | |
42 | 83 | | |
43 | 84 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 85 | | |
49 | 86 | | |
50 | | - | |
| 87 | + | |
51 | 88 | | |
52 | 89 | | |
53 | 90 | | |
| |||
0 commit comments