11cb0ef41Sopenharmony_ci<!DOCTYPE html>
21cb0ef41Sopenharmony_ci<html>
31cb0ef41Sopenharmony_ci<head>
41cb0ef41Sopenharmony_ci<meta charset="utf-8" />
51cb0ef41Sopenharmony_ci<title>exception test of window.performance.measure</title>
61cb0ef41Sopenharmony_ci<link rel="author" title="Intel" href="http://www.intel.com/" />
71cb0ef41Sopenharmony_ci<link rel="help" href="http://www.w3.org/TR/user-timing/#extensions-performance-interface"/>
81cb0ef41Sopenharmony_ci<script src="/resources/testharness.js"></script>
91cb0ef41Sopenharmony_ci<script src="/resources/testharnessreport.js"></script>
101cb0ef41Sopenharmony_ci<script src="/common/performance-timeline-utils.js"></script>
111cb0ef41Sopenharmony_ci<script src="resources/webperftestharness.js"></script>
121cb0ef41Sopenharmony_ci<script src="resources/webperftestharnessextension.js"></script>
131cb0ef41Sopenharmony_ci</head>
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ci<body>
161cb0ef41Sopenharmony_ci<h1>Description</h1>
171cb0ef41Sopenharmony_ci<p>This test validates all exception scenarios of method window.performance.measure in User Timing API</p>
181cb0ef41Sopenharmony_ci
191cb0ef41Sopenharmony_ci<div id="log"></div>
201cb0ef41Sopenharmony_ci<script>
211cb0ef41Sopenharmony_ciperformance.mark('ExistMark');
221cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure()', TypeError);
231cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure("Exception1", "NonExistMark1")', 'SYNTAX_ERR');
241cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure("Exception2", "NonExistMark1", "navigationStart")', 'SYNTAX_ERR');
251cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure("Exception3", "navigationStart", "NonExistMark1")', 'SYNTAX_ERR');
261cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure("Exception4", "NonExistMark1", "ExistMark")', 'SYNTAX_ERR');
271cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure("Exception5", "ExistMark", "NonExistMark1")', 'SYNTAX_ERR');
281cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure("Exception6", "NonExistMark1", "NonExistMark2")', 'SYNTAX_ERR');
291cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure("Exception7", "redirectStart")', 'INVALID_ACCESS_ERR');
301cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure("Exception8", {"detail": "non-empty"})', TypeError);
311cb0ef41Sopenharmony_citest_method_throw_exception('performance.measure("Exception9", {"start": 1, "duration": 2, "end": 3})', TypeError);
321cb0ef41Sopenharmony_ci</script>
331cb0ef41Sopenharmony_ci</body>
341cb0ef41Sopenharmony_ci</html>
35