forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic.html
More file actions
30 lines (30 loc) · 973 Bytes
/
basic.html
File metadata and controls
30 lines (30 loc) · 973 Bytes
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
<!doctype html>
<html>
<script src='resources/autoresize-util.js'></script>
<script>
function runTest()
{
if (window.testRunner) {
testRunner.enableAutoResizeMode(10, 10, 1000, 1000);
testRunner.dumpAsText();
}
shouldBe('document.body.clientWidth', 'window.innerWidth');
shouldBe('document.body.clientHeight', 'window.innerHeight');
shouldBe('document.scrollingElement.scrollWidth', 'window.innerWidth');
shouldBe('document.scrollingElement.scrollHeight', 'window.innerHeight');
shouldBe('window.innerWidth', 'window.outerWidth');
shouldBe('window.innerHeight', 'window.outerHeight');
log('DONE');
}
</script>
<body onload="runTest()" style="margin:0; width:900px">
This test only works in when run in dumprendertree as it relies on having auto-resize enabled its window.
<br>
<br>
When it succeeds, there should be a series of PASS messages followed by a DONE message.
<br>
<br>
<div id='result'>
</div>
</body>
</html>