summaryrefslogtreecommitdiffstats
path: root/tests/org.eclipse.swt.tests/data/browser5.html
blob: dc5bfce7fd9efc6aa2ef6a8eee7cc81cf45722ed (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
<html>
<script type="text/javascript">
	var win;
	function testOpen() {
		win = window.open('javascript:"<h1>Simple New Window</h2>"', "", "left=10,top=200,height=100,width=300");
	}
	function testResizeTo() {
		win.resizeTo(600,800);
	}
	function testMoveTo() {
		win.moveTo(200,100);
	}
	function testMoveBy() {
		win.moveBy(2,2);
	}
	function testScrollBy() {
		win.scrollBy(1,20);
	}
	function testResizeBy() {
		win.resizeBy(2,3);
	}
	function testClose() {
		win.close();
	}

	win1 = window.open('javascript:"<h1>Simple New Window 1</h2><p>bounds: left=10,top=200,height=100,width=300<p>"', "", "left=10,top=200,height=100,width=300");
	win2 = window.open('javascript:"<h1>Simple New Window 2</h2><p>bounds: left=10,top=200<p>"', "", "left=10,top=200");
	win3 = window.open('javascript:"<h1>Simple New Window 3</h2><p>bounds: height=100,width=300<p>"', "", "height=100,width=300");
	win4 = window.open('javascript:"<h1>Simple New Window 4</h2><p>bounds: not specified<p>"', "", "");
	
	setTimeout("win1.close();win2.close();win3.close();win4.close()", 5000);
	
</script>

<form>
	<input type="button" VALUE="window.open" onClick="testOpen()">
	<input type="button" VALUE="resizeTo" onClick="testResizeTo()">
	<input type="button" VALUE="moveTo" onClick="testMoveTo()">
	<input type="button" VALUE="moveBy" onClick="testMoveBy()">
	<input type="button" VALUE="scrollBy" onClick="testScrollBy()">
	<input type="button" VALUE="resizeBy" onClick="testResizeBy()">
	<input type="button" VALUE="close" onClick="testClose()">
</FORM>
<body>
<p>This test uses javascript.
<p>It opens a new window. Sets a timer. Then close the new window when the timer expires.
</body>
</html>