Description

This test validates all exception scenarios of method window.performance.measure in User Timing API

Summary

Harness status: OK

Found 10 tests

Details

ResultTest NameMessage
PassInvocation of performance.measure() should throw TypeError Exception.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function() {eval(func_str)}", "Invocation of performance.measure() should throw TypeError Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)
PassInvocation of performance.measure("Exception1", "NonExistMark1") should throw SYNTAX_ERR Exception.
Asserts run
Pass
assert_throws_dom("SYNTAX_ERR", function "function() {eval(func_str)}", "Invocation of performance.measure(\"Exception1\", \"NonExistMark1\") should throw SYNTAX_ERR Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)
PassInvocation of performance.measure("Exception2", "NonExistMark1", "navigationStart") should throw SYNTAX_ERR Exception.
Asserts run
Pass
assert_throws_dom("SYNTAX_ERR", function "function() {eval(func_str)}", "Invocation of performance.measure(\"Exception2\", \"NonExistMark1\", \"navigationStart\") should throw SYNTAX_ERR Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)
PassInvocation of performance.measure("Exception3", "navigationStart", "NonExistMark1") should throw SYNTAX_ERR Exception.
Asserts run
Pass
assert_throws_dom("SYNTAX_ERR", function "function() {eval(func_str)}", "Invocation of performance.measure(\"Exception3\", \"navigationStart\", \"NonExistMark1\") should throw SYNTAX_ERR Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)
PassInvocation of performance.measure("Exception4", "NonExistMark1", "ExistMark") should throw SYNTAX_ERR Exception.
Asserts run
Pass
assert_throws_dom("SYNTAX_ERR", function "function() {eval(func_str)}", "Invocation of performance.measure(\"Exception4\", \"NonExistMark1\", \"ExistMark\") should throw SYNTAX_ERR Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)
PassInvocation of performance.measure("Exception5", "ExistMark", "NonExistMark1") should throw SYNTAX_ERR Exception.
Asserts run
Pass
assert_throws_dom("SYNTAX_ERR", function "function() {eval(func_str)}", "Invocation of performance.measure(\"Exception5\", \"ExistMark\", \"NonExistMark1\") should throw SYNTAX_ERR Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)
PassInvocation of performance.measure("Exception6", "NonExistMark1", "NonExistMark2") should throw SYNTAX_ERR Exception.
Asserts run
Pass
assert_throws_dom("SYNTAX_ERR", function "function() {eval(func_str)}", "Invocation of performance.measure(\"Exception6\", \"NonExistMark1\", \"NonExistMark2\") should throw SYNTAX_ERR Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)
PassInvocation of performance.measure("Exception7", "redirectStart") should throw INVALID_ACCESS_ERR Exception.
Asserts run
Pass
assert_throws_dom("INVALID_ACCESS_ERR", function "function() {eval(func_str)}", "Invocation of performance.measure(\"Exception7\", \"redirectStart\") should throw INVALID_ACCESS_ERR Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)
PassInvocation of performance.measure("Exception8", {"detail": "non-empty"}) should throw TypeError Exception.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function() {eval(func_str)}", "Invocation of performance.measure(\"Exception8\", {\"detail\": \"non-empty\"}) should throw TypeError Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)
PassInvocation of performance.measure("Exception9", {"start": 1, "duration": 2, "end": 3}) should throw TypeError Exception.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function() {eval(func_str)}", "Invocation of performance.measure(\"Exception9\", {\"start\": 1, \"duration\": 2, \"end\": 3}) should throw TypeError Exception.")
    at Test.<anonymous> ( /user-timing/resources/webperftestharnessextension.js:39:26)