Skip to content

Commit af8520f

Browse files
author
gatowololo
committed
Let resources timing entries be added to performance entry buffer.
Update relevant tests to properly report and expect failure.
1 parent a634f05 commit af8520f

11 files changed

Lines changed: 76 additions & 59 deletions

components/script/network_listener.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub fn submit_timing_data(
6262
PerformanceResourceTiming::new(global, url, initiator_type, None, resource_timing);
6363
global
6464
.performance()
65-
.queue_entry(performance_entry.upcast::<PerformanceEntry>(), false);
65+
.queue_entry(performance_entry.upcast::<PerformanceEntry>(), true);
6666
}
6767

6868
impl<Listener: PreInvoke + Send + 'static> NetworkListener<Listener> {

tests/wpt/metadata/resource-timing/idlharness.any.js.ini

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@
7070
[PerformanceResourceTiming interface: resource must inherit property "workerStart" with the proper type]
7171
expected: FAIL
7272

73-
[PerformanceResourceTiming interface: resource must inherit property "initiatorType" with the proper type]
74-
expected: FAIL
75-
7673
[PerformanceResourceTiming interface: attribute transferSize]
7774
expected: FAIL
7875

@@ -82,66 +79,36 @@
8279
[PerformanceResourceTiming interface: resource must inherit property "secureConnectionStart" with the proper type]
8380
expected: FAIL
8481

85-
[PerformanceResourceTiming interface: resource must inherit property "requestStart" with the proper type]
86-
expected: FAIL
87-
8882
[PerformanceResourceTiming interface: resource must inherit property "transferSize" with the proper type]
8983
expected: FAIL
9084

9185
[PerformanceResourceTiming interface: resource must inherit property "domainLookupStart" with the proper type]
9286
expected: FAIL
9387

94-
[PerformanceResourceTiming interface: resource must inherit property "connectStart" with the proper type]
95-
expected: FAIL
96-
9788
[PerformanceResourceTiming interface: attribute decodedBodySize]
9889
expected: FAIL
9990

100-
[Stringification of resource]
101-
expected: FAIL
102-
103-
[PerformanceResourceTiming interface: resource must inherit property "redirectStart" with the proper type]
104-
expected: FAIL
105-
10691
[PerformanceResourceTiming interface: resource must inherit property "toJSON()" with the proper type]
10792
expected: FAIL
10893

109-
[PerformanceResourceTiming interface: resource must inherit property "responseEnd" with the proper type]
110-
expected: FAIL
111-
11294
[PerformanceResourceTiming interface: resource must inherit property "redirectEnd" with the proper type]
11395
expected: FAIL
11496

115-
[PerformanceResourceTiming interface: resource must inherit property "nextHopProtocol" with the proper type]
116-
expected: FAIL
117-
11897
[PerformanceResourceTiming interface: resource must inherit property "domainLookupEnd" with the proper type]
11998
expected: FAIL
12099

121100
[PerformanceResourceTiming interface: resource must inherit property "decodedBodySize" with the proper type]
122101
expected: FAIL
123102

124-
[PerformanceResourceTiming interface: resource must inherit property "fetchStart" with the proper type]
125-
expected: FAIL
126-
127103
[PerformanceResourceTiming interface: attribute encodedBodySize]
128104
expected: FAIL
129105

130-
[PerformanceResourceTiming interface: resource must inherit property "connectEnd" with the proper type]
131-
expected: FAIL
132-
133106
[PerformanceResourceTiming interface: resource must inherit property "encodedBodySize" with the proper type]
134107
expected: FAIL
135108

136109
[PerformanceResourceTiming interface: operation toJSON()]
137110
expected: FAIL
138111

139-
[PerformanceResourceTiming interface: resource must inherit property "responseStart" with the proper type]
140-
expected: FAIL
141-
142-
[PerformanceResourceTiming must be primary interface of resource]
143-
expected: FAIL
144-
145112
[PerformanceResourceTiming interface: attribute secureConnectionStart]
146113
expected: FAIL
147114

tests/wpt/metadata/resource-timing/resource_TAO_origin.htm.ini

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,9 @@
55
[domainLookupEnd should not be 0 in timing-allow cross-origin request.]
66
expected: FAIL
77

8-
[connectStart should not be 0 in timing-allow cross-origin request.]
9-
expected: FAIL
10-
11-
[connectEnd should not be 0 in timing-allow cross-origin request.]
12-
expected: FAIL
13-
14-
[requestStart should not be 0 in timing-allow cross-origin request.]
15-
expected: FAIL
16-
178
[responseStart should not be 0 in timing-allow cross-origin request.]
189
expected: FAIL
1910

20-
[fetchStart should not be 0 in timing-allow cross-origin request.]
21-
expected: FAIL
22-
2311
[responseEnd should not be 0 in timing-allow cross-origin request.]
2412
expected: FAIL
2513

@@ -29,3 +17,6 @@
2917
[secureConnectionStart should be 0 in cross-origin request since no ssl!]
3018
expected: FAIL
3119

20+
[The iframe should have one resource timing entry.]
21+
expected: FAIL
22+

tests/wpt/metadata/resource-timing/resource_TAO_zero.htm.ini

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
[resource_TAO_zero.htm]
2-
[fetchStart should be greater than 0 in cross-origin request.]
3-
expected: FAIL
4-
52
[responseEnd should be greater than 0 in cross-origin request.]
63
expected: FAIL
74

@@ -17,3 +14,15 @@
1714
[redirectEnd should be 0 in cross-origin request.]
1815
expected: FAIL
1916

17+
[connectEnd should be 0 in cross-origin request.]
18+
expected: FAIL
19+
20+
[connectStart should be 0 in cross-origin request.]
21+
expected: FAIL
22+
23+
[There should be one resource timing entry.]
24+
expected: FAIL
25+
26+
[requestStart should be 0 in cross-origin request.]
27+
expected: FAIL
28+

tests/wpt/metadata/resource-timing/resource_connection_reuse.html.ini

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,18 @@
22
[There should be 2 PerformanceEntries]
33
expected: FAIL
44

5+
[domainLookupEnd and fetchStart should be the same]
6+
expected: FAIL
7+
8+
[connectStart and fetchStart should be the same]
9+
expected: FAIL
10+
11+
[domainLookupStart and fetchStart should be the same]
12+
expected: FAIL
13+
14+
[secureConnectionStart should be zero]
15+
expected: FAIL
16+
17+
[connectEnd and fetchStart should be the same]
18+
expected: FAIL
19+

tests/wpt/metadata/resource-timing/resource_connection_reuse.https.html.ini

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,18 @@
22
[There should be 2 PerformanceEntries]
33
expected: FAIL
44

5+
[secureConnectionStart and fetchStart should be the same]
6+
expected: FAIL
7+
8+
[domainLookupEnd and fetchStart should be the same]
9+
expected: FAIL
10+
11+
[connectStart and fetchStart should be the same]
12+
expected: FAIL
13+
14+
[domainLookupStart and fetchStart should be the same]
15+
expected: FAIL
16+
17+
[connectEnd and fetchStart should be the same]
18+
expected: FAIL
19+

tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content.html.ini

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,18 @@
22
[There should be 2 PerformanceEntries]
33
expected: FAIL
44

5+
[secureConnectionStart and fetchStart should be the same]
6+
expected: FAIL
7+
8+
[domainLookupEnd and fetchStart should be the same]
9+
expected: FAIL
10+
11+
[connectStart and fetchStart should be the same]
12+
expected: FAIL
13+
14+
[domainLookupStart and fetchStart should be the same]
15+
expected: FAIL
16+
17+
[connectEnd and fetchStart should be the same]
18+
expected: FAIL
19+

tests/wpt/metadata/resource-timing/resource_connection_reuse_mixed_content_redirect.html.ini

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,18 @@
22
[There should be 2 PerformanceEntries]
33
expected: FAIL
44

5+
[secureConnectionStart and fetchStart should be the same]
6+
expected: FAIL
7+
8+
[domainLookupEnd and fetchStart should be the same]
9+
expected: FAIL
10+
11+
[connectStart and fetchStart should be the same]
12+
expected: FAIL
13+
14+
[domainLookupStart and fetchStart should be the same]
15+
expected: FAIL
16+
17+
[connectEnd and fetchStart should be the same]
18+
expected: FAIL
19+

tests/wpt/metadata/resource-timing/resource_dedicated_worker.html.ini

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/wpt/metadata/resource-timing/test_resource_timing.html.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
[PerformanceEntry has correct protocol attribute (iframe)]
1616
expected: FAIL
1717

18-
[window.performance.getEntriesByName() and window.performance.getEntriesByNameType() return same data (img)]
19-
expected: FAIL
20-
2118
[PerformanceEntry has correct name, initiatorType, startTime, and duration (img)]
2219
expected: FAIL
2320

0 commit comments

Comments
 (0)