blob: 2b79b4a34959fc02101c3320e7e6096c3b128041 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
<!DOCTYPE HTML>
<html>
<head>
<title>Cloud Print Dialog unittest</title>
<script language="javascript">
window.onload = onLoad;
function onLoad() {
}
function testPageSetup() {
var result = JSON.stringify({'dpi': 300,
'min_shrink': 1.25,
'max_shrink': 2.0,
'selection_only': false});
chrome.send('SetPageParameters', [result]);
}
function testWindowPrint() {
window.print();
}
function testWindowClose() {
window.close();
}
function testWindowSizeLarger() {
window.resizeBy(0, 50);
}
function testWindowSizeSmaller() {
window.resizeBy(0, -50);
}
function showDebugger() {
onLoad();
chrome.send('ShowDebugger', ['']);
}
function testSendPrintData() {
chrome.send('SendPrintData', ['']);
}
</script>
</head>
<body style='margin:0; border:0;'>
<hr>
<table border='0' width='100%'>
<tr>
<td align='right'>
<input type='button' value='Open Debug Window' id='debug'
onclick='showDebugger();'/>
<input type='button' value='Test Send Data' id='data'
onclick='testSendPrintData();'/>
<input type='button' name='test' value='Test window.print()'
onclick='testWindowPrint();'/>
</td>
</tr>
<tr>
<td align='right'>
<input type='button' name='larger' value='Make Window Larger'
onclick='makeWindowLarger();'/>
<input type='button' name='smaller' value='Make Window Smaller'
onclick='makeWindowSmaller();'/>
<input type='button' name='test' value='Test Page Setup'
onclick='testPageSetup();'/>
</td>
</tr>
<tr>
<td align='right'>
<input type='button' value='Cancel' id='cancel'
onclick='testWindowClose();'/>
</td>
</tr>
</table>
<div id='message' style='font-weight:bolder;'> </div>
<div id='advanced' class='advanced' style='display:none;'></div>
</body>
</html>
|