Update text-content-type-with-binary-extension.html to use a .sitx file of random...
[WebKit-https.git] / LayoutTests / http / tests / loading / text-content-type-with-binary-extension.html
1 <head>
2     <script>
3         var failed = false;
4
5         if (window.layoutTestController) {
6             layoutTestController.dumpAsText();
7             layoutTestController.waitUntilDone();
8         }
9
10         function iframeNotLoaded()
11         {
12             if (failed)
13                 return;
14
15             if (window.layoutTestController) {
16                 document.getElementById("result").innerText = "Binary data not loaded as text. Maybe PASS.";
17                 layoutTestController.notifyDone();
18             } else
19                 document.getElementById("result").innerText = "If Safari downloaded binaryData.sitx, then it passed the test.";
20         }
21
22         function bodyLoaded()
23         {
24             if (!failed)
25                 timeout = setTimeout(iframeNotLoaded, 500);
26         }
27
28         function iframeLoaded()
29         {
30             document.getElementById("result").innerText = "FAIL";
31             failed = true;
32             if (window.layoutTestController)
33                 layoutTestController.notifyDone();
34         }
35     </script>
36 </head>
37 <body onload="bodyLoaded()">
38     <p>
39         Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=17360">https://bugs.webkit.org/show_bug.cgi?id=17360</a>
40         REGRESSION: mp4 file downloaded from server is downloaded as html</i>.
41     </p>
42     <p id="result">
43         Test running...
44     </p>
45     <iframe id="iframe" src="resources/binaryData.sitx" onload="iframeLoaded()"></iframe>
46 </body>