Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/misc/get-entries-case-sensitivities.html

Issue 2393633002: Add test for getEntriesByType and getEntriesByName. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/misc/get-entries-case-sensitivities.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/get-entries-case-sensitivities.html b/third_party/WebKit/LayoutTests/http/tests/misc/get-entries-case-sensitivities.html
new file mode 100644
index 0000000000000000000000000000000000000000..de43cb4e13e4c7d92087472a0a86a66417b4107e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/misc/get-entries-case-sensitivities.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 + "/RESOURCES/testharness.js";
+ var location2 = window.location.protocol + "//"
+ + window.location.host + "/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>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698