Update CSS tests to revision d13905941293af83ea8c3c1750dba652e0423fb0

This commit is contained in:
Ms2ger 2015-10-31 14:35:08 +01:00
parent b492a3e8b1
commit 5450053b02
842 changed files with 42936 additions and 27 deletions

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View Module test:CaretPosition</title>
<link href="mailto:tidelgl@gmail.com" rel="author" title="unbug">
<link href="http://www.w3.org/TR/cssom-view/#the-caretposition-interface" rel="help">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
.box{
position: absolute;
top : 100px;
left : 400px;
width: 100px;
height: 100px;
background-color: #000;
}
</style>
</head>
<body>
<p>This case tests the Screen pixelDepth and colorDepth</p>
<p>The test passes if the value is Element "#box2"</p>
<div class="box" id="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box" id="box2"></div>
<div style="left: 405px;background:red;" class="box" id="box3"></div>
<div id="log"></div>
<script>
test(function(){
assert_equals(getBox('box2'), document.elementFromPoint(400,100), "Expected value for element id is 'box2'");
},'getBox');
test(function(){
assert_equals(null, document.elementFromPoint(400,900), "Expected value for element id is 'box2'");
},'getBox');
function getBox(id){
return document.getElementById(id);
}
</script>
</body></html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View Module test:MediaQueryList</title>
<link href="mailto:tidelgl@gmail.com" rel="author" title="unbug">
<link href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface" rel="help">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
</style>
</head>
<body>
<p>This case tests the MediaQueryList
</p><p>The test passes if the value is 1280/800</p>
<div id="log"></div>
<script>
test(function(){
assert_equals(window.matchMedia('(device-aspect-ratio: 1280/800)').matches, true, "Expected value for device-aspect-ratio is 1280/800");
},'matchMedia');
</script>
</body></html>

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View Module test:Screen-pixelDepth,Screen-colorDepth</title>
<link href="mailto:tidelgl@gmail.com" rel="author" title="unbug">
<link href="http://www.w3.org/TR/cssom-view/#the-screen-interface" rel="help">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
</style>
</head>
<body>
<p>This case tests the Screen pixelDepth and colorDepth</p>
<p>The test passes if the value is 24</p>
<div id="log"></div>
<script>
test(function(){
assert_equals(testColorDepth(), 24, "Expected value for colorDepth is 24");
},'testColorDepth');
test(function(){
assert_equals(testPixelDepth(), 24, "Expected value for pixelDepth is 24");
},'testPixelDepth');
function testColorDepth(){
var colorDepth = window.screen.colorDepth;
return colorDepth;
}
function testPixelDepth(){
var pixelDepth = window.screen.pixelDepth;
return pixelDepth;
}
</script>
</body></html>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Background - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Background (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#background">1 Background</a></th></tr>
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Extensions to the Range Interface - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Extensions to the Range Interface (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s10">
<tr><th colspan="4" scope="rowgroup">
<a href="#s10">+</a>
<a href="http://www.w3.org/TR/cssom-view/#extensions-to-the-range-interface">10 Extensions to the Range Interface</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s10.#dom-range-getboundingclientrect">
<!-- 0 tests -->
</tbody>
<tbody id="s10.#dom-range-getclientrects">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,69 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Extensions to the MouseEvent Interface - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Extensions to the MouseEvent Interface (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s11">
<tr><th colspan="4" scope="rowgroup">
<a href="#s11">+</a>
<a href="http://www.w3.org/TR/cssom-view/#extensions-to-the-mouseevent-interface">11 Extensions to the MouseEvent Interface</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-clientx">
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-clienty">
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-offsetx">
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-offsety">
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-pagex">
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-pagey">
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-screenx">
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-screeny">
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-x">
<!-- 0 tests -->
</tbody>
<tbody id="s11.#dom-mouseevent-y">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,72 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Geometry - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Geometry (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s12">
<tr><th colspan="4" scope="rowgroup">
<a href="#s12">+</a>
<a href="http://www.w3.org/TR/cssom-view/#geometry">12 Geometry</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s12.1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s12.1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#the-geometryutils-interface">12.1 The GeometryUtils Interface</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s12.1.#boxquadoptions">
<!-- 0 tests -->
</tbody>
<tbody id="s12.1.#convertcoordinateoptions">
<!-- 0 tests -->
</tbody>
<tbody id="s12.1.#cssboxtype">
<!-- 0 tests -->
</tbody>
<tbody id="s12.1.#dom-geometryutils-convertpointfromnode">
<!-- 0 tests -->
</tbody>
<tbody id="s12.1.#dom-geometryutils-convertquadfromnode">
<!-- 0 tests -->
</tbody>
<tbody id="s12.1.#dom-geometryutils-convertrectfromnode">
<!-- 0 tests -->
</tbody>
<tbody id="s12.1.#dom-geometryutils-getboxquads">
<!-- 0 tests -->
</tbody>
<tbody id="s12.1.#geometrynode">
<!-- 0 tests -->
</tbody>
<tbody id="s12.1.#geometryutils">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,51 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Events - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Events (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s13">
<tr><th colspan="4" scope="rowgroup">
<a href="#s13">+</a>
<a href="http://www.w3.org/TR/cssom-view/#events">13 Events</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s13.1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s13.1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#resizing-viewports">13.1 Resizing viewports</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s13.2">
<tr><th colspan="4" scope="rowgroup">
<a href="#s13.2">+</a>
<a href="http://www.w3.org/TR/cssom-view/#scrolling-0">13.2 Scrolling</a></th></tr>
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,108 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>CSS properties - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>CSS properties (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s14">
<tr><th colspan="4" scope="rowgroup">
<a href="#s14">+</a>
<a href="http://www.w3.org/TR/cssom-view/#css-properties">14 CSS properties</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s14.1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s14.1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#smooth-scrolling:-the-'scroll-behavior'-property">14.1 Smooth Scrolling: The 'scroll-behavior' Property</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s14.1.#scroll-behavior">
<!-- 0 tests -->
</tbody>
<tbody id="s14.1.#scroll-behavior-instant">
<!-- 0 tests -->
</tbody>
<tbody id="s14.1.#scroll-behavior-smooth">
<!-- 0 tests -->
</tbody>
<tbody id="s.#abstract">
<!-- 0 tests -->
</tbody>
<tbody id="s.#acknowledgments">
<!-- 0 tests -->
</tbody>
<tbody id="s.#anolis-references">
<!-- 0 tests -->
</tbody>
<tbody id="s.#references">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsCSSBOX">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsCSSDEVICEADAPT">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsCSSOM">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsCSSTRANSFORMS">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsCSSWRITINGMODES">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsDOM">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsGEOMETRY">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsHTML">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsRFC2119">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsSVG">
<!-- 0 tests -->
</tbody>
<tbody id="s.#refsWEBIDL">
<!-- 0 tests -->
</tbody>
<tbody id="s.#sotd">
<!-- 0 tests -->
</tbody>
<tbody id="s.#toc">
<!-- 0 tests -->
</tbody>
<tbody id="s.#w3c-doctype">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,48 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Conformance - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Conformance (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s2">
<tr><th colspan="4" scope="rowgroup">
<a href="#s2">+</a>
<a href="http://www.w3.org/TR/cssom-view/#conformance">2 Conformance</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s2.#hardwareLimitations">
<!-- 0 tests -->
</tbody>
<tbody id="s2.1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s2.1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#web-idl">2.1 Web IDL</a></th></tr>
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,141 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Terminology - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Terminology (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s3">
<tr><th colspan="4" scope="rowgroup">
<a href="#s3">+</a>
<a href="http://www.w3.org/TR/cssom-view/#terminology">3 Terminology</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s3.#beginning-edges">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#block-flow-direction">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#border-edge">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#canvas">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#content-edge">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#css-layout-box">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#dompoint">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#dompointinit">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#dompointreadonly">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#domquad">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#domrect">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#domrectlist">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#domrectreadonly">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#ending-edges">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#initial-containing-block">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#inline-base-direction">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#layout-box">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#margin-edge">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#mouseevent">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#mouseeventinit">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#overflow-directions">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#padding-edge">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#scrolling-area">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#scrolling-box">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#svg-layout-box">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#the-html-body-element">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#transforms">
<!-- 0 tests -->
</tbody>
<tbody id="s3.#viewport">
<!-- 0 tests -->
</tbody>
<tbody id="s3.1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s3.1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#css-pixels">3.1 CSS pixels</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s3.2">
<tr><th colspan="4" scope="rowgroup">
<a href="#s3.2">+</a>
<a href="http://www.w3.org/TR/cssom-view/#zooming">3.2 Zooming</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s3.2.#page-zoom">
<!-- 0 tests -->
</tbody>
<tbody id="s3.2.#pinch-zoom">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Common Infrastructure - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Common Infrastructure (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s4">
<tr><th colspan="4" scope="rowgroup">
<a href="#s4">+</a>
<a href="http://www.w3.org/TR/cssom-view/#common-infrastructure">4 Common Infrastructure</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s4.1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s4.1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#scrolling">4.1 Scrolling</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s4.1.#concept-instant-scroll">
<!-- 0 tests -->
</tbody>
<tbody id="s4.1.#concept-smooth-scroll">
<!-- 0 tests -->
</tbody>
<tbody id="s4.1.#concept-smooth-scroll-aborted">
<!-- 0 tests -->
</tbody>
<tbody id="s4.1.#concept-smooth-scroll-completed">
<!-- 0 tests -->
</tbody>
<tbody id="s4.1.#perform-a-scroll">
<!-- 0 tests -->
</tbody>
<tbody id="s4.1.#scroll-to-the-beginning-of-the-document">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,333 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Extensions to the Window Interface - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Extensions to the Window Interface (13 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s5">
<tr><th colspan="4" scope="rowgroup">
<a href="#s5">+</a>
<a href="http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface">5 Extensions to the Window Interface</a></th></tr>
<!-- 2 tests -->
<tr id="media-query-list-interface-5" class="primary dom script">
<td><strong>
<a href="media-query-list-interface.htm">media-query-list-interface</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>Properties and Functions
<ul class="assert">
<li>All properties exist and are readonly. All functions exist and are instances of Function</li>
</ul>
</td>
</tr>
<tr id="window-interface-5" class="primary dom script">
<td><strong>
<a href="window-interface.htm">window-interface</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>Properties and Functions
<ul class="assert">
<li>All properties exist and are readonly. All functions exist and are instances of Function</li>
</ul>
</td>
</tr>
</tbody>
<tbody id="s5.#allowed-to-resize-and-move">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-devicepixelratio">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-innerheight">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-innerwidth">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-matchmedia">
<!-- 1 tests -->
<tr id="matchmedia-5.#dom-window-matchmedia" class="primary dom script">
<td><strong>
<a href="matchMedia.htm">matchmedia</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View matchMedia and MediaQueryList
</td>
</tr>
</tbody>
<tbody id="s5.#dom-window-moveby">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-moveto">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-outerheight">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-outerwidth">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-pagexoffset">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-pageyoffset">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-resizeby">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-resizeto">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-screen">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-screenx">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-screeny">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-scroll">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-scrollby">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-scrollto">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-scrollx">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#dom-window-scrolly">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#scrollbehavior">
<!-- 0 tests -->
</tbody>
<tbody id="s5.#scrolloptions">
<!-- 0 tests -->
</tbody>
<tbody id="s5.1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s5.1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#the-features-argument-to-the-open()-method">5.1 The features argument to the open() method</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s5.1.#dom-open-features-height">
<!-- 0 tests -->
</tbody>
<tbody id="s5.1.#dom-open-features-left">
<!-- 0 tests -->
</tbody>
<tbody id="s5.1.#dom-open-features-top">
<!-- 0 tests -->
</tbody>
<tbody id="s5.1.#dom-open-features-width">
<!-- 0 tests -->
</tbody>
<tbody id="s5.1.#supported-open()-feature-name">
<!-- 0 tests -->
</tbody>
<tbody id="s5.2">
<tr><th colspan="4" scope="rowgroup">
<a href="#s5.2">+</a>
<a href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface">5.2 The MediaQueryList Interface</a></th></tr>
<!-- 4 tests -->
<tr id="matchmedia-5.2" class="dom script">
<td>
<a href="matchMedia.htm">matchmedia</a></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View matchMedia and MediaQueryList
</td>
</tr>
<tr id="matchmediaaddlistener-5.2" class="primary dom script">
<td><strong>
<a href="matchMediaAddListener.htm">matchmediaaddlistener</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View matchMedia addListener
</td>
</tr>
<tr id="media-query-list-interface-5.2" class="dom script">
<td>
<a href="media-query-list-interface.htm">media-query-list-interface</a></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>Properties and Functions
<ul class="assert">
<li>All properties exist and are readonly. All functions exist and are instances of Function</li>
</ul>
</td>
</tr>
<tr id="mediaquerylist-001-5.2" class="primary script">
<td><strong>
<a href="MediaQueryList-001.htm">mediaquerylist-001</a></strong></td>
<td></td>
<td><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>MediaQueryList
</td>
</tr>
</tbody>
<tbody id="s5.2.#dom-mediaquerylist-addlistener">
<!-- 0 tests -->
</tbody>
<tbody id="s5.2.#dom-mediaquerylist-matches">
<!-- 0 tests -->
</tbody>
<tbody id="s5.2.#dom-mediaquerylist-media">
<!-- 0 tests -->
</tbody>
<tbody id="s5.2.#dom-mediaquerylist-removelistener">
<!-- 0 tests -->
</tbody>
<tbody id="s5.2.#list-of-media-query-list-listeners">
<!-- 0 tests -->
</tbody>
<tbody id="s5.2.#mediaquerylist">
<!-- 0 tests -->
</tbody>
<tbody id="s5.2.#mediaquerylistlistener">
<!-- 0 tests -->
</tbody>
<tbody id="s5.3">
<tr><th colspan="4" scope="rowgroup">
<a href="#s5.3">+</a>
<a href="http://www.w3.org/TR/cssom-view/#the-screen-interface">5.3 The Screen Interface</a></th></tr>
<!-- 8 tests -->
<tr id="cssom-view-window-screen-interface-5.3" class="primary dom script">
<td><strong>
<a href="cssom-view-window-screen-interface.htm">cssom-view-window-screen-interface</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>cssom view window screen attribute
<ul class="assert">
<li>window screen interface</li>
</ul>
</td>
</tr>
<tr id="screen-pixeldepth-screen-colordepth001-5.3" class="primary script">
<td><strong>
<a href="Screen-pixelDepth-Screen-colorDepth001.htm">screen-pixeldepth-screen-colordepth001</a></strong></td>
<td></td>
<td><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>Screen-pixelDepth,Screen-colorDepth
</td>
</tr>
<tr id="window-screen-height-5.3" class="primary dom script">
<td><strong>
<a href="window-screen-height.htm">window-screen-height</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View - 4.2 - screen.height range tests
<ul class="assert">
<li>window.screen.height has sensible values</li>
</ul>
</td>
</tr>
<tr id="window-screen-height-immutable-5.3" class="primary dom script">
<td><strong>
<a href="window-screen-height-immutable.htm">window-screen-height-immutable</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View - 4.2 - screen.height immutability
<ul class="assert">
<li>screen.height is immutable</li>
</ul>
</td>
</tr>
<tr id="window-screen-height-mutation-throws-5.3" class="primary dom script">
<td><strong>
<a href="window-screen-height-mutation-throws.htm">window-screen-height-mutation-throws</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View - 4.2 - screen.height mutation throws exception
<ul class="assert">
<li>screen.height mutation throws exception</li>
</ul>
</td>
</tr>
<tr id="window-screen-width-5.3" class="primary dom script">
<td><strong>
<a href="window-screen-width.htm">window-screen-width</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View - 4.2 - screen.width range tests
<ul class="assert">
<li>window.screen.width has sensible values</li>
</ul>
</td>
</tr>
<tr id="window-screen-width-immutable-5.3" class="primary dom script">
<td><strong>
<a href="window-screen-width-immutable.htm">window-screen-width-immutable</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View - 4.2 - screen.width immutability
<ul class="assert">
<li>screen.width is immutable</li>
</ul>
</td>
</tr>
<tr id="window-screen-width-mutation-throws-5.3" class="primary dom script">
<td><strong>
<a href="window-screen-width-mutation-throws.htm">window-screen-width-mutation-throws</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View - 4.2 - screen.width mutation throws exception
<ul class="assert">
<li>screen.width mutation throws exception</li>
</ul>
</td>
</tr>
</tbody>
<tbody id="s5.3.#dom-screen-availheight">
<!-- 0 tests -->
</tbody>
<tbody id="s5.3.#dom-screen-availwidth">
<!-- 0 tests -->
</tbody>
<tbody id="s5.3.#dom-screen-colordepth">
<!-- 0 tests -->
</tbody>
<tbody id="s5.3.#dom-screen-height">
<!-- 0 tests -->
</tbody>
<tbody id="s5.3.#dom-screen-pixeldepth">
<!-- 0 tests -->
</tbody>
<tbody id="s5.3.#dom-screen-width">
<!-- 0 tests -->
</tbody>
<tbody id="s5.3.#screen">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,105 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Extensions to the Document Interface - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Extensions to the Document Interface (3 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s6">
<tr><th colspan="4" scope="rowgroup">
<a href="#s6">+</a>
<a href="http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface">6 Extensions to the Document Interface</a></th></tr>
<!-- 2 tests -->
<tr id="elementfrompoint-001-6" class="primary dom script">
<td><strong>
<a href="elementFromPoint-001.htm">elementfrompoint-001</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View - 5 - extensions to the Document interface
<ul class="assert">
<li>elementFromPoint returns correct element</li>
</ul>
</td>
</tr>
<tr id="elementfromposition-6" class="primary dom script">
<td><strong>
<a href="elementFromPosition.htm">elementfromposition</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View elementFromPoint
</td>
</tr>
</tbody>
<tbody id="s6.#dom-document-caretpositionfrompoint">
<!-- 0 tests -->
</tbody>
<tbody id="s6.#dom-document-elementfrompoint">
<!-- 0 tests -->
</tbody>
<tbody id="s6.#dom-document-elementsfrompoint">
<!-- 0 tests -->
</tbody>
<tbody id="s6.1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s6.1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#the-caretposition-interface">6.1 The CaretPosition Interface</a></th></tr>
<!-- 1 tests -->
<tr id="caretposition-001-6.1" class="primary script">
<td><strong>
<a href="CaretPosition-001.htm">caretposition-001</a></strong></td>
<td></td>
<td><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CaretPosition
</td>
</tr>
</tbody>
<tbody id="s6.1.#caret-node">
<!-- 0 tests -->
</tbody>
<tbody id="s6.1.#caret-offset">
<!-- 0 tests -->
</tbody>
<tbody id="s6.1.#caret-position">
<!-- 0 tests -->
</tbody>
<tbody id="s6.1.#caret-range">
<!-- 0 tests -->
</tbody>
<tbody id="s6.1.#caretposition">
<!-- 0 tests -->
</tbody>
<tbody id="s6.1.#dom-caretposition-getclientrect">
<!-- 0 tests -->
</tbody>
<tbody id="s6.1.#dom-caretposition-offset">
<!-- 0 tests -->
</tbody>
<tbody id="s6.1.#dom-caretposition-offsetnode">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,161 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Extensions to the Element Interface - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Extensions to the Element Interface (6 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s7">
<tr><th colspan="4" scope="rowgroup">
<a href="#s7">+</a>
<a href="http://www.w3.org/TR/cssom-view/#extensions-to-the-element-interface">7 Extensions to the Element Interface</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s7.#dom-element-clientheight">
<!-- 0 tests -->
</tbody>
<tbody id="s7.#dom-element-clientleft">
<!-- 0 tests -->
</tbody>
<tbody id="s7.#dom-element-clienttop">
<!-- 0 tests -->
</tbody>
<tbody id="s7.#dom-element-clientwidth">
<!-- 0 tests -->
</tbody>
<tbody id="s7.#dom-element-getboundingclientrect">
<!-- 2 tests -->
<tr id="cssom-getboundingclientrect-001-7.#dom-element-getboundingclientrect" class="primary dom script">
<td><strong>
<a href="cssom-getBoundingClientRect-001.htm">cssom-getboundingclientrect-001</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View - 6.1 - getBoundingClientRect tests
</td>
</tr>
<tr id="cssom-getboundingclientrect-002-7.#dom-element-getboundingclientrect" class="dom script">
<td>
<a href="cssom-getBoundingClientRect-002.htm">cssom-getboundingclientrect-002</a></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>getBoundingClientRect of element outside DOM
<ul class="assert">
<li>Calling getBoundingClientRect on an element that is outside of the DOM (and therefore does not have an associated layout box) should result in an all-zeroes DOMRect and should definitely not throw an error.</li>
</ul>
</td>
</tr>
</tbody>
<tbody id="s7.#dom-element-getclientrects">
<!-- 2 tests -->
<tr id="cssom-getboundingclientrect-002-7.#dom-element-getclientrects" class="primary dom script">
<td><strong>
<a href="cssom-getBoundingClientRect-002.htm">cssom-getboundingclientrect-002</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>getBoundingClientRect of element outside DOM
<ul class="assert">
<li>Calling getBoundingClientRect on an element that is outside of the DOM (and therefore does not have an associated layout box) should result in an all-zeroes DOMRect and should definitely not throw an error.</li>
</ul>
</td>
</tr>
<tr id="cssom-getclientrects-7.#dom-element-getclientrects" class="primary dom script">
<td><strong>
<a href="cssom-getClientRects.htm">cssom-getclientrects</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>getClientRects of element outside DOM
<ul class="assert">
<li>Calling getClientRects on an element that is outside of the DOM (and therefore does not have an associated layout box) should result in an empty DOMRectList and should definitely not throw an error.</li>
</ul>
</td>
</tr>
</tbody>
<tbody id="s7.#dom-element-scrollheight">
<!-- 0 tests -->
</tbody>
<tbody id="s7.#dom-element-scrollintoview">
<!-- 1 tests -->
<tr id="ttwf-scrollintoview-7.#dom-element-scrollintoview" class="primary dom script">
<td><strong>
<a href="ttwf-scrollintoview.htm">ttwf-scrollintoview</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View - 6 - scrollIntoView tests
</td>
</tr>
</tbody>
<tbody id="s7.#dom-element-scrollleft">
<!-- 0 tests -->
</tbody>
<tbody id="s7.#dom-element-scrolltop">
<!-- 0 tests -->
</tbody>
<tbody id="s7.#dom-element-scrollwidth">
<!-- 2 tests -->
<tr id="scrollwidthheight-7.#dom-element-scrollwidth" class="primary dom script">
<td><strong>
<a href="scrollWidthHeight.htm">scrollwidthheight</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View scrollWidth and scrollHeight
</td>
</tr>
<tr id="scrollwidthheightwhennotscrollable-7.#dom-element-scrollwidth" class="primary dom script">
<td><strong>
<a href="scrollWidthHeightWhenNotScrollable.htm">scrollwidthheightwhennotscrollable</a></strong></td>
<td></td>
<td><abbr class="dom" title="Requires Document Object Model support">DOM/JS</abbr><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View scrollWidth/scrollHeight (for nonscrollable elements)
</td>
</tr>
</tbody>
<tbody id="s7.#scrolloptionshorizontal">
<!-- 0 tests -->
</tbody>
<tbody id="s7.#scrolloptionsvertical">
<!-- 0 tests -->
</tbody>
<tbody id="s7.1">
<tr><th colspan="4" scope="rowgroup">
<a href="#s7.1">+</a>
<a href="http://www.w3.org/TR/cssom-view/#the-getclientrects()-and-getboundingclientrect()-methods">7.1 The getClientRects() and getBoundingClientRect() methods</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s7.2">
<tr><th colspan="4" scope="rowgroup">
<a href="#s7.2">+</a>
<a href="http://www.w3.org/TR/cssom-view/#element-scrolling-members">7.2 Element Scrolling Members</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s7.2.#scroll-an-element">
<!-- 0 tests -->
</tbody>
<tbody id="s7.2.#scroll-an-element-into-view">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,70 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Extensions to the HTMLElement Interface - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Extensions to the HTMLElement Interface (1 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s8">
<tr><th colspan="4" scope="rowgroup">
<a href="#s8">+</a>
<a href="http://www.w3.org/TR/cssom-view/#extensions-to-the-htmlelement-interface">8 Extensions to the HTMLElement Interface</a></th></tr>
<!-- 1 tests -->
<tr id="offsetparent_element_test-8" class="primary script">
<td><strong>
<a href="offsetParent_element_test.htm">offsetparent_element_test</a></strong></td>
<td></td>
<td><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View &amp;#8212;&amp;#8212; offsetParent element test
</td>
</tr>
</tbody>
<tbody id="s8.#dom-htmlelement-offsetheight">
<!-- 0 tests -->
</tbody>
<tbody id="s8.#dom-htmlelement-offsetleft">
<!-- 0 tests -->
</tbody>
<tbody id="s8.#dom-htmlelement-offsetparent">
<!-- 1 tests -->
<tr id="offsetparent_element_test-8.#dom-htmlelement-offsetparent" class="script">
<td>
<a href="offsetParent_element_test.htm">offsetparent_element_test</a></td>
<td></td>
<td><abbr class="script" title="Executes tests in script">Script</abbr></td>
<td>CSSOM View &amp;#8212;&amp;#8212; offsetParent element test
</td>
</tr>
</tbody>
<tbody id="s8.#dom-htmlelement-offsettop">
<!-- 0 tests -->
</tbody>
<tbody id="s8.#dom-htmlelement-offsetwidth">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Excensions to the HTMLImageElement Interface - CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite</h1>
<h2>Excensions to the HTMLImageElement Interface (0 tests)</h2>
<table width="100%">
<col id="test-column">
<col id="refs-column">
<col id="flags-column">
<col id="info-column">
<thead>
<tr>
<th>Test</th>
<th><abbr title="Rendering References">Refs</abbr></th>
<th>Flags</th>
<th>Info</th>
</tr>
</thead>
<tbody id="s9">
<tr><th colspan="4" scope="rowgroup">
<a href="#s9">+</a>
<a href="http://www.w3.org/TR/cssom-view/#excensions-to-the-htmlimageelement-interface">9 Excensions to the HTMLImageElement Interface</a></th></tr>
<!-- 0 tests -->
</tbody>
<tbody id="s9.#dom-htmlimageelement-x">
<!-- 0 tests -->
</tbody>
<tbody id="s9.#dom-htmlimageelement-y">
<!-- 0 tests -->
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View - 6.1 - getBoundingClientRect tests</title>
<meta charset="utf-8">
<link href="mailto:pwx.frontend@gmail.com" rel="author" title="Chris Wu">
<link href="http://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect" rel="help">
<meta content="dom" name="flags">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
#testItem{width:279px;height: 188px;margin:100px 0 0 178px;background-color: purple;font-size: 26px;font-weight:bold;text-align: center;line-height: 188px;}
</style>
</head>
<body>
<div id="testItem">test item</div>
<div id="log"></div>
<script>
var titem = document.getElementById('testItem').getBoundingClientRect();
test(
function(){
assert_equals(titem.bottom - titem.top,titem.height,"They donot match")
},"check getBoundingClientRect().top,getBoundingClientRect.bottom()"
);
test(
function(){
assert_equals(titem.right - titem.left,titem.width,"They donot match")
},"check getBoundingClientRect().left,getBoundingClientRect.right()"
)
</script>
</body></html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html><head>
<meta charset="utf-8">
<title>CSS Test (CSSOM View): getBoundingClientRect of element outside DOM</title>
<link href="http://chrisrebert.com" rel="author" title="Chris Rebert">
<link href="http://www.w3.org/TR/cssom-view/#dom-element-getclientrects" rel="help">
<link href="http://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect" rel="help">
<meta content="dom" name="flags">
<meta content="Calling getBoundingClientRect on an element that is outside of the DOM (and therefore does not have an associated layout box) should result in an all-zeroes DOMRect and should definitely not throw an error." name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(
function () {
var rect = document.createElement('div').getBoundingClientRect();
assert_equals(rect.x, 0, "DOMRect's x should be zero");
assert_equals(rect.y, 0, "DOMRect's y should be zero");
assert_equals(rect.width, 0, "DOMRect's width should be zero");
assert_equals(rect.height, 0, "DOMRect's height should be zero");
},
"getBoundingClientRect on a newly-created Element not yet inserted into the DOM should return an all-zeroes DOMRect"
);
</script>
</head>
<body>
</body></html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html><head>
<meta charset="utf-8">
<title>CSS Test (CSSOM View): getClientRects of element outside DOM</title>
<link href="http://chrisrebert.com" rel="author" title="Chris Rebert">
<link href="http://www.w3.org/TR/cssom-view/#dom-element-getclientrects" rel="help">
<meta content="dom" name="flags">
<meta content="Calling getClientRects on an element that is outside of the DOM (and therefore does not have an associated layout box) should result in an empty DOMRectList and should definitely not throw an error." name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(
function () {
var rectList = document.createElement('div').getClientRects();
assert_equals(rectList.length, 0, "DOMRectList should be empty");
},
"getClientRects on a newly-created Element not yet inserted into the DOM should return an empty DOMRectList"
);
</script>
</head>
<body>
</body></html>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html><head>
<title>CSS Test: cssom view window screen attribute</title>
<link href="mailto:jingkewhu@gmail.com" rel="author" title="jingke">
<link href="http://www.w3.org/TR/cssom-view/#the-screen-interface" rel="help">
<meta content="dom" name="flags">
<meta content="window screen interface" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
/*test readonly*/
test(function(){assert_readonly(window.screen, "availWidth");}, "Screen.availWidth is readonly");
test(function(){assert_readonly(window.screen, "availHeight");}, "Screen.availHeight is readonly");
test(function(){assert_readonly(window.screen, "width");}, "Screen.width is readonly");
test(function(){assert_readonly(window.screen, "height");}, "Screen.height is readonly");
test(function(){assert_readonly(window.screen, "colorDepth");}, "Screen.colorDepth is readonly");
test(function(){assert_readonly(window.screen, "pixelDepth");}, "Screen.pixelDepth is readonly");
test(function(){assert_true(window.screen.width >= 0 && window.screen.width < 6000000);},
"window.screen.width >= 0 && window.screen.width < 6000000");
test(function(){assert_true(window.screen.height >= 0 && window.screen.height < 6000000);},
"window.screen.height >= 0 && window.screen.height < 6000000");
test(function(){assert_true(window.screen.availWidth >= 0 && window.screen.availWidth <= window.screen.width);},
"window.screen.availWidth >= 0 && window.screen.availWidth <= window.screen.width");
test(function(){assert_true(window.screen.availHeight >= 0 && window.screen.availHeight <= window.screen.height);},
"window.screen.availHeight >= 0 && window.screen.availHeight <= window.screen.height");
test(function(){assert_true(window.screen.colorDepth == 0 || window.screen.colorDepth == 16 || window.screen.colorDepth == 24 || window.screen.colorDepth == 32);},
"window.screen.colorDepth == 0 || window.screen.colorDepth == 16 || window.screen.colorDepth == 24 || window.screen.colorDepth == 32");
test(function(){assert_equals(window.screen.pixelDepth, window.screen.colorDepth);},
"window.screen.pixelDepth must return the value returned by window.screen.colorDepth");
</script>
</body></html>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View - 5 - extensions to the Document interface</title>
<link href="mailto:neils.christoffersen@gmail.com" rel="author" title="Neils Christoffersen">
<link href="http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface" rel="help">
<meta content="dom" name="flags">
<meta content="elementFromPoint returns correct element" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#targetDiv {
position: absolute;
top: 10;
left: 10;
height: 100px;
width: 100px;
}
</style>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<div id="targetDiv">
</div>
<script>
var element = document.elementFromPoint(15, 15);
test ( function() {
assert_equals(element.id, "targetDiv", "elementFromPoint didn't return the correct element");
});
</script>
</body></html>

View file

@ -0,0 +1,144 @@
<!DOCTYPE html>
<html lang="en-US"><head>
<title>CSS Test: CSSOM View elementFromPoint</title>
<meta charset="UTF-8">
<link href="mailto:pwx.frontend@gmail.com" rel="author" title="Chris">
<link href="http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface" rel="help">
<link href="http://www.w3.org/TR/cssom-view/#widl-Document-elementFromPoint-Element-float-x-float-y" rel="help">
<meta content="dom" name="flags">
<script src="/resources/testharness.js" type="text/javascript"></script>
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
<script id="metadata_cache">/*
{
"document.elementFromPoint": {},
"document.elementFromPoint is a Function": {},
"test some point of the element: top left corner": {},
"test some point of the element: top line": {},
"test some point of the element: top right corner": {},
"test some point of the element: left line": {},
"test some point of the element: inside": {},
"test some point of the element: right line": {},
"test some point of the element: bottom left corner": {},
"test some point of the element: bottom line": {},
"test some point of the element: botom right corner": {},
"Point (0, 0), return root element(HTML)": {},
" test negative x ": {},
" test nagetive y ": {},
"test outside of viewport": {},
"test the top of layer": {}
}
*/</script>
</head>
<body>
<noscript>Test not run - JavaScript required!</noscript>
<div id="log"></div>
<script type="text/javascript">
var body = document.getElementsByTagName( 'body' )[0];
function createElement( id ) {
var elem = document.createElement( 'div' );
if ( id && typeof id == 'string' ) {
elem.id = id;
}
body.appendChild( elem );
return elem;
}
function setPosition( config ) {
var target = config.target;
target.style.position = 'absolute';
target.style.left = config.left + 'px';
target.style.top = config.top + 'px';
target.style.width = config.width + 'px';
target.style.height = config.height + 'px';
if ( config['z-index'] ) {
target.style.zIndex = config['z-index'];
}
}
var target = createElement( 'dom-1' );
setPosition( {
width: 100,
height: 100,
left: 10,
top: 10,
target: target
});
test( function () {
assert_inherits( document, 'elementFromPoint' );
}, 'document.elementFromPoint');
test( function () {
assert_true( document.elementFromPoint instanceof Function );
}, 'document.elementFromPoint is a Function');
(function(){
var wrap = [
// 左上角.
{x: 10, y: 10, r: 'top left corner'},
// 上边线
{x: 50, y: 10, r: 'top line'},
// 右上角
{x: 110, y: 10, r: 'top right corner'},
// 左边线
{x: 10, y: 50, r: 'left line'},
// 元素范围内
{x: 50, y: 50, r: 'inside'},
// 右边线
{x: 110, y: 10, r: 'right line'},
// 左下角
{x: 10, y: 110, r: 'bottom left corner'},
// 下边线
{x: 50, y: 110, r: 'bottom line'},
// 右下角
{x: 110, y: 110, r: 'botom right corner'}
];
var i = 0, len = wrap.length, item;
for ( ; i < len; i++ ) {
item = wrap[ i ];
test( function () {
assert_equals( document.elementFromPoint( item.x, item.y).id == 'dom-1', true );
}, 'test some point of the element: ' + item.r);
}
})();
test( function () {
var elem = document.elementFromPoint( 0, 0 );
assert_true( elem.nodeName == 'HTML' );
}, 'Point (0, 0), return root element(HTML)' );
test( function () {
var elem = document.elementFromPoint( -1000, 0 );
assert_true( elem == null, 'negative x, return null' );
}, ' test negative x ');
test( function () {
var elem = document.elementFromPoint( 0, -1000 );
assert_true( elem == null, 'negative y, return null' );
}, ' test nagetive y ');
test( function () {
var elem = document.elementFromPoint( 100000, 0 );
assert_true( elem == null );
}, 'test outside of viewport');
test( function () {
var config = {
width: 100,
height: 100,
left: 5,
top: 5
};
var target2 = createElement( 'dom-2' );
config.target = target2;
setPosition( config );
var elem = document.elementFromPoint( 10, 10 );
var elem2 = document.elementFromPoint( 10, 10 );
assert_equals( elem.id, elem2.id );
}, 'test the top of layer');
</script>
</body></html>

View file

@ -0,0 +1,186 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>CSS Test: CSSOM View matchMedia and MediaQueryList</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="http://www.w3.org/TR/cssom-view/#dom-window-matchmedia">
<link rel="help" href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface">
<link rel="help" href="http://www.w3.org/TR/cssom/#serializing-media-queries">
<meta name="flags" content="dom">
<script src="/resources/testharness.js" type="text/javascript"></script>
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
<style type="text/css">
iframe { border: none; }
</style>
</head>
<body>
<noscript>Test not run - javascript required.</noscript>
<div id="log"></div>
<iframe width="200" height="100"></iframe>
<script type="text/javascript">
function reflow(doc) {
doc.body.offsetWidth;
}
var iframe = document.querySelector("iframe");
var iframe_window = window.frames[0];
reflow(iframe_window.document);
test(function(){
assert_inherits(window, "matchMedia");
}, "window.matchMedia exists");
test(function(){
assert_true(window.matchMedia instanceof Function, "FATAL ERROR: The window.matchMedia function is not present. The rest of the testsuite will fail to run.");
}, "window.matchMedia is a Function");
var mql, mql1, mql2, mql3;
test(function(){
mql = window.matchMedia("all");
assert_true(mql instanceof MediaQueryList, "matchMedia(\"all\") returned MediaQueryList object.");
}, "window.matchMedia(\"all\")");
test(function(){
assert_idl_attribute(mql, "media", "Check that MediaQueryList.media exists.");
}, "MediaQueryList.media exists");
test(function(){
assert_readonly(mql, "media", "Check that MediaQueryList.media is readonly.");
}, "MediaQueryList.media is readonly");
test(function(){
assert_equals(mql.media, "all");
}, "MediaQueryList.media for \"all\"");
test(function(){
assert_idl_attribute(mql, "matches", "Check that MediaQueryList.matches exists.");
}, "MediaQueryList.matches exists");
test(function(){
assert_readonly(mql, "matches", "Check that MediaQueryList.matches is readonly.");
}, "MediaQueryList.matches is readonly");
test(function(){
assert_true(mql.matches);
}, "MediaQueryList.matches for \"all\"");
test(function(){
assert_inherits(mql, "addListener");
}, "MediaQueryList.addListener exists");
test(function(){
assert_true(mql.addListener instanceof Function);
}, "MediaQueryList.addListener is a Function");
test(function(){
assert_inherits(mql, "removeListener");
}, "MediaQueryList.removeListener exists");
test(function(){
assert_true(mql.removeListener instanceof Function);
}, "MediaQueryList.removeListener is a Function");
test(function(){
mql = window.matchMedia("::");
assert_true(mql instanceof MediaQueryList, "window.matchMedia(\"::\") returned MediaQueryList object.");
assert_equals(mql.media, "not all", "MediaQueryList.media serialized as \"not all\" from original string with syntax error.");
}, "MediaQueryList.media syntax error");
test(function(){
assert_false(mql.matches);
}, "MediaQueryList.matches for \"not all\"");
test(function(){
mql = iframe_window.matchMedia("(max-width: 199px), all and (min-width: 200px)");
assert_equals(mql.media, "(max-width: 199px), (min-width: 200px)");
assert_true(mql.matches);
}, "MediaQueryList.matches for \"(max-width: 199px), all and (min-width: 200px)\"")
test(function(){
mql = iframe_window.matchMedia("(min-aspect-ratio: 1/1)");
assert_true(mql.matches);
}, "MediaQueryList.matches for \"(min-aspect-ratio: 1/1)\"");
test(function(){
mql = iframe_window.matchMedia("(width: 200px)");
assert_true(mql.matches);
}, "MediaQueryList.matches for \"(width: 200px)\"");
test(function(){
mql1 = iframe_window.matchMedia("(max-height: 50px)");
assert_false(mql1.matches);
}, "MediaQueryList.matches for \"(max-height: 50px)\"");
test(function(){
mql2 = iframe_window.matchMedia("(min-width: 150px)");
assert_true(mql2.matches);
}, "MediaQueryList.matches for \"(min-width: 150px)\"");
var resizeTest = async_test("Resize iframe from 200x100 to 200x50, then to 100x50");
var listenerOrderTest = async_test("Listeners are called in the order which they have been added");
var duplicateListenerTest = async_test("Listener added twice is only called once.");
window.onload = function(){
var rmListener = function(x){
resizeTest.step(function(){
assert_unreached("removeListener was not successful.");
});
};
var dupListener = function(x){
duplicateListenerTest.step(function(){
assert_false(mql1.dupListenerCalled, "Check that this listener has not been called before.");
mql1.dupListenerCalled = true;
});
};
mql1.firstListenerCalled = false;
mql1.dupListenerCalled = false;
// Add listener twice and remove it below. Should not be called.
mql1.addListener(rmListener);
mql1.addListener(rmListener);
// Add listener twice. Should only be called once.
mql1.addListener(dupListener);
mql1.addListener(dupListener);
mql1.addListener(function(x){
resizeTest.step(function(){
assert_equals(x, mql1, "Check that the MediaQueryList passed to the handler is the same that addListener was invoked on.");
assert_true(x.matches, "(max-height: 50px) should now pass.");
assert_true(mql2.matches, "(min-width: 150px) should still pass.");
iframe.width = "100";
});
listenerOrderTest.step(function(){
assert_false(mql1.firstListenerCalled, "Check that this listener is only called once.");
mql1.firstListenerCalled = true;
});
});
mql1.addListener(function(x){
listenerOrderTest.step(function(){
assert_true(mql1.firstListenerCalled, "Check that the listener added last is called last.");
});
listenerOrderTest.done();
});
mql1.removeListener(rmListener);
mql2.addListener(function(x){
duplicateListenerTest.done();
resizeTest.step(function(){
assert_equals(x, mql2, "Check that the MediaQueryList passed to the handler is the same that addListener was invoked on.");
assert_true(mql1.matches, "(max-height: 50px) should still pass.");
assert_false(x.matches, "(min-width: 150px) should now fail.");
});
resizeTest.done();
});
iframe.height = "50";
};
</script>
</body>
</html>

View file

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html><head>
<title>CSS Test: CSSOM View matchMedia addListener</title>
<link href="mailto:pwx.frontend@gmail.com" rel="author" title="Chris Wu">
<link href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface" rel="help">
<meta content="dom" name="flags">
<script src="/resources/testharness.js" type="text/javascript">
<script src="/resources/testharnessreport.js" type="text/javascript" />
<style type="text/css">
iframe { border: none; }
</style>
</head>
<body>
<div id="log"></div>
<iframe width="200" height="100" id="iframe1" ></iframe>
<script>
function reflow(doc) {
doc.body.offsetWidth;
}
var iframe = document.querySelector("iframe");
var iframe_window = window.frames[0];
var iframe1 = document.getElementById("iframe1");
reflow(iframe_window.document);
var i = 0;
var totalCount = 10;
var count = 0;
var divineCount = 10;
var width_list = [201,199];
var mq1 = iframe_window.matchMedia("(max-width:200px)");
mq1.addListener(function(mql){
count = count + 1;
});
var equalAssert = async_test("Check for the correct number of event triggers");
var changeFrameWidth = function(iWidth) {
iframe1.style.width = iWidth + "px";
i = (i === 0) ? 1 : 0;
totalCount = totalCount - 1;
if(totalCount > 0)
{
setTimeout(function(){
changeFrameWidth(width_list[i]);
}, 100);
}
else
{
setTimeout(function(){
equalAssert.step(function(){
assert_equals(divineCount, count, "this will be 10 times of event triggers by change width");
});
equalAssert.done();
}, 100);
}
};
changeFrameWidth(width_list[0]);
</script>
</head><body>
</body></html>

View file

@ -0,0 +1,69 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>CSSOM MediaQueryList Test: Properties and Functions</title>
<link rel="author" title="Joe Balancio" href="mailto:jlbalancio@gmail.com">
<link rel="help" href="http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface">
<link rel="help" href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface">
<meta name="flags" content="dom">
<meta name="assert" content="All properties exist and are readonly. All functions exist and are instances of Function">
<script src="/resources/testharness.js" type="text/javascript"></script>
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
</head>
<body>
<noscript>Test not run - javascript required.</noscript>
<div id="log"></div>
<script type="text/javascript">
var mediaQueryList;
test(
function(){
assert_inherits(window, "matchMedia");
mediaQueryList = window.matchMedia('foo');
}, 'window_inherits_matchmedia', {
assert: ['window.matchMedia is inherited. If this fails, the rest of the test fails.']
}
);
/*
MediaQueryList Functions
*/
test(
function(){
assert_inherits(mediaQueryList, "addListener");
assert_inherits(mediaQueryList, "removeListener");
}, 'mediaquerylist_inherited_functions', {
assert: ['MediaQueryList functions are inherited']
}
);
test(
function(){
assert_true(mediaQueryList.addListener instanceof Function);
assert_true(mediaQueryList.removeListener instanceof Function);
}, 'mediaquerylist_functions', {
assert: ['MediaQueryList functions are instances of Function']
}
);
/*
MediaQueryList Properties
*/
test(
function() {
assert_own_property(mediaQueryList, 'media');
assert_own_property(mediaQueryList, 'matches');
}, 'mediaquerylist_properties', {
assert: ['MediaQueryList properties are owned by window']
}
);
test(
function() {
assert_readonly(mediaQueryList, 'media');
assert_readonly(mediaQueryList, 'matches');
}, 'mediaquerylist_properties_readonly', {
assert: ['MediaQueryList properties are readonly']
}
);
</script>
</body>
</html>

View file

@ -0,0 +1,137 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>CSSOM View —— offsetParent element test</title>
<link href="mailto:1988wangxiao@gmail.com" rel="author" title="neo_and_rayi">
<link href="http://www.w3.org/TR/cssom-view/#extensions-to-the-htmlelement-interface" rel="help">
<link href="http://www.w3.org/TR/cssom-view/#dom-htmlelement-offsetparent" rel="help">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script id="metadata_cache">/*
{
"Valid the algorithm rule of offsetParent check step 1": { "assert": "The offsetParent attribute algorithm rule checking passed!" },
"Valid the algorithm rule of offsetParent check step 2": { "assert": "The offsetParent attribute algorithm rule checking passed!" }
}
*/</script>
<style>
#fixed {
position: fixed;
}
#none-element {
display:none;
}
#relative-element {
position: relative;
}
#absolute-element {
position: absolute;
}
</style>
</head>
<body>
<div id="body-element-child"></div>
<div id="relative-element">
<div id="relative-element-child"></div>
</div>
<div id="absolute-element">
<div id="absolute-element-child"></div>
</div>
<table id="table-element">
<caption>
<div id="caption-element-child"></div>
</caption>
<tbody>
<tr id="table-element-tr">
<td id="table-element-td">
<span id="table-element-child"></span>
</td>
</tr>
</tbody>
</table>
<div id="none-element">
<a href="#" id="none-element-child-a"></a>
<p id="none-element-child-p"></p>
<video id="none-element-child-video"></video>
<audio id="none-element-child-audio"></audio>
<canvas id="none-element-child-canvas"></canvas>
<svg id="none-element-child-svg"></svg>
</div>
<div id="fixed">
</div>
<div id="log"></div>
<script type="text/javascript">
var getStyle = window.getComputedStyle;
var html = document.documentElement;
var body = document.body;
var fixed_element = document.getElementById('fixed');
var none_element = document.getElementById('none-element');
var none_element_child_a = document.getElementById('none-element-child-a');
var none_element_child_p = document.getElementById('none-element-child-p');
var none_element_child_video = document.getElementById('none-element-child-video');
var none_element_child_audio = document.getElementById('none-element-child-audio');
var none_element_child_canvas = document.getElementById('none-element-child-canvas');
var none_element_child_svg = document.getElementById('none-element-child-svg');
var relative_element = document.getElementById('relative-element');
var absolute_element = document.getElementById('absolute-element');
var td_element = document.getElementsByTagName('td')[0];
var body_element_child = document.getElementById('body-element-child');
var relative_element_child = document.getElementById('relative-element-child');
var absolute_element_child = document.getElementById('absolute-element-child');
var table_element_child = document.getElementById('table-element-child');
var caption_element_child = document.getElementById('caption-element-child');
var table_element_tr = document.getElementById('table-element-tr');
var table_element = document.getElementById('table-element');
test(function() {
assert_equals(html.offsetParent,null);
assert_equals(body.offsetParent,null);
assert_equals(fixed_element.offsetParent,null);
assert_equals(none_element.offsetParent,null);
assert_equals(none_element_child_a.offsetParent,null);
assert_equals(none_element_child_p.offsetParent,null);
assert_equals(none_element_child_video.offsetParent,null);
assert_equals(none_element_child_audio.offsetParent,null);
assert_equals(none_element_child_canvas.offsetParent,null);
assert_equals(none_element_child_svg.offsetParent,null);
}, "Valid the algorithm rule of offsetParent check step 1",
{ assert: "The offsetParent attribute algorithm rule checking passed!" }
);
test(function() {
assert_equals(body_element_child.offsetParent,body);
assert_equals(window.getComputedStyle(relative_element).position,'relative');
assert_equals(relative_element_child.offsetParent,relative_element);
assert_equals(window.getComputedStyle(absolute_element).position,'absolute');
assert_equals(absolute_element_child.offsetParent,absolute_element);
assert_equals(window.getComputedStyle(td_element).position,'static');
assert_equals(table_element_child.offsetParent,td_element);
assert_equals(window.getComputedStyle(table_element_tr).position,'static');
assert_equals(table_element_tr.offsetParent,table_element);
assert_equals(window.getComputedStyle(caption_element_child).position,'static');
assert_equals(caption_element_child.offsetParent,table_element);
assert_equals(window.getComputedStyle(td_element).position,'static');
assert_equals(td_element.offsetParent,table_element);
}, "Valid the algorithm rule of offsetParent check step 2",
{ assert: "The offsetParent attribute algorithm rule checking passed!" }
);
</script>
</body></html>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>CSSOM View Module Level 1 Test Suite Reftest Index</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite Reftest Index</h1>
<table width="100%">
<col id="test-column">
<col id="ref-column">
<col id="flags-column">
<thead>
<tr>
<th>Test</th>
<th>Reference</th>
<th>Flags</th>
</tr>
</thead>
</table>
</body>
</html>

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,146 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>CSS Test: CSSOM View scrollWidth and scrollHeight</title>
<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org">
<link rel="help" href="http://www.w3.org/TR/cssom-view/#dom-element-scrollwidth">
<meta name="flags" content="dom">
<script src="/resources/testharness.js" type="text/javascript"></script>
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
<style type="text/css">
#elemSimple, #elemOverflow, #elemNestedOverflow {
border:1px solid black;
overflow:hidden;
width:200px;
height:40px;
padding-bottom:50px;
padding-right:40px;
}
#elemSimple > div {
background:yellow;
width:60px;
height:30px;
}
#elemOverflow > div {
background:yellow;
width:250px;
height:150px;
}
#elemNestedOverflow > div {
background:yellow;
width:60px;
height:30px;
}
#elemNestedOverflow > div > div {
background:blue;
width:250px;
height:150px;
}
</style>
<script id="metadata_cache" type="text/javascript">/*
{
"elemSimple.clientHeight is the height of the padding edge": {},
"elemSimple.scrollHeight is its clientHeight": {},
"elemSimple.clientWidth is the width of the padding edge": {},
"elemSimple.scrollWidth is its clientWidth": {},
"elemOverflow.clientHeight is the height of the padding edge": {},
"elemOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)": {},
"elemOverflow.clientWidth is the width of the padding edge": {},
"elemOverflow.scrollHeight is the width of its scrolled contents (ignoring padding, since we overflowed)": {},
"elemNestedOverflow.clientHeight is the height of the padding edge": {},
"elemNestedOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)": {},
"elemNestedOverflow.clientWidth is the height of the padding edge": {},
"elemNestedOverflow.scrollWidth is the width of its scrolled contents (ignoring padding, since we overflowed)": {}
*/ </script>
</head>
<body>
<noscript>Test not run - javascript required.</noscript>
<div id="log"></div>
<div id="elemSimple">
<div></div>
</div>
<div id="elemOverflow">
<div></div>
</div>
<div id="elemNestedOverflow">
<div>
<div></div>
</div>
</div>
<script type="text/javascript">
var elemSimple = document.getElementById("elemSimple");
var elemOverflow = document.getElementById("elemOverflow");
var elemNestedOverflow = document.getElementById("elemNestedOverflow");
test(function(){
assert_equals(elemSimple.clientHeight, 90);
}, "elemSimple.clientHeight is the height of the padding edge");
test(function(){
assert_equals(elemSimple.scrollHeight, 90);
}, "elemSimple.scrollHeight is its clientHeight");
test(function(){
assert_equals(elemSimple.clientWidth, 240);
}, "elemSimple.clientWidth is the width of the padding edge");
test(function(){
assert_equals(elemSimple.scrollWidth, 240);
}, "elemSimple.scrollWidth is its clientWidth");
test(function(){
assert_equals(elemOverflow.clientHeight, 90);
}, "elemOverflow.clientHeight is the height of the padding edge");
/* This test differs from the spec. Opera and Webkit meet the spec, IE9 and Firefox
give the result here. It seems that in this case Opera and Webkit place
the padding-bottom below elemOverflow's child (i.e. below elemOverflow's bottom border);
you can scroll to it. IE9 and Firefox do not. I believe this is a Webkit/Opera bug
(If you remove overflow:hidden then the padding-bottom moves back to be above the bottom
border, as expected.)
The underlying issue seems to be whether bottom padding on a scrollable element is
always placed at the element's bottom border and not scrolled, or else deemed to
belong to the scrolled content and placed below the scrolled element's children.
Commenting out for now, because this is not really a CSSOM issue, but an issue
over the layout of elements with 'overflow'.
test(function(){
assert_equals(elemOverflow.scrollHeight, 150);
}, "elemOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)");
*/
test(function(){
assert_equals(elemOverflow.clientWidth, 240);
}, "elemOverflow.clientWidth is the width of the padding edge");
/* This test differs from the spec. All major browsers give the result here, ignoring
the right padding.
*/
test(function(){
assert_equals(elemOverflow.scrollWidth, 250);
}, "elemOverflow.scrollHeight is the width of its scrolled contents (ignoring padding, since we overflowed)");
test(function(){
assert_equals(elemNestedOverflow.clientHeight, 90);
}, "elemNestedOverflow.clientHeight is the height of the padding edge");
/* This test differs from the spec. All major browsers give the result here.
*/
test(function(){
assert_equals(elemNestedOverflow.scrollHeight, 150);
}, "elemNestedOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)");
test(function(){
assert_equals(elemNestedOverflow.clientWidth, 240);
}, "elemNestedOverflow.clientWidth is the height of the padding edge");
/* This test differs from the spec. All major browsers give the result here, ignoring
the right padding.
*/
test(function(){
assert_equals(elemNestedOverflow.scrollWidth, 250);
}, "elemNestedOverflow.scrollWidth is the width of its scrolled contents (ignoring padding, since we overflowed)");
</script>
</body>
</html>

View file

@ -0,0 +1,136 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>CSS Test: CSSOM View scrollWidth/scrollHeight (for nonscrollable elements)</title>
<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org">
<link rel="help" href="http://www.w3.org/TR/cssom-view/#dom-element-scrollwidth">
<meta name="flags" content="dom">
<script src="/resources/testharness.js" type="text/javascript"></script>
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
<style type="text/css">
#elemSimple, #elemOverflow, #elemNestedOverflow {
border:1px solid black;
width:200px;
height:40px;
padding-bottom:50px;
padding-right:40px;
}
#elemSimple > div {
background:yellow;
width:60px;
height:30px;
}
#elemOverflow > div {
background:yellow;
width:250px;
height:150px;
}
#elemNestedOverflow > div {
background:yellow;
width:60px;
height:30px;
}
#elemNestedOverflow > div > div {
background:blue;
width:250px;
height:150px;
}
</style>
<script id="metadata_cache" type="text/javascript">/*
{
"elemSimple.clientHeight is the height of the padding edge": {},
"elemSimple.scrollHeight is its clientHeight": {},
"elemSimple.clientWidth is the width of the padding edge": {},
"elemSimple.scrollWidth is its clientWidth": {},
"elemOverflow.clientHeight is the height of the padding edge": {},
"elemOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)": {},
"elemOverflow.clientWidth is the width of the padding edge": {},
"elemOverflow.scrollHeight is the width of its scrolled contents (ignoring padding, since we overflowed)": {},
"elemNestedOverflow.clientHeight is the height of the padding edge": {},
"elemNestedOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)": {},
"elemNestedOverflow.clientWidth is the height of the padding edge": {},
"elemNestedOverflow.scrollWidth is the width of its scrolled contents (ignoring padding, since we overflowed)": {}
*/ </script>
</head>
<body>
<noscript>Test not run - javascript required.</noscript>
<div id="log"></div>
<div id="elemSimple">
<div></div>
</div>
<div id="elemOverflow">
<div></div>
</div>
<div id="elemNestedOverflow">
<div>
<div></div>
</div>
</div>
<script type="text/javascript">
var elemSimple = document.getElementById("elemSimple");
var elemOverflow = document.getElementById("elemOverflow");
var elemNestedOverflow = document.getElementById("elemNestedOverflow");
test(function(){
assert_equals(elemSimple.clientHeight, 90);
}, "elemSimple.clientHeight is the height of the padding edge");
test(function(){
assert_equals(elemSimple.scrollHeight, 90);
}, "elemSimple.scrollHeight is its clientHeight");
test(function(){
assert_equals(elemSimple.clientWidth, 240);
}, "elemSimple.clientWidth is the width of the padding edge");
test(function(){
assert_equals(elemSimple.scrollWidth, 240);
}, "elemSimple.scrollWidth is its clientWidth");
test(function(){
assert_equals(elemOverflow.clientHeight, 90);
}, "elemOverflow.clientHeight is the height of the padding edge");
/* This test differs from the spec. All major browsers give the result here, ignoring
the bottom padding.
*/
test(function(){
assert_equals(elemOverflow.scrollHeight, 150);
}, "elemOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)");
test(function(){
}, "elemOverflow.clientWidth is the width of the padding edge");
assert_equals(elemOverflow.clientWidth, 240);
/* This test differs from the spec. All major browsers give the result here, ignoring
the right padding.
*/
test(function(){
assert_equals(elemOverflow.scrollWidth, 250);
}, "elemOverflow.scrollHeight is the width of its scrolled contents (ignoring padding, since we overflowed)");
test(function(){
assert_equals(elemNestedOverflow.clientHeight, 90);
}, "elemNestedOverflow.clientHeight is the height of the padding edge");
/* This test differs from the spec. All major browsers give the result here, ignoring the
bottom padding.
*/
test(function(){
assert_equals(elemNestedOverflow.scrollHeight, 150);
}, "elemNestedOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)");
test(function(){
assert_equals(elemNestedOverflow.clientWidth, 240);
}, "elemNestedOverflow.clientWidth is the height of the padding edge");
/* This test differs from the spec. All major browsers give the result here, ignoring
the right padding.
*/
test(function(){
assert_equals(elemNestedOverflow.scrollWidth, 250);
}, "elemNestedOverflow.scrollWidth is the width of its scrolled contents (ignoring padding, since we overflowed)");
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

