mirror of
https://github.com/servo/servo.git
synced 2025-08-28 00:28:20 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -1 +1 @@
|
|||
Server-Timing: metric2=3.4;blue.png
|
||||
Server-Timing: metric2=2.1;blue.png
|
||||
|
|
|
@ -1 +1 @@
|
|||
Server-Timing: metric3=5.6;green.png
|
||||
Server-Timing: metric3=3.1;green.png
|
||||
|
|
|
@ -9,36 +9,32 @@
|
|||
setup({explicit_done: true})
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
// there should be exactly two server-timing entries, 1 for document, 1 for img#one
|
||||
test_entries(performance.getEntriesByType('server'), [{
|
||||
name: document.location.href,
|
||||
entryType: 'server',
|
||||
startTime: 0,
|
||||
duration: 1.2,
|
||||
metric: 'metric1',
|
||||
// there should be exactly three server-timing entries, 2 for document, 1 for img#one
|
||||
test_entries(performance.getEntriesByType('navigation')[0].serverTiming, [{
|
||||
duration: 1.1,
|
||||
name: 'metric1',
|
||||
description: 'document',
|
||||
}, {
|
||||
name: document.querySelector('img#one').src,
|
||||
entryType: 'server',
|
||||
startTime: 0,
|
||||
duration: 3.4,
|
||||
metric: 'metric2',
|
||||
duration: 1.2,
|
||||
name: 'metric1',
|
||||
description: 'document',
|
||||
}])
|
||||
test_entries(performance.getEntriesByName(document.querySelector('img#one').src)[0].serverTiming, [{
|
||||
duration: 2.1,
|
||||
name: 'metric2',
|
||||
description: 'blue.png',
|
||||
}])
|
||||
|
||||
new PerformanceObserver(function(entryList, observer) {
|
||||
// there should be exactly one server-timing entry, 1 for img#two
|
||||
test_entries(entryList.getEntriesByType('server'), [{
|
||||
name: document.querySelector('img#two').src,
|
||||
entryType: 'server',
|
||||
startTime: 0,
|
||||
duration: 5.6,
|
||||
metric: 'metric3',
|
||||
test_entries(entryList.getEntriesByName(document.querySelector('img#two').src)[0].serverTiming, [{
|
||||
duration: 3.1,
|
||||
name: 'metric3',
|
||||
description: 'green.png',
|
||||
}])
|
||||
observer.disconnect()
|
||||
done()
|
||||
}).observe({entryTypes: ['server']})
|
||||
}).observe({entryTypes: ['resource']})
|
||||
|
||||
var img = document.createElement('img')
|
||||
img.id = 'two'
|
||||
|
|
|
@ -1 +1 @@
|
|||
Server-Timing: metric1=1.2;document
|
||||
Server-Timing: metric1=1.1;document, metric1=1.2;document
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue