page_with_css_and_js_unmht.mht 2.53 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
From: <Saved by UnMHT>
Subject: =?iso-2022-jp?B??=
Date: Wed, May 18 2011 15:21:05 GMT-0700
MIME-Version: 1.0
Content-Type: multipart/related;
	boundary="----=_NextPart_000_0000_C2ECC76E.5EC79255";
	type="text/html"

------=_NextPart_000_0000_C2ECC76E.5EC79255
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://localhost/page_with_css_and_js.html

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3Diso-8859-1">


  <link type=3D"text/css" rel=3D"stylesheet" href=3D"resources/hide_image.c=
ss"></link>
  =20
  <script src=3D"resources/remove_image_script.js" type=3D"text/javascript"=
></script>
  <script>
24 25 26
    if (window.testRunner) {
      testRunner.dumpAsText();
      testRunner.waitUntilDone();
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
    }
  </script>
<base href=3D"http://localhost/"></base></head><body onload=3D"onLoad()">
This page tests that CSS and JavaScript resources are retrieved correctly=
 for MHTML files.<br><br>
There should be only one red square below:
<div id=3D"firstDiv">
<img src=3D"resources/red_square.png"><br><br>
</div>
<div id=3D"secondDiv">
The red square below should be hidden by way of CSS.<br>
<img src=3D"resources/red_square.png"><br><br>
</div>
<div id=3D"thirdDiv">
The red square below should be hidden by way of JavaScript.<br>
<img src=3D"resources/red_square.png"><br><br>
</div>

 =20
</body></html>
------=_NextPart_000_0000_C2ECC76E.5EC79255
Content-Type: text/css
Content-Transfer-Encoding: quoted-printable
Content-Location: http://localhost/resources/hide_image.css

#secondDiv { display: none; }

------=_NextPart_000_0000_C2ECC76E.5EC79255
Content-Type: text/javascript
Content-Transfer-Encoding: quoted-printable
Content-Location: http://localhost/resources/remove_image_script.js

function onLoad() {
    divToRemove =3D document.getElementById("thirdDiv");
    divToRemove.parentNode.removeChild(divToRemove);
62 63
    if (window.testRunner)
      testRunner.notifyDone();
64 65 66 67 68 69 70 71 72 73 74 75
}
------=_NextPart_000_0000_C2ECC76E.5EC79255
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: http://localhost/resources/red_square.png

iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAACESURBVEhL7ZYxDoAwCEXB2LGTo46ewXj/zXgV
PQKgexP/Ai6l889/6Stp4HtZjYKOiRCpEpfSEIYgJqxNMFTkFUjVXiZhT6qGirwCqdrLJOxJ1VCR
V6A/1XxNc9jqQ6JkpjTU2rwQR+5c4769YCM5zn/BX4PY33Dljb0+JtiTqqEir8ADWEIY6dz7d1cA
AAAASUVORK5CYII=
------=_NextPart_000_0000_C2ECC76E.5EC79255--