View file

@ -0,0 +1,29 @@
CSS Global Support Directory
============================
This directory contains common support files (such as images and external
style sheets). These are sync'ed into the support directories of all our
test suites. If you have test-suite-specific support files, please add
them to the appropriate test-suite-specific support/ directory.
If you add to a support/ directory, please run the tools/supportprop.py
script from the top of the repository to cascade support files into the
lower-level support directories.
Description of the Common Support File Collection
-------------------------------------------------
The 1x1-* images are all exactly one pixel.
The swatch-* images all use 15x15 cells.
The square-* images all use 15x15 cells with one pixel borders.
The pattern-* images use cells of various sizes:
pattern-gg-gr.png 20x20
pattern-grg-rgr-grg.png 20x20
pattern-rgr-grg-rgr.png 20x20
pattern-tr.png 15x15
pattern-grg-rrg-rgg.png 15x15

View file

@ -0,0 +1 @@
.a { color: green; }

View file

@ -0,0 +1 @@
.b { color: green; }

View file

@ -0,0 +1 @@
.c { color: red; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1 @@
.import { color: green; }

View file

@ -0,0 +1 @@
.import { color: red; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,94 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>CSSOM View Module Level 1 Test Suite</title>
<style type="text/css">
@import "http://www.w3.org/StyleSheets/TR/base.css";
@import "../indices.css";
</style>
</head>
<body>
<h1>CSSOM View Module Level 1 Test Suite By Chapter</h1>
<p>This index contains both
<a href="http://wiki.csswg.org/test/selftest">self-describing tests</a>
and reftests.
A separate <a href="reftest-toc.htm">alphabetical reftest index</a>
is provided for tests in <a href="http://wiki.csswg.org/test/reftest">reftest
format</a> along with the <a href="reftest.list">reftest manifest</a>.</p>
<table>
<tbody id="s1">
<tr><th><a href="chapter-1.htm">Chapter 1 -
Background</a></th>
<td>(0 Tests)</td></tr>
</tbody>
<tbody id="s2">
<tr><th><a href="chapter-2.htm">Chapter 2 -
Conformance</a></th>
<td>(0 Tests)</td></tr>
</tbody>
<tbody id="s3">
<tr><th><a href="chapter-3.htm">Chapter 3 -
Terminology</a></th>
<td>(0 Tests)</td></tr>
</tbody>
<tbody id="s4">
<tr><th><a href="chapter-4.htm">Chapter 4 -
Common Infrastructure</a></th>
<td>(0 Tests)</td></tr>
</tbody>
<tbody id="s5">
<tr><th><a href="chapter-5.htm">Chapter 5 -
Extensions to the Window Interface</a></th>
<td>(13 Tests)</td></tr>
</tbody>
<tbody id="s6">
<tr><th><a href="chapter-6.htm">Chapter 6 -
Extensions to the Document Interface</a></th>
<td>(3 Tests)</td></tr>
</tbody>
<tbody id="s7">
<tr><th><a href="chapter-7.htm">Chapter 7 -
Extensions to the Element Interface</a></th>
<td>(6 Tests)</td></tr>
</tbody>
<tbody id="s8">
<tr><th><a href="chapter-8.htm">Chapter 8 -
Extensions to the HTMLElement Interface</a></th>
<td>(1 Tests)</td></tr>
</tbody>
<tbody id="s9">
<tr><th><a href="chapter-9.htm">Chapter 9 -
Excensions to the HTMLImageElement Interface</a></th>
<td>(0 Tests)</td></tr>
</tbody>
<tbody id="s10">
<tr><th><a href="chapter-10.htm">Chapter 10 -
Extensions to the Range Interface</a></th>
<td>(0 Tests)</td></tr>
</tbody>
<tbody id="s11">
<tr><th><a href="chapter-11.htm">Chapter 11 -
Extensions to the MouseEvent Interface</a></th>
<td>(0 Tests)</td></tr>
</tbody>
<tbody id="s12">
<tr><th><a href="chapter-12.htm">Chapter 12 -
Geometry</a></th>
<td>(0 Tests)</td></tr>
</tbody>
<tbody id="s13">
<tr><th><a href="chapter-13.htm">Chapter 13 -
Events</a></th>
<td>(0 Tests)</td></tr>
</tbody>
<tbody id="s14">
<tr><th><a href="chapter-14.htm">Chapter 14 -
CSS properties</a></th>
<td>(0 Tests)</td></tr>
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View - 6 - scrollIntoView tests</title>
<meta charset="utf-8">
<link href="mailto:pwx.frontend@gmail.com" rel="author" title="Chris Wu">
<link href="http://www.w3.org/TR/cssom-view/#dom-element-scrollintoview" rel="help">
<meta content="dom" name="flags">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
#phitem{height: 2000px;}
#viewitem{width:300px;height:200px;margin:0 auto;background-color: lightgreen;}
</style>
</head>
<body>
<div id="myDiv">
<div id="phitem"></div>
<div id="viewitem"></div>
</div>
<div id="log"></div>
<script>
var asytest = async_test('check scrollIntoView');
asytest.step(function(){
var viewitem = document.getElementById('viewitem');
viewitem.scrollIntoView();
assert_true(window.pageYOffset + window.innerHeight > viewitem.offsetTop, "The element isn't in the viewport")
})
asytest.done()
</script>
</body></html>

View file

@ -0,0 +1,97 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>CSSOM Window Test: Properties and Functions</title>
<link rel="author" title="Joe Balancio" href="mailto:jlbalancio@gmail.com">
<link rel="help" href="http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface">
<meta name="flags" content="dom">
<meta name="assert" content="All properties exist and are readonly. All functions exist and are instances of Function">
<script src="/resources/testharness.js" type="text/javascript"></script>
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
</head>
<body>
<noscript>Test not run - javascript required.</noscript>
<div id="log"></div>
<script id="metadata_cache">/*
{
"window_inherited_functions": {
"assert": ["window functions are inherited"]
},
"window_functions": {
"assert": ["window functions are instances of Function"]
},
"window_properties": {
"assert": ["window properties are owned by window"]
},
"window_properties_readonly": {
"assert": ["window properties are readonly"]
}
}
*/</script>
<script type="text/javascript">
/*
Window Functions
*/
test(
function(){
assert_inherits(window, "matchMedia");
assert_inherits(window, "scroll");
assert_inherits(window, "scrollTo");
assert_inherits(window, "scrollBy");
}, 'window_inherited_functions', {
assert: ['window functions are inherited']
}
);
test(
function(){
assert_true(window.matchMedia instanceof Function);
assert_true(window.scroll instanceof Function);
assert_true(window.scrollTo instanceof Function);
assert_true(window.scrollBy instanceof Function);
}, 'window_functions', {
assert: ['window functions are instances of Function']
}
);
/*
Window Properties
*/
test(
function() {
assert_own_property(window, 'screen');
assert_own_property(window, 'innerWidth');
assert_own_property(window, 'innerHeight');
assert_own_property(window, 'scrollX');
assert_own_property(window, 'pageXOffset');
assert_own_property(window, 'scrollY');
assert_own_property(window, 'pageYOffset');
assert_own_property(window, 'screenX');
assert_own_property(window, 'screenY');
assert_own_property(window, 'outerWidth');
assert_own_property(window, 'outerHeight');
}, 'window_properties', {
assert: ['window properties are owned by window']
}
);
test(
function() {
assert_readonly(window, 'screen');
assert_readonly(window, 'innerWidth');
assert_readonly(window, 'innerHeight');
assert_readonly(window, 'scrollX');
assert_readonly(window, 'pageXOffset');
assert_readonly(window, 'scrollY');
assert_readonly(window, 'pageYOffset');
assert_readonly(window, 'screenX');
assert_readonly(window, 'screenY');
assert_readonly(window, 'outerWidth');
assert_readonly(window, 'outerHeight');
}, 'window_properties_readonly', {
assert: ['window properties are readonly']
}
);
</script>
</body>
</html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View - 4.2 - screen.height immutability</title>
<link href="mailto:neils.christoffersen@gmail.com" rel="author" title="Neils Christoffersen">
<link href="http://www.w3.org/TR/cssom-view/#the-screen-interface" rel="help">
<meta content="dom" name="flags">
<meta content="screen.height is immutable" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
var originalVal = window.screen.height;
// try to set window.screen.height
window.screen.height = 0;
// verify window.screen.height didn't change
test(function() {
assert_equals(window.screen.height, originalVal, "window.screen.height should be immutable")
}, "immutability test");
</script>
</body></html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View - 4.2 - screen.height mutation throws exception</title>
<link href="mailto:neils.christoffersen@gmail.com" rel="author" title="Neils Christoffersen">
<link href="http://www.w3.org/TR/cssom-view/#the-screen-interface" rel="help">
<meta content="dom" name="flags">
<meta content="screen.height mutation throws exception" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
test(function() {
assert_throws(null, function() {
window.screen.height = 0
}), "chaning window.screen.height should throw exception"
}, "mutation exception test");
</script>
</body></html>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View - 4.2 - screen.height range tests</title>
<link href="mailto:neils.christoffersen@gmail.com" rel="author" title="Neils Christoffersen">
<link href="http://www.w3.org/TR/cssom-view/#the-screen-interface" rel="help">
<meta content="dom" name="flags">
<meta content="window.screen.height has sensible values" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
var upperBound = 50000;
test(
function() {
assert_not_equals(window.screen.height, 0, "window.screen.height is zero")
}, "zero check"
);
test(
function() {
assert_true(window.screen.height > 0, "window.screen.height shouldn't be negative")
}, "positive check"
);
test(
function() {
assert_true(window.screen.height < upperBound, "window.screen.height shouldn't be so large")
}, "upper bound check"
);
</script>
</body></html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View - 4.2 - screen.width immutability</title>
<link href="mailto:neils.christoffersen@gmail.com" rel="author" title="Neils Christoffersen">
<link href="http://www.w3.org/TR/cssom-view/#the-screen-interface" rel="help">
<meta content="dom" name="flags">
<meta content="screen.width is immutable" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
var originalVal = window.screen.width;
// try to set window.screen.width
window.screen.width = 0;
// verify window.screen.width didn't change
test(function() {
assert_equals(window.screen.width, originalVal, "window.screen.width should be immutable")
}, "immutability test");
</script>
</body></html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View - 4.2 - screen.width mutation throws exception</title>
<link href="mailto:neils.christoffersen@gmail.com" rel="author" title="Neils Christoffersen">
<link href="http://www.w3.org/TR/cssom-view/#the-screen-interface" rel="help">
<meta content="dom" name="flags">
<meta content="screen.width mutation throws exception" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
test(function() {
assert_throws(null, function() {
window.screen.width = 0
}), "chaning window.screen.width should throw exception"
}, "mutation exception test");
</script>
</body></html>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html><head>
<title>CSSOM View - 4.2 - screen.width range tests</title>
<link href="mailto:neils.christoffersen@gmail.com" rel="author" title="Neils Christoffersen">
<link href="http://www.w3.org/TR/cssom-view/#the-screen-interface" rel="help">
<meta content="dom" name="flags">
<meta content="window.screen.width has sensible values" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
var upperBound = 50000;
test(
function() {
assert_not_equals(window.screen.width, 0, "window.screen.width is zero")
}, "zero check"
);
test(
function() {
assert_true(window.screen.width > 0, "window.screen.width shouldn't be negative")
}, "positive check"
);
test(
function() {
assert_true(window.screen.width < upperBound, "window.screen.width shouldn't be so large")
}, "upper bound check"
);
</script>
</body></html>