Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / test / data / printing / iframe.htm
blob7c9f443843c0789e7177dea79e7798b84d16107a
1 <html>
2 <title>iframe</title>
3 <SCRIPT type="text/javascript" language="JavaScript">
4 function PrintIframe() {
5 // Standard way
6 //window.frames["inner_frame"].focus();
7 //window.frames["inner_frame"].print();
8 // IE6 way
9 //document.inner_frame.focus();
10 //document.inner_frame.print();
11 // IE7 way. That's the way Safari does it.
12 window.frames["inner_frame"].document.execCommand('print',false,null)
14 function DelayedPrint() {
15 setTimeout(PrintIframe, 0);
17 </SCRIPT>
18 <body onload="javascript:DelayedPrint()">
20 <p>
21 <a href="javascript:PrintIframe()"><img src="click_me.png" /></a>
22 <p>
23 <div>
24 <iframe src="test2.html" id="inner_frame" style="height:150px; margin:0px; padding:0px"><html><body>A</body></html></iframe>
25 </div>
26 <br>
27 <img src="sadtab.png" />
28 </body>
29 </html>