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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« 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