summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests/scrollIntoView-vertical.html
blob: 0d8525a3724e61ad0980f13740c279680d7c612a (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
</head>
<body>
<p><b>BUG ID</b> <a href="rdar://problem/3471901">3471901</a> support scrollIntoView method for DOM elements (3474)</p>

<p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> 
Following the numbered steps, click each button to scroll the specified colored box into view.</p>

<p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> 
A colored box should scroll into view after clicking each button.  The text on the button specifies the expected position (top, bottom) of the box scrolled into view.</p>

<p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>  
Colored box does not scroll into view, or the box is scrolled to the wrong positon (top, bottom).  
</p>

<div id="purplebox" style="background-color:purple; width: 300px; height: 100px;">
	<input type="button" value="STEP 1: click to scroll yellow box to BOTTOM of view" onclick="document.getElementById('yellowbox').scrollIntoView(false);">
	<input type="button" value="STEP 4: click to scroll orange box to TOP of view" onclick="document.getElementById('orangebox').scrollIntoView(true);">
</div>

<div style="height: 500px; width: 500px; border: 1px solid;">here is a big empty div</div>

<div id="greenbox" style="background-color:green; width: 300px; height: 100px;">
	<input type="button" value="STEP 3: click to scroll purple box to TOP of view" onclick="document.getElementById('purplebox').scrollIntoView();">
</div>

<div style="height: 500px; width: 500px; border: 1px solid;">here is a big empty div</div>

<div id="yellowbox" style="background-color:yellow; width: 300px; height: 100px;">
	<input type="button" value="STEP 2: click to scroll green box to TOP of view" onclick="document.getElementById('greenbox').scrollIntoView(true);">
</div>

<div style="height: 500px; width: 500px; border: 1px solid;">here is a big empty div</div>

<div id="orangebox" style="background-color:orange; width: 300px; height: 100px;">
 Test Complete
</div>

<div style="height: 500px; width: 500px; border: 1px solid;">here is a big empty div</div>

</body>
</html>