Home | History | Annotate | Download | only in data
      1 <html>
      2   <head>
      3     <meta http-equiv="x-ua-compatible" content="chrome=1" />
      4     <title>ChromeFrame keyevent test</title>
      5     <script type="text/javascript"
      6         src="chrome_frame_tester_helpers.js"></script>
      7 
      8     <script type="text/javascript">
      9       function ValidateUserAgent() {
     10         if (isRunningInMSIE()) {
     11           onFailure("FullTab_XMLHttpRequestTest", 1, "Failed");
     12         }
     13 
     14         SendXHRRequest();
     15       }
     16 
     17       function SendXHRRequest() {
     18         var xhr = getXHRObject();
     19         if (!xhr) {
     20           onFailure("FullTab_XMLHttpRequestTest", 1,
     21                     "Failed to get XHR object");
     22         }
     23 
     24         var url = GetBaseUrlPath() + "echoheader?User-Agent";
     25         xhr.open("GET", url, false);
     26         try {
     27           xhr.send(null);
     28           var pos = xhr.responseText.indexOf("chromeframe");
     29           if (pos >= 0) {
     30             appendStatus("Received user agent: " + xhr.responseText);
     31             onSuccess("FullTab_XMLHttpRequestTest", 1);
     32           } else {
     33             onFailure("FullTab_XMLHttpRequestTest", 1,
     34                       "Failed to find chromeframe in user agent.");
     35           }
     36         } catch (e) {
     37           appendStatus("XHR send failed. Error: " + e.description);
     38           onFailure("FullTab_XMLHttpRequestTest", 1,
     39                     "Failed to send XHR request");
     40         }
     41       }
     42     </script>
     43   </head>
     44 
     45   <body onLoad="setTimeout(ValidateUserAgent, 100);">
     46     ChromeFrame full tab mode XMLHttpRequest test. Verifies that
     47     XMLHttpRequests use the host network stack.
     48   </body>
     49 </html>
     50