| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <meta charset=utf-8> |
| 3 <title>PerformanceTimeline: case sensitivity</title> |
| 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <h1>PerformanceTimeline: case sensitivity</h1> |
| 7 <div id="log"></div> |
| 8 <script> |
| 9 test(function () { |
| 10 assert_equals(typeof window.performance, "object"); |
| 11 assert_equals(typeof window.performance.getEntriesByType, "function"); |
| 12 var lowerList = window.performance.getEntriesByType("resource"); |
| 13 var upperList = window.performance.getEntriesByType("RESOURCE"); |
| 14 var mixedList = window.performance.getEntriesByType("ReSoUrCe"); |
| 15 |
| 16 assert_not_equals(lowerList.length, 0, "Resource entries exist"); |
| 17 assert_equals(upperList.length, 0, "getEntriesByType('RESOURCE').length"); |
| 18 assert_equals(mixedList.length, 0, "getEntriesByType('ReSoUrCe').length"); |
| 19 |
| 20 }, "getEntriesByType values are case sensitive"); |
| 21 |
| 22 test(function () { |
| 23 assert_equals(typeof window.performance, "object"); |
| 24 assert_equals(typeof window.performance.getEntriesByName, "function"); |
| 25 var origin = window.location.protocol + "//" + window.location.host; |
| 26 var location1 = origin + "/RESOURCES/testharness.js"; |
| 27 var location2 = window.location.protocol + "//" |
| 28 + window.location.host + "/RESourCES/testharness.js"; |
| 29 var lowerList = window.performance.getEntriesByName(origin + "/resources/tes
tharness.js"); |
| 30 var upperList = window.performance.getEntriesByName(location1); |
| 31 var mixedList = window.performance.getEntriesByName(location2); |
| 32 |
| 33 assert_equals(lowerList.length, 1, "Resource entry exist"); |
| 34 assert_equals(upperList.length, 0, "getEntriesByName('" + location1 + "').le
ngth"); |
| 35 assert_equals(mixedList.length, 0, "getEntriesByName('" + location2 + "').le
ngth"); |
| 36 |
| 37 }, "getEntriesByName values are case sensitive"); |
| 38 |
| 39 </script> |
| OLD | NEW |