summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/performance-timeline/case-sensitivity.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/performance-timeline/case-sensitivity.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/performance-timeline/case-sensitivity.html')
-rw-r--r--testing/web-platform/tests/performance-timeline/case-sensitivity.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/web-platform/tests/performance-timeline/case-sensitivity.html b/testing/web-platform/tests/performance-timeline/case-sensitivity.html
new file mode 100644
index 000000000..99ef66cce
--- /dev/null
+++ b/testing/web-platform/tests/performance-timeline/case-sensitivity.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML>
+<meta charset=utf-8>
+<title>PerformanceTimeline: case sensitivity</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<h1>PerformanceTimeline: case sensitivity</h1>
+<div id="log"></div>
+<script>
+ test(function () {
+ assert_equals(typeof window.performance, "object");
+ assert_equals(typeof window.performance.getEntriesByType, "function");
+ var lowerList = window.performance.getEntriesByType("resource");
+ var upperList = window.performance.getEntriesByType("RESOURCE");
+ var mixedList = window.performance.getEntriesByType("ReSoUrCe");
+
+ assert_not_equals(lowerList.length, 0, "Resource entries exist");
+ assert_equals(upperList.length, 0, "getEntriesByType('RESOURCE').length");
+ assert_equals(mixedList.length, 0, "getEntriesByType('ReSoUrCe').length");
+
+ }, "getEntriesByType values are case sensitive");
+
+ test(function () {
+ assert_equals(typeof window.performance, "object");
+ assert_equals(typeof window.performance.getEntriesByName, "function");
+ var origin = window.location.protocol + "//" + window.location.host;
+ var location1 = origin.toUpperCase() + "/resources/testharness.js";
+ var location2 = window.location.protocol + "//"
+ + window.location.host.toUpperCase() + "/resources/testharness.js";
+ var lowerList = window.performance.getEntriesByName(origin + "/resources/testharness.js");
+ var upperList = window.performance.getEntriesByName(location1);
+ var mixedList = window.performance.getEntriesByName(location2);
+
+ assert_equals(lowerList.length, 1, "Resource entry exist");
+ assert_equals(upperList.length, 0, "getEntriesByName('" + location1 + "').length");
+ assert_equals(mixedList.length, 0, "getEntriesByName('" + location2 + "').length");
+
+ }, "getEntriesByName values are case sensitive");
+
+</script>