| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset="UTF-8" /> | 4 <meta charset="UTF-8" /> |
| 5 <title>window.performance User Timing measure() method is working proper
ly</title> | 5 <title>window.performance User Timing measure() method is working proper
ly</title> |
| 6 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> | 6 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> |
| 7 <link rel="help" href="http://www.w3.org/TR/user-timing/#dom-performance
-measure"/> | 7 <link rel="help" href="http://www.w3.org/TR/user-timing/#dom-performance
-measure"/> |
| 8 <script src="/resources/testharness.js"></script> | 8 <script src="/resources/testharness.js"></script> |
| 9 <script src="/resources/testharnessreport.js"></script> | 9 <script src="/resources/testharnessreport.js"></script> |
| 10 <script src="resources/webperftestharness.js"></script> | 10 <script src="resources/webperftestharness.js"></script> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 ]; | 69 ]; |
| 70 | 70 |
| 71 setup({explicit_done: true}); | 71 setup({explicit_done: true}); |
| 72 | 72 |
| 73 test_namespace(); | 73 test_namespace(); |
| 74 | 74 |
| 75 function onload_test() | 75 function onload_test() |
| 76 { | 76 { |
| 77 // test for existance of User Timing and Performance Timeline interf
ace | 77 // test for existance of User Timing and Performance Timeline interf
ace |
| 78 if (window.performance.mark == undefined || | 78 if (!has_required_interfaces()) |
| 79 window.performance.clearMarks == undefined || | |
| 80 window.performance.measure == undefined || | |
| 81 window.performance.clearMeasures == undefined || | |
| 82 window.performance.getEntriesByName == undefined || | |
| 83 window.performance.getEntriesByType == undefined || | |
| 84 window.performance.getEntries == undefined) | |
| 85 { | 79 { |
| 86 test_true(false, | 80 test_true(false, |
| 87 "The User Timing and Performance Timeline interfaces,
which are required for this test, " + | 81 "The User Timing and Performance Timeline interfaces,
which are required for this test, " + |
| 88 "are defined."); | 82 "are defined."); |
| 89 | 83 |
| 90 done(); | 84 done(); |
| 91 } | 85 } |
| 92 else | 86 else |
| 93 { | 87 { |
| 94 // create the start mark for the test measures | 88 // create the start mark for the test measures |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 <li>"measure_no_start_no_end": duplicate of the first measure, u
sed to confirm names can be re-used</li> | 319 <li>"measure_no_start_no_end": duplicate of the first measure, u
sed to confirm names can be re-used</li> |
| 326 </ul> | 320 </ul> |
| 327 After creating each measure, the existence of these measures is valid
ated by calling | 321 After creating each measure, the existence of these measures is valid
ated by calling |
| 328 performance.getEntriesByName() (both with and without the entryType p
arameter provided), | 322 performance.getEntriesByName() (both with and without the entryType p
arameter provided), |
| 329 performance.getEntriesByType(), and performance.getEntries() | 323 performance.getEntriesByType(), and performance.getEntries() |
| 330 </p> | 324 </p> |
| 331 | 325 |
| 332 <div id="log"></div> | 326 <div id="log"></div> |
| 333 </body> | 327 </body> |
| 334 </html> | 328 </html> |
| OLD | NEW |