Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / url / host-lowercase-per-scheme.html
blobefb218bffcc2fe0487df949b7ef384d097e1a42a
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <script src="../../resources/js-test.js"></script>
6 <script src="resources/utilities.js"></script>
7 </head>
8 <body>
10 <script>
11 description("Canonical URL should have a lowercase hostname for server based protocols.")
13 var protocolTestSet = [
14 ['ws', true],
15 ['wss', true],
16 ['ftp', true],
17 ['wss', true],
18 ['http', true],
19 ['file', true],
20 ['https', true],
21 ['ghost', false]];
23 var urls = ['lowercase', 'CamelCase', 'UnicodeFĂȘte'];
24 var urlExpectationsLowercase = ['lowercase', 'camelcase', 'xn--unicodefte-t7a'];
25 var urlExpectationsUppercase = ['lowercase', 'CamelCase', 'UnicodeF%C3%AAte'];
28 for (var protocolIndex = 0; protocolIndex < protocolTestSet.length; ++protocolIndex) {
29 var protocol = protocolTestSet[protocolIndex][0];
30 var hostnameShouldBeLowercase = protocolTestSet[protocolIndex][1];
32 for (var urlIndex = 0; urlIndex < urls.length; ++urlIndex) {
33 var url = protocol + '://' + urls[urlIndex] + '/';
34 src = canonicalize(url);
36 if (hostnameShouldBeLowercase)
37 expected = protocol + '://' + urlExpectationsLowercase[urlIndex] + '/';
38 else
39 expected = protocol + '://' + urlExpectationsUppercase[urlIndex] + '/';
41 shouldBe('src', 'expected');
45 successfullyParsed = true;
46 </script>
47 </body>
48 </html>