Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / loader / url-parse-1.html
blob486d9f42081f03ccf10bafd27e69bbeaaa8236c1
1 <head>
2 <base href="file:///BASE/">
3 <style>
5 table { border-spacing: 0; border-collapse: collapse; border: 1px solid #999; }
6 thead { font: x-small 'Lucida Grande'; }
7 thead > tr { background-color: #dee; border-bottom: 1px solid #999; }
8 td, th { padding: 4px; border-width: 0 1px; border-style: solid; border-color: #999 }
9 tbody { font: small monospace; }
10 tbody > tr:nth-child(odd) { background-color: #eee; }
11 </style>
12 </head>
13 <body>
14 <p>
15 The following table shows how URLs are parsed and canonicalized. The base URI
16 for this document is <tt>file:///BASE/</tt>.
17 </p>
18 <table>
19 <thead>
20 <tr>
21 <th>URL</th>
22 <th>href</th>
23 <th>host</th>
24 <th>pathname</th>
25 </tr>
26 </thead>
27 <tbody id = "results"></tbody>
28 </table>
29 <script>
30 if (window.testRunner)
31 testRunner.dumpAsText();
33 function test(url)
35 var anchor = document.createElement("a");
36 anchor.href = url;
38 var row = document.getElementById("results").appendChild(document.createElement("tr"));
39 row.appendChild(document.createElement("td")).appendChild(anchor).appendChild(document.createTextNode(url));
40 row.appendChild(document.createElement("td")).appendChild(document.createTextNode(anchor.href));
41 row.appendChild(document.createElement("td")).appendChild(document.createTextNode(anchor.host));
42 row.appendChild(document.createElement("td")).appendChild(document.createTextNode(anchor.pathname));
45 var testCases = [
46 "",
47 "test",
48 "/",
49 "/test",
50 "//",
51 "//test",
52 "///",
53 "///test",
54 "file:",
55 "file:test",
56 "file:/",
57 "file:/test",
58 "file://",
59 "file://test",
60 "file:///",
61 "file:///test",
62 "file://localhost",
63 "file://localhost/",
64 "file://localhost/test",
65 "http:",
66 "http:/",
67 "http://",
68 "http:///",
69 "http:////",
70 "http://localhost",
71 "http://localhost/",
72 "http://localhost/test",
73 "x-webkit:",
74 "x-webkit:test",
75 "x-webkit:/",
76 "x-webkit:/test",
77 "x-webkit://",
78 "x-webkit://test",
79 "x-webkit:///",
80 "x-webkit:///test",
83 for (var i = 0; i < testCases.length; ++i)
84 test(testCases[i]);
85 </script>
86 </body>