This tests that 'performance.measure' throws exceptions with reasonable messages.

Summary

Harness status: OK

Found 13 tests

Details

ResultTest NameMessage
PassPassing 'unloadEventStart' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 'unloadEventEnd' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 'redirectStart' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 'redirectEnd' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
FailPassing 'secureConnectionStart' as a mark to measure API should cause error when the mark is empty.assert_throws_dom: Should throw function "()=>{ window.performance.measure("measuring", name, "mark"); }" did not throw
    at Test.<anonymous> (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/user-timing/measure-exceptions.html:30:13)
    at Test.step (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:2642:25)
    at test (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:633:30)
    at https://xn--n8j6ds53lwwkrqhv28a.wpt.live/user-timing/measure-exceptions.html:29:9
Asserts run
Fail
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 'domInteractive' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 'domContentLoadedEventStart' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 'domContentLoadedEventEnd' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 'domComplete' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 'loadEventStart' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 'loadEventEnd' as a mark to measure API should cause error when the mark is empty.
Asserts run
Pass
assert_throws_dom("InvalidAccessError", function "()=>{                 window.performance.measure("measuring", name, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:30:13)
PassPassing 51.15 as a mark to measure API should cause error.
Asserts run
Pass
assert_throws_dom("SyntaxError", function "()=>{                 window.performance.measure("measuring", each, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:42:13)
PassPassing DoesNotExist as a mark to measure API should cause error.
Asserts run
Pass
assert_throws_dom("SyntaxError", function "()=>{                 window.performance.measure("measuring", each, "mark");             }", "Should throw")
    at Test.<anonymous> ( /user-timing/measure-exceptions.html:42:13)