blob: be26ef647467fed8dfca3e7f601391042ca9342a [file] [log] [blame]
wangxianzhu@chromium.org8765cf82012-04-25 07:11:21 +00001<html>
2<head>
3
4<style>
5
6body {
7 width: 2000px;
8 height: 2000px;
9 background-color: grey;
10}
11.inspected {
12 margin: 5px;
13 border: solid 10px aqua;
14 padding: 15px;
15 width: 200px;
16 height: 200px;
17 background-color: blue;
18 float: left;
19}
20#scrollingContainer {
21 clear: both;
22 width: 100px;
23 height: 100px;
24 overflow: auto;
25}
26#description {
27 clear: both;
28}
29
30</style>
31
32<script src="../../http/tests/inspector/inspector-test.js"></script>
33<script src="../../http/tests/inspector/elements-test.js"></script>
34<script>
35
36function onload()
37{
38 window.scrollBy(50, 100);
39 scrollingContainer = document.getElementById("scrollingContainer");
40 scrollingContainer.scrollTop = 50;
41 scrollingContainer.scrollLeft = 60;
42 runTest();
43}
44
45function test()
46{
47 function nodeSelected2(node)
48 {
49 RuntimeAgent.evaluate("dumpInspectorHighlightRects()", InspectorTest.completeTest);
50 }
51
52 function testNode2()
53 {
54 InspectorTest.selectNodeWithId("inspectedElement2", nodeSelected2);
55 }
56
57 function nodeSelected1(node)
58 {
59 RuntimeAgent.evaluate("dumpInspectorHighlightRects()", testNode2);
60 }
61
62 InspectorTest.selectNodeWithId("inspectedElement1", nodeSelected1);
63}
64
65</script>
66</head>
67
68<body onload="onload()">
69
70<div id="inspectedElement1" class="inspected"></div>
71
72<div id="scrollingContainer">
73 <div id="inspectedElement2" class="inspected"></div>
74</div>
75
76<p id="description">This test verifies the position and size of the highlight rectangles overlayed on an inspected div in the scrolled view.</p>
77
78</body>
79</html>