Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xmlhttprequest / xmlhttprequest-get.xhtml
blob22adaba47808f2bf73be987f16f5e9d39660bb87
1 <?xml version="1.0"?>
2 <!--
3 - The contents of this file are subject to the Mozilla Public
4 - License Version 1.1 (the "License"); you may not use this file
5 - except in compliance with the License. You may obtain a copy of
6 - the License at http://www.mozilla.org/MPL/
7 -
8 - Software distributed under the License is distributed on an "AS
9 - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10 - implied. See the License for the specific language governing
11 - rights and limitations under the License.
13 - The Original Code is Mozilla Test Cases.
15 - The Initial Developer of the Original Code is Netscape Communications
16 - Corp. Portions created by Netscape Communications Corp. are
17 - Copyright (C) 2001 Netscape Communications Corp. All
18 - Rights Reserved.
20 - Contributor(s):
21 -->
22 <html xmlns="http://www.w3.org/1999/xhtml">
23 <head>
24 <title>GET test</title>
25 <style type="text/css">
26 .box {
27 display: box;
28 border: 1px solid black;
29 margin-bottom: 0.5em;
31 .boxheader {
32 font-weight: bold;
33 color: maroon;
35 pre {
36 margin-left: 2em;
38 </style>
39 <script type="text/javascript">
40 var p = new XMLHttpRequest();
42 if (window.testRunner) {
43 testRunner.dumpAsText();
44 testRunner.waitUntilDone();
47 // Some properties do not have stable/guaranteed values;
48 // emit default values for these.
49 var propertiesWithDefaultValues = {loaded: 0, total: 0, position: 0, totalSize: 0};
51 function myfunc(e)
53 document.getElementById("id1").firstChild.nodeValue = p.responseText;
54 if (p.responseXML) {
55 var s = new XMLSerializer();
56 var d = p.responseXML;
57 var str = s.serializeToString(d);
58 document.getElementById("id2").firstChild.nodeValue = str;
60 document.getElementById("id3").firstChild.nodeValue = p.getAllResponseHeaders();
61 document.getElementById("id4").firstChild.nodeValue = p.status;
62 document.getElementById("id5").firstChild.nodeValue = p.statusText;
63 document.getElementById("id6").firstChild.nodeValue = p.readyState;
64 var propNames = new Array;
65 for (prop in e) {
66 if (prop != "timeStamp") {
67 propNames.push(prop);
70 propNames.sort();
71 var eventProperties = "";
72 for (i in propNames) {
73 var prop = propNames[i];
74 var value = (prop in propertiesWithDefaultValues) ? propertiesWithDefaultValues[prop] : e[prop];
75 eventProperties += prop + " : '" + value + "'\n";
78 document.getElementById("id7").firstChild.nodeValue =
79 "Event object: " + e + "\n" +
80 "Event properties:\n" + eventProperties;
82 if (window.testRunner)
83 testRunner.notifyDone();
86 p.onload = myfunc;
87 p.open("GET", "resources/xmlhttprequest-get-data.xml");
89 function mysend()
91 p.send(null);
93 </script>
94 </head>
95 <body onload="mysend();">
96 <h1>GET test</h1>
98 <div class="box"><span class="boxheader">responseText</span>
99 <pre id="id1">@@No result@@</pre>
100 </div>
101 <div class="box"><span class="boxheader">responseXML serialized</span>
102 <pre id="id2">@@No result@@</pre>
103 </div>
104 <div class="box"><span class="boxheader">getAllResponseHeaders()</span>
105 <pre id="id3">@@No result@@</pre>
106 </div>
107 <div class="box"><span class="boxheader">status</span>
108 <pre id="id4">@@No result@@</pre>
109 </div>
110 <div class="box"><span class="boxheader">statusText</span>
111 <pre id="id5">@@No result@@</pre>
112 </div>
113 <div class="box"><span class="boxheader">readyState</span>
114 <pre id="id6">@@No result@@</pre>
115 </div>
116 <div class="box"><span class="boxheader">Event information</span>
117 <pre id="id7">@@No result@@</pre>
118 </div>
120 </body>
121 </html>