Bug 1457551 [wpt PR 10693] - Assert serverTiming lives on PerformanceNavigationTiming and PerformanceResourceTiming, a=testonly
authorYoav Weiss <yoav@yoav.ws>
Tue, 01 May 2018 16:10:27 +0000
changeset 472708 7a1b578f9e6000a6af96e257dca8c51962a9f330
parent 472707 adc661b15d27f2b6a873c9558fbca06e22c3ea70
child 472709 a3056cec6cf4e6e902174f828f70ecd3f3a7f91f
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1457551, 10693
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1457551 [wpt PR 10693] - Assert serverTiming lives on PerformanceNavigationTiming and PerformanceResourceTiming, a=testonly Automatic update from web-platform-testsMerge pull request #10693 from cvazac/cvazac/idl-tests Assert serverTiming lives on PerformanceNavigationTiming and PerformanceResourceTiming -- wpt-commits: 06179b0154b0678d691c82adee9a9e97a702c73d wpt-pr: 10693
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/server-timing/navigation_timing_idl.html
testing/web-platform/tests/server-timing/resource_timing_idl.html
testing/web-platform/tests/server-timing/server_timing_header-parsing.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -364378,16 +364378,28 @@
     ]
    ],
    "server-timing/cross_origin.html": [
     [
      "/server-timing/cross_origin.html",
      {}
     ]
    ],
+   "server-timing/navigation_timing_idl.html": [
+    [
+     "/server-timing/navigation_timing_idl.html",
+     {}
+    ]
+   ],
+   "server-timing/resource_timing_idl.html": [
+    [
+     "/server-timing/resource_timing_idl.html",
+     {}
+    ]
+   ],
    "server-timing/server_timing_header-parsing.html": [
     [
      "/server-timing/server_timing_header-parsing.html",
      {}
     ]
    ],
    "server-timing/test_server_timing.html": [
     [
@@ -599229,16 +599241,24 @@
   "selection/type.html": [
    "01ae6e757d428800555012783e290ebba575bcab",
    "testharness"
   ],
   "server-timing/cross_origin.html": [
    "661cf7f329590a89aa2644a102a10d1ba34feb75",
    "testharness"
   ],
+  "server-timing/navigation_timing_idl.html": [
+   "191f42a92f0ac135de816275920e54fa50065b15",
+   "testharness"
+  ],
+  "server-timing/resource_timing_idl.html": [
+   "eba493537f5d156b4fb074e24787e522ea3c7971",
+   "testharness"
+  ],
   "server-timing/resources/blue.png": [
    "7de5cdb5ad04ac365430b3b5f5ba01d2ba57ea23",
    "support"
   ],
   "server-timing/resources/blue.png.sub.headers": [
    "549289fb534722e17eea4477638e8da59e043c13",
    "support"
   ],
@@ -599918,17 +599938,17 @@
    "5660bb21eb42f322a58f80c6c001d14c6e0fc0c9",
    "support"
   ],
   "server-timing/resources/parsing/9.js.sub.headers": [
    "6a8feff546c8564268b238e01a0470588b4739e7",
    "support"
   ],
   "server-timing/server_timing_header-parsing.html": [
-   "bde9c39ce610bd7178800f92f3181bef3cd55918",
+   "10f756bbf749b7ad8f7c6eb4efe752ee79c44b4a",
    "testharness"
   ],
   "server-timing/test_server_timing.html": [
    "7c778ca856e5cff0bbc785f59c9ccf1ec86456fb",
    "testharness"
   ],
   "server-timing/test_server_timing.html.sub.headers": [
    "77000d65537ef522a3471002118a120d2faf296a",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/server-timing/navigation_timing_idl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<head>
+    <meta charset='utf-8' />
+    <script src="/resources/testharness.js"></script>
+    <script src='/resources/testharnessreport.js'></script>
+    <script>
+      setup({explicit_done: true})
+      window.addEventListener('load', function(){
+        assert_not_equals(typeof performance.getEntriesByType('navigation')[0].serverTiming, 'undefined',
+          'An instance of `PerformanceNavigationTiming` should have a `serverTiming` attribute.')
+        done()
+      })
+    </script>
+</head>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/server-timing/resource_timing_idl.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<head>
+    <meta charset='utf-8' />
+    <script src="/resources/testharness.js"></script>
+    <script src='/resources/testharnessreport.js'></script>
+    <script>
+      setup({explicit_done: true})
+      window.addEventListener('load', function(){
+        assert_not_equals(typeof performance.getEntriesByType('resource')[0].serverTiming, 'undefined',
+          'An instance of `PerformanceResourceTiming` should have a `serverTiming` attribute.')
+        done()
+      })
+    </script>
+</head>
--- a/testing/web-platform/tests/server-timing/server_timing_header-parsing.html
+++ b/testing/web-platform/tests/server-timing/server_timing_header-parsing.html
@@ -14,17 +14,16 @@ tests generated by:
       const tests = []
       const urlToIndex = {}
       function testServerTiming(script, expectedResults) {
         const url = script.src
         tests[urlToIndex[url]] = {url, expectedResults}
       }
       function runTests() {
         tests.forEach(function({url, expectedResults}) {
-          debugger;
           const {serverTiming} = performance.getEntriesByName(url)[0]
           const fileName = url.substring(url.lastIndexOf('/') + 1)
 
           test_equals(serverTiming.length, expectedResults.length, `${fileName} - count (${serverTiming.length} ?== ${expectedResults.length})`)
 
           expectedResults.forEach(function(expectedResult, i) {
             const dur = expectedResult.dur || 0
             const desc = expectedResult.desc || ''