Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(945)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/server-timing/test_server_timing.html

Issue 2962113002: Updates to Server-Timing in accordance with with spec changes (Closed)
Patch Set: fix web-platform-tests Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/server-timing/test_server_timing.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/server-timing/test_server_timing.html b/third_party/WebKit/LayoutTests/external/wpt/server-timing/test_server_timing.html
index 2a6ffa264999e9b9b151c4f133e55739f688dc93..43164d69221cadb40f067bbea8dccbd52d9b3931 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/server-timing/test_server_timing.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/server-timing/test_server_timing.html
@@ -10,35 +10,27 @@
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,
+ test_entries(performance.getEntriesByType('navigation')[0].serverTiming, [{
+ value: 1.2,
metric: 'metric1',
description: 'document',
- }, {
- name: document.querySelector('img#one').src,
- entryType: 'server',
- startTime: 0,
- duration: 3.4,
+ }])
+ test_entries(performance.getEntriesByName(document.querySelector('img#one').src)[0].serverTiming, [{
+ value: 3.4,
metric: '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,
+ test_entries(entryList.getEntriesByName(document.querySelector('img#two').src)[0].serverTiming, [{
+ value: 5.6,
metric: 'metric3',
description: 'green.png',
}])
observer.disconnect()
done()
- }).observe({entryTypes: ['server']})
+ }).observe({entryTypes: ['resource']})
var img = document.createElement('img')
img.id = 'two'

Powered by Google App Engine
This is Rietveld 408576698