-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test to address w3c/performance-timeline#57
- Loading branch information
1 parent
14942a7
commit f287d53
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |