Update CSS tests to revision 0698c2aa9ead844b6d7d10eafb096cb1118e13ef

This commit is contained in:
Ms2ger 2015-12-09 01:48:05 -05:00
parent 9aa1b1e408
commit 35c74aecc2
11290 changed files with 92400 additions and 49214 deletions

View file

@ -4,7 +4,7 @@
<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>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
.box{
position: absolute;
@ -37,7 +37,8 @@
},'getBox');
function getBox(id){
return document.getElementById(id);
}
}
</script>
</body></html>

View file

@ -4,7 +4,7 @@
<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>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
</style>
</head>
@ -18,4 +18,5 @@
},'matchMedia');
</script>
</body></html>

View file

@ -4,7 +4,7 @@
<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>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
</style>
</head>
@ -29,4 +29,5 @@
}
</script>
</body></html>

View file

@ -18,7 +18,7 @@
text-align: center;
line-height: 188px;
}
</style>
</style>
</head>
<body>
<div id="testItem">test item</div>
@ -35,7 +35,7 @@
assert_equals(titem.right - titem.left, titem.width, "width should equal right minus left")
}, "getBoundingClientRect() should return a DOMRect where width=right-left"
)
</script>
</script>
</body></html>

View file

@ -6,7 +6,7 @@
<meta content="dom" name="flags">
<meta content="window screen interface" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
@ -19,21 +19,22 @@
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);},
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);},
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);},
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);},
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);},
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

@ -4,16 +4,16 @@
<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">
<meta content="elementFromPoint returns correct element" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#targetDiv {
position: absolute;
top: 10;
left: 10;
height: 100px;
width: 100px;
width: 100px;
}
</style>
</head>
@ -24,10 +24,11 @@
</div>
<script>
var element = document.elementFromPoint(15, 15);
test ( function() {
assert_equals(element.id, "targetDiv", "elementFromPoint didn't return the correct element");
});
</script>
});
</script>
</body></html>

View file

@ -95,8 +95,8 @@
];
var i = 0, len = wrap.length, item;
for ( ; i < len; i++ ) {
item = wrap[ i ];
test( function () {
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);
}

View file

@ -4,9 +4,9 @@
<link href="mailto:michael@notriddle.com" rel="author" title="Michael Howell">
<link href="https://drafts.csswg.org/cssom-view-1/#dom-htmlelement-offsetwidth" rel="help">
<meta content="dom" name="flags">
<meta content="element.offsetWidth returns 0 when there is no documentElement." name="assert">
<meta content="element.offsetWidth returns 0 when there is no documentElement." name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv">...</div>
@ -21,7 +21,7 @@
document.documentElement.remove();
assert_equals(el.offsetWidth, 0, "new element has offset width not equal to zero after removing documentElement");
});
</script>
</script>
</body></html>

View file

@ -29,9 +29,9 @@
var divineCount = 10;
var width_list = [201,199];
var mq1 = iframe_window.matchMedia("(max-width:200px)");
mq1.addListener(function(mql){
count = count + 1;
mq1.addListener(function(mql){
count = count + 1;
});

View file

@ -47,7 +47,7 @@
<caption>
<div id="caption-element-child"></div>
</caption>
<tbody>
<tr id="table-element-tr">
<td id="table-element-td">
@ -112,7 +112,7 @@ test(function() {
{ assert: "The offsetParent attribute algorithm rule checking passed!" }
);
test(function() {
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);
@ -123,9 +123,9 @@ test(function() {
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(caption_element_child.offsetParent,table_element);
assert_equals(window.getComputedStyle(td_element).position,'static');
assert_equals(td_element.offsetParent,table_element);
assert_equals(td_element.offsetParent,table_element);
}, "Valid the algorithm rule of offsetParent check step 2",
{ assert: "The offsetParent attribute algorithm rule checking passed!" }
);

View file

@ -10,7 +10,7 @@
<style type="text/css">
#phitem{height: 2000px;}
#viewitem{width:300px;height:200px;margin:0 auto;background-color: lightgreen;}
</style>
</style>
</head>
<body>
<div id="myDiv">
@ -26,6 +26,7 @@
assert_true(window.pageYOffset + window.innerHeight > viewitem.offsetTop, "The element isn't in the viewport")
})
asytest.done()
</script>
</script>
</body></html>

View file

@ -4,24 +4,24 @@
<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">
<meta content="screen.height is immutable" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.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>
}, "immutability test");
</script>
</body></html>

View file

@ -4,9 +4,9 @@
<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">
<meta content="screen.height mutation throws exception" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
@ -14,10 +14,10 @@
<script>
test(function() {
assert_throws(null, function() {
window.screen.height = 0
window.screen.height = 0
}), "chaning window.screen.height should throw exception"
}, "mutation exception test");
</script>
}, "mutation exception test");
</script>
</body></html>

View file

@ -4,34 +4,34 @@
<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">
<meta content="window.screen.height has sensible values" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
var upperBound = 50000;
test(
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>
</script>
</body></html>

View file

@ -4,24 +4,24 @@
<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">
<meta content="screen.width is immutable" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.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>
}, "immutability test");
</script>
</body></html>

View file

@ -4,9 +4,9 @@
<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">
<meta content="screen.width mutation throws exception" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
@ -14,10 +14,10 @@
<script>
test(function() {
assert_throws(null, function() {
window.screen.width = 0
window.screen.width = 0
}), "chaning window.screen.width should throw exception"
}, "mutation exception test");
</script>
}, "mutation exception test");
</script>
</body></html>

View file

@ -4,34 +4,34 @@
<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">
<meta content="window.screen.width has sensible values" name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
var upperBound = 50000;
test(
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>
</script>
</body></html>

View file

@ -3,51 +3,51 @@
# http://test.csswg.org/suites/cssom-view-1_dev/DATESTAMP/
# See http://wiki.csswg.org/test/implementation-report for instructions
testname revision result comment
html/caretposition-001.htm ec2bdc9c730d65a0319935187debd4c6811d57b1 ?
xhtml1/caretposition-001.xht ec2bdc9c730d65a0319935187debd4c6811d57b1 ?
html/cssom-getboundingclientrect-001.htm 3267558f1f0dd9d519f59c9d91b757782bf40bc6 ?
xhtml1/cssom-getboundingclientrect-001.xht 3267558f1f0dd9d519f59c9d91b757782bf40bc6 ?
html/caretposition-001.htm be738bad5c7616acd40f009658e84f3c653f4273 ?
xhtml1/caretposition-001.xht be738bad5c7616acd40f009658e84f3c653f4273 ?
html/cssom-getboundingclientrect-001.htm e401a698b0b6d4d9b3d4630733eaa42f0b82acc3 ?
xhtml1/cssom-getboundingclientrect-001.xht e401a698b0b6d4d9b3d4630733eaa42f0b82acc3 ?
html/cssom-getboundingclientrect-002.htm 29a0bd1179d5cbf42b4cb21706022d3328b6b134 ?
xhtml1/cssom-getboundingclientrect-002.xht 29a0bd1179d5cbf42b4cb21706022d3328b6b134 ?
html/cssom-getclientrects.htm 2b2a3a320d19265eab4e6a5a05b20f43c0565e21 ?
xhtml1/cssom-getclientrects.xht 2b2a3a320d19265eab4e6a5a05b20f43c0565e21 ?
html/cssom-view-window-screen-interface.htm 4aaebe055d605dc7f915dac2039087fd7b018439 ?
xhtml1/cssom-view-window-screen-interface.xht 4aaebe055d605dc7f915dac2039087fd7b018439 ?
html/elementfrompoint-001.htm 52a4d67631063dcb64c8d1bba460430195f3877a ?
xhtml1/elementfrompoint-001.xht 52a4d67631063dcb64c8d1bba460430195f3877a ?
html/elementfromposition.htm 78b980b1011fb13154d1ddf81eaf962f59bfa0d7 ?
xhtml1/elementfromposition.xht 78b980b1011fb13154d1ddf81eaf962f59bfa0d7 ?
html/htmlelement-offset-width-001.htm dded4e35be63095033534b9074bd6b09e2cdcc58 ?
xhtml1/htmlelement-offset-width-001.xht dded4e35be63095033534b9074bd6b09e2cdcc58 ?
html/cssom-view-window-screen-interface.htm 79daf2ef9d0330e2b53c927d08176233fa5d1536 ?
xhtml1/cssom-view-window-screen-interface.xht 79daf2ef9d0330e2b53c927d08176233fa5d1536 ?
html/elementfrompoint-001.htm 00242151f0ccec94846f3beae1d9e3a3bc3590f0 ?
xhtml1/elementfrompoint-001.xht 00242151f0ccec94846f3beae1d9e3a3bc3590f0 ?
html/elementfromposition.htm 0f1ddd54f1c9a31666c541814998c0ae035a4703 ?
xhtml1/elementfromposition.xht 0f1ddd54f1c9a31666c541814998c0ae035a4703 ?
html/htmlelement-offset-width-001.htm 2aa3ebf3ff6268a05bc53f09d8f54c32b9f3dac8 ?
xhtml1/htmlelement-offset-width-001.xht 2aa3ebf3ff6268a05bc53f09d8f54c32b9f3dac8 ?
html/matchmedia.htm 968cc094c6258392a6d1f8dd5eb814f43ed6692f ?
xhtml1/matchmedia.xht 968cc094c6258392a6d1f8dd5eb814f43ed6692f ?
html/matchmediaaddlistener.htm ff9c78237902cf841131fcc2a30344dd737e1f55 ?
xhtml1/matchmediaaddlistener.xht ff9c78237902cf841131fcc2a30344dd737e1f55 ?
html/matchmediaaddlistener.htm 60aa2e2b20aaa1c20dbece338b8d5583a4456436 ?
xhtml1/matchmediaaddlistener.xht 60aa2e2b20aaa1c20dbece338b8d5583a4456436 ?
html/media-query-list-interface.htm bf107020b2904718b522b5b57fad03c51c059a1e ?
xhtml1/media-query-list-interface.xht bf107020b2904718b522b5b57fad03c51c059a1e ?
html/mediaquerylist-001.htm 5e0c1c5758733b0f2887620db9ce20a6aa00a00c ?
xhtml1/mediaquerylist-001.xht 5e0c1c5758733b0f2887620db9ce20a6aa00a00c ?
html/offsetparent_element_test.htm 42948177cf68f659f7e9dd5147032169558760b1 ?
xhtml1/offsetparent_element_test.xht 42948177cf68f659f7e9dd5147032169558760b1 ?
html/screen-pixeldepth-screen-colordepth001.htm 6747335ed4736a1e6d2dcd446c9c28a0923b2396 ?
xhtml1/screen-pixeldepth-screen-colordepth001.xht 6747335ed4736a1e6d2dcd446c9c28a0923b2396 ?
html/mediaquerylist-001.htm 76154c3e1d04e0f61bcabbd17587e4b35f926a36 ?
xhtml1/mediaquerylist-001.xht 76154c3e1d04e0f61bcabbd17587e4b35f926a36 ?
html/offsetparent_element_test.htm 7942a400b775948ca727fc389f224e11721bef2e ?
xhtml1/offsetparent_element_test.xht 7942a400b775948ca727fc389f224e11721bef2e ?
html/screen-pixeldepth-screen-colordepth001.htm f61948030aa33e4aefcc760e4b698e20e1b0912d ?
xhtml1/screen-pixeldepth-screen-colordepth001.xht f61948030aa33e4aefcc760e4b698e20e1b0912d ?
html/scrollwidthheight.htm dc82a1c1dfddec949ed64ab7ffb8c30625b911b2 ?
xhtml1/scrollwidthheight.xht dc82a1c1dfddec949ed64ab7ffb8c30625b911b2 ?
html/scrollwidthheightwhennotscrollable.htm 5d33a8bab0ff6b187dd544afaefce6b7662128b5 ?
xhtml1/scrollwidthheightwhennotscrollable.xht 5d33a8bab0ff6b187dd544afaefce6b7662128b5 ?
html/ttwf-scrollintoview.htm 3b360b57241e529014b011aec1fd93640f08ffd5 ?
xhtml1/ttwf-scrollintoview.xht 3b360b57241e529014b011aec1fd93640f08ffd5 ?
html/ttwf-scrollintoview.htm 39b4f7131eaae2baedbad247d316af93dda5e0f0 ?
xhtml1/ttwf-scrollintoview.xht 39b4f7131eaae2baedbad247d316af93dda5e0f0 ?
html/window-interface.htm 40732ddf8d7cd2185d6a6cb9d57d9dcbd2d73c42 ?
xhtml1/window-interface.xht 40732ddf8d7cd2185d6a6cb9d57d9dcbd2d73c42 ?
html/window-screen-height-immutable.htm a5a7e61d3e4844b0e4f6ed83277fda329652e9b6 ?
xhtml1/window-screen-height-immutable.xht a5a7e61d3e4844b0e4f6ed83277fda329652e9b6 ?
html/window-screen-height-mutation-throws.htm 6846cf8927a3214496b4996c95bde1eb3e657552 ?
xhtml1/window-screen-height-mutation-throws.xht 6846cf8927a3214496b4996c95bde1eb3e657552 ?
html/window-screen-height.htm b591d259abd635443575d699dfa1c774968b4746 ?
xhtml1/window-screen-height.xht b591d259abd635443575d699dfa1c774968b4746 ?
html/window-screen-width-immutable.htm 5cb01db5fb1eb56842952d75a921f77e26650cab ?
xhtml1/window-screen-width-immutable.xht 5cb01db5fb1eb56842952d75a921f77e26650cab ?
html/window-screen-width-mutation-throws.htm 7960afc871c5c4cd1fb33681adbc31674af2bbba ?
xhtml1/window-screen-width-mutation-throws.xht 7960afc871c5c4cd1fb33681adbc31674af2bbba ?
html/window-screen-width.htm 43d6fd44dd0ce57fa93c5a2f93fefbf70028fd7a ?
xhtml1/window-screen-width.xht 43d6fd44dd0ce57fa93c5a2f93fefbf70028fd7a ?
html/window-screen-height-immutable.htm 43e46a2dc1d4808dd4625b9ae52f4fcb995a6eb9 ?
xhtml1/window-screen-height-immutable.xht 43e46a2dc1d4808dd4625b9ae52f4fcb995a6eb9 ?
html/window-screen-height-mutation-throws.htm 0afda26b0d335668df20db6f7cdb62fc63246dae ?
xhtml1/window-screen-height-mutation-throws.xht 0afda26b0d335668df20db6f7cdb62fc63246dae ?
html/window-screen-height.htm 32e717fe2f88e2f627e484ac60b097ec01b3c958 ?
xhtml1/window-screen-height.xht 32e717fe2f88e2f627e484ac60b097ec01b3c958 ?
html/window-screen-width-immutable.htm 3ca3416f2d111900a1ecc4eb32c73d6de8cdd52d ?
xhtml1/window-screen-width-immutable.xht 3ca3416f2d111900a1ecc4eb32c73d6de8cdd52d ?
html/window-screen-width-mutation-throws.htm 1f32c25f8253efa28ad864c96ad1087346012c9d ?
xhtml1/window-screen-width-mutation-throws.xht 1f32c25f8253efa28ad864c96ad1087346012c9d ?
html/window-screen-width.htm 25a2cf9ad88cde5fc112877ccad675292a0078c7 ?
xhtml1/window-screen-width.xht 25a2cf9ad88cde5fc112877ccad675292a0078c7 ?

View file

@ -1,25 +1,25 @@
id references title flags links revision credits assertion
CaretPosition-001 CaretPosition script http://www.w3.org/TR/cssom-view/#the-caretposition-interface ec2bdc9c730d65a0319935187debd4c6811d57b1 `unbug`<mailto:tidelgl@gmail.com>
cssom-getBoundingClientRect-001 CSSOM View - 6.1 - getBoundingClientRect tests dom,script http://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect 3267558f1f0dd9d519f59c9d91b757782bf40bc6 `Chris Wu`<mailto:pwx.frontend@gmail.com>
CaretPosition-001 CaretPosition script http://www.w3.org/TR/cssom-view/#the-caretposition-interface be738bad5c7616acd40f009658e84f3c653f4273 `unbug`<mailto:tidelgl@gmail.com>
cssom-getBoundingClientRect-001 CSSOM View - 6.1 - getBoundingClientRect tests dom,script http://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect e401a698b0b6d4d9b3d4630733eaa42f0b82acc3 `Chris Wu`<mailto:pwx.frontend@gmail.com>
cssom-getBoundingClientRect-002 getBoundingClientRect of element outside DOM dom,script http://www.w3.org/TR/cssom-view/#dom-element-getclientrects,http://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect 29a0bd1179d5cbf42b4cb21706022d3328b6b134 `Chris Rebert`<http://chrisrebert.com> 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.
cssom-getClientRects getClientRects of element outside DOM dom,script http://www.w3.org/TR/cssom-view/#dom-element-getclientrects 2b2a3a320d19265eab4e6a5a05b20f43c0565e21 `Chris Rebert`<http://chrisrebert.com> 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.
cssom-view-window-screen-interface cssom view window screen attribute dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 4aaebe055d605dc7f915dac2039087fd7b018439 `jingke`<mailto:jingkewhu@gmail.com> window screen interface
elementFromPoint-001 CSSOM View - 5 - extensions to the Document interface dom,script http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface 52a4d67631063dcb64c8d1bba460430195f3877a `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> elementFromPoint returns correct element
elementFromPosition CSSOM View elementFromPoint dom,script http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface,http://www.w3.org/TR/cssom-view/#widl-Document-elementFromPoint-Element-float-x-float-y 78b980b1011fb13154d1ddf81eaf962f59bfa0d7 `Chris`<mailto:pwx.frontend@gmail.com>
htmlelement-offset-width-001 CSSOM View - 7 - element.offsetWidth detatches correctly dom,script https://drafts.csswg.org/cssom-view-1/#dom-htmlelement-offsetwidth dded4e35be63095033534b9074bd6b09e2cdcc58 `Michael Howell`<mailto:michael@notriddle.com> element.offsetWidth returns 0 when there is no documentElement.
cssom-view-window-screen-interface cssom view window screen attribute dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 79daf2ef9d0330e2b53c927d08176233fa5d1536 `jingke`<mailto:jingkewhu@gmail.com> window screen interface
elementFromPoint-001 CSSOM View - 5 - extensions to the Document interface dom,script http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface 00242151f0ccec94846f3beae1d9e3a3bc3590f0 `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> elementFromPoint returns correct element
elementFromPosition CSSOM View elementFromPoint dom,script http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface,http://www.w3.org/TR/cssom-view/#widl-Document-elementFromPoint-Element-float-x-float-y 0f1ddd54f1c9a31666c541814998c0ae035a4703 `Chris`<mailto:pwx.frontend@gmail.com>
htmlelement-offset-width-001 CSSOM View - 7 - element.offsetWidth detatches correctly dom,script https://drafts.csswg.org/cssom-view-1/#dom-htmlelement-offsetwidth 2aa3ebf3ff6268a05bc53f09d8f54c32b9f3dac8 `Michael Howell`<mailto:michael@notriddle.com> element.offsetWidth returns 0 when there is no documentElement.
matchMedia CSSOM View matchMedia and MediaQueryList dom,script http://www.w3.org/TR/cssom-view/#dom-window-matchmedia,http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface,http://www.w3.org/TR/cssom/#serializing-media-queries 968cc094c6258392a6d1f8dd5eb814f43ed6692f `Rune Lillesveen`<mailto:rune@opera.com>
matchMediaAddListener CSSOM View matchMedia addListener dom,script http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface ff9c78237902cf841131fcc2a30344dd737e1f55 `Chris Wu`<mailto:pwx.frontend@gmail.com>
matchMediaAddListener CSSOM View matchMedia addListener dom,script http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface 60aa2e2b20aaa1c20dbece338b8d5583a4456436 `Chris Wu`<mailto:pwx.frontend@gmail.com>
media-query-list-interface Properties and Functions dom,script http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface,http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface bf107020b2904718b522b5b57fad03c51c059a1e `Joe Balancio`<mailto:jlbalancio@gmail.com> All properties exist and are readonly. All functions exist and are instances of Function
MediaQueryList-001 MediaQueryList script http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface 5e0c1c5758733b0f2887620db9ce20a6aa00a00c `unbug`<mailto:tidelgl@gmail.com>
offsetParent_element_test CSSOM View &#8212;&#8212; offsetParent element test script http://www.w3.org/TR/cssom-view/#extensions-to-the-htmlelement-interface,http://www.w3.org/TR/cssom-view/#dom-htmlelement-offsetparent 42948177cf68f659f7e9dd5147032169558760b1 `neo_and_rayi`<mailto:1988wangxiao@gmail.com>
Screen-pixelDepth-Screen-colorDepth001 Screen-pixelDepth,Screen-colorDepth script http://www.w3.org/TR/cssom-view/#the-screen-interface 6747335ed4736a1e6d2dcd446c9c28a0923b2396 `unbug`<mailto:tidelgl@gmail.com>
MediaQueryList-001 MediaQueryList script http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface 76154c3e1d04e0f61bcabbd17587e4b35f926a36 `unbug`<mailto:tidelgl@gmail.com>
offsetParent_element_test CSSOM View &#8212;&#8212; offsetParent element test script http://www.w3.org/TR/cssom-view/#extensions-to-the-htmlelement-interface,http://www.w3.org/TR/cssom-view/#dom-htmlelement-offsetparent 7942a400b775948ca727fc389f224e11721bef2e `neo_and_rayi`<mailto:1988wangxiao@gmail.com>
Screen-pixelDepth-Screen-colorDepth001 Screen-pixelDepth,Screen-colorDepth script http://www.w3.org/TR/cssom-view/#the-screen-interface f61948030aa33e4aefcc760e4b698e20e1b0912d `unbug`<mailto:tidelgl@gmail.com>
scrollWidthHeight CSSOM View scrollWidth and scrollHeight dom,script http://www.w3.org/TR/cssom-view/#dom-element-scrollwidth dc82a1c1dfddec949ed64ab7ffb8c30625b911b2 `Robert O'Callahan`<mailto:robert@ocallahan.org>
scrollWidthHeightWhenNotScrollable CSSOM View scrollWidth/scrollHeight (for nonscrollable elements) dom,script http://www.w3.org/TR/cssom-view/#dom-element-scrollwidth 5d33a8bab0ff6b187dd544afaefce6b7662128b5 `Robert O'Callahan`<mailto:robert@ocallahan.org>
ttwf-scrollintoview CSSOM View - 6 - scrollIntoView tests dom,script http://www.w3.org/TR/cssom-view/#dom-element-scrollintoview 3b360b57241e529014b011aec1fd93640f08ffd5 `Chris Wu`<mailto:pwx.frontend@gmail.com>
ttwf-scrollintoview CSSOM View - 6 - scrollIntoView tests dom,script http://www.w3.org/TR/cssom-view/#dom-element-scrollintoview 39b4f7131eaae2baedbad247d316af93dda5e0f0 `Chris Wu`<mailto:pwx.frontend@gmail.com>
window-interface Properties and Functions dom,script http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface 40732ddf8d7cd2185d6a6cb9d57d9dcbd2d73c42 `Joe Balancio`<mailto:jlbalancio@gmail.com> All properties exist and are readonly. All functions exist and are instances of Function
window-screen-height CSSOM View - 4.2 - screen.height range tests dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface b591d259abd635443575d699dfa1c774968b4746 `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> window.screen.height has sensible values
window-screen-height-immutable CSSOM View - 4.2 - screen.height immutability dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface a5a7e61d3e4844b0e4f6ed83277fda329652e9b6 `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> screen.height is immutable
window-screen-height-mutation-throws CSSOM View - 4.2 - screen.height mutation throws exception dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 6846cf8927a3214496b4996c95bde1eb3e657552 `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> screen.height mutation throws exception
window-screen-width CSSOM View - 4.2 - screen.width range tests dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 43d6fd44dd0ce57fa93c5a2f93fefbf70028fd7a `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> window.screen.width has sensible values
window-screen-width-immutable CSSOM View - 4.2 - screen.width immutability dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 5cb01db5fb1eb56842952d75a921f77e26650cab `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> screen.width is immutable
window-screen-width-mutation-throws CSSOM View - 4.2 - screen.width mutation throws exception dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 7960afc871c5c4cd1fb33681adbc31674af2bbba `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> screen.width mutation throws exception
window-screen-height CSSOM View - 4.2 - screen.height range tests dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 32e717fe2f88e2f627e484ac60b097ec01b3c958 `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> window.screen.height has sensible values
window-screen-height-immutable CSSOM View - 4.2 - screen.height immutability dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 43e46a2dc1d4808dd4625b9ae52f4fcb995a6eb9 `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> screen.height is immutable
window-screen-height-mutation-throws CSSOM View - 4.2 - screen.height mutation throws exception dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 0afda26b0d335668df20db6f7cdb62fc63246dae `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> screen.height mutation throws exception
window-screen-width CSSOM View - 4.2 - screen.width range tests dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 25a2cf9ad88cde5fc112877ccad675292a0078c7 `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> window.screen.width has sensible values
window-screen-width-immutable CSSOM View - 4.2 - screen.width immutability dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 3ca3416f2d111900a1ecc4eb32c73d6de8cdd52d `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> screen.width is immutable
window-screen-width-mutation-throws CSSOM View - 4.2 - screen.width mutation throws exception dom,script http://www.w3.org/TR/cssom-view/#the-screen-interface 1f32c25f8253efa28ad864c96ad1087346012c9d `Neils Christoffersen`<mailto:neils.christoffersen@gmail.com> screen.width mutation throws exception

View file

@ -4,7 +4,7 @@
<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>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
.box{
position: absolute;
@ -37,7 +37,8 @@
},'getBox');
function getBox(id){
return document.getElementById(id);
}
}
</script>
</body></html>

View file

@ -4,7 +4,7 @@
<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>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
</style>
</head>
@ -18,4 +18,5 @@
},'matchMedia');
</script>
</body></html>

View file

@ -4,7 +4,7 @@
<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>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
</style>
</head>
@ -29,4 +29,5 @@
}
</script>
</body></html>

View file

@ -18,7 +18,7 @@
text-align: center;
line-height: 188px;
}
</style>
</style>
</head>
<body>
<div id="testItem">test item</div>
@ -35,7 +35,7 @@
assert_equals(titem.right - titem.left, titem.width, "width should equal right minus left")
}, "getBoundingClientRect() should return a DOMRect where width=right-left"
)
</script>
</script>
</body></html>

View file

@ -6,7 +6,7 @@
<meta content="dom" name="flags" />
<meta content="window screen interface" name="assert" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
@ -19,21 +19,22 @@
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 &gt;= 0 &amp;&amp; window.screen.width &lt; 6000000);},
test(function(){assert_true(window.screen.width &gt;= 0 &amp;&amp; window.screen.width &lt; 6000000);},
"window.screen.width &gt;= 0 &amp;&amp; window.screen.width &lt; 6000000");
test(function(){assert_true(window.screen.height &gt;= 0 &amp;&amp; window.screen.height &lt; 6000000);},
test(function(){assert_true(window.screen.height &gt;= 0 &amp;&amp; window.screen.height &lt; 6000000);},
"window.screen.height &gt;= 0 &amp;&amp; window.screen.height &lt; 6000000");
test(function(){assert_true(window.screen.availWidth &gt;= 0 &amp;&amp; window.screen.availWidth &lt;= window.screen.width);},
test(function(){assert_true(window.screen.availWidth &gt;= 0 &amp;&amp; window.screen.availWidth &lt;= window.screen.width);},
"window.screen.availWidth &gt;= 0 &amp;&amp; window.screen.availWidth &lt;= window.screen.width");
test(function(){assert_true(window.screen.availHeight &gt;= 0 &amp;&amp; window.screen.availHeight &lt;= window.screen.height);},
test(function(){assert_true(window.screen.availHeight &gt;= 0 &amp;&amp; window.screen.availHeight &lt;= window.screen.height);},
"window.screen.availHeight &gt;= 0 &amp;&amp; window.screen.availHeight &lt;= window.screen.height");
test(function(){assert_true(window.screen.colorDepth == 0 || window.screen.colorDepth == 16 || window.screen.colorDepth == 24 || window.screen.colorDepth == 32);},
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

@ -4,16 +4,16 @@
<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" />
<meta content="elementFromPoint returns correct element" name="assert" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#targetDiv {
position: absolute;
top: 10;
left: 10;
height: 100px;
width: 100px;
width: 100px;
}
</style>
</head>
@ -24,10 +24,11 @@
</div>
<script>
var element = document.elementFromPoint(15, 15);
test ( function() {
assert_equals(element.id, "targetDiv", "elementFromPoint didn't return the correct element");
});
</script>
});
</script>
</body></html>

View file

@ -95,8 +95,8 @@
];
var i = 0, len = wrap.length, item;
for ( ; i &amp;lt; len; i++ ) {
item = wrap[ i ];
test( function () {
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);
}

View file

@ -4,9 +4,9 @@
<link href="mailto:michael@notriddle.com" rel="author" title="Michael Howell" />
<link href="https://drafts.csswg.org/cssom-view-1/#dom-htmlelement-offsetwidth" rel="help" />
<meta content="dom" name="flags" />
<meta content="element.offsetWidth returns 0 when there is no documentElement." name="assert" />
<meta content="element.offsetWidth returns 0 when there is no documentElement." name="assert" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv">...</div>
@ -21,7 +21,7 @@
document.documentElement.remove();
assert_equals(el.offsetWidth, 0, "new element has offset width not equal to zero after removing documentElement");
});
</script>
</script>
</body></html>

View file

@ -29,9 +29,9 @@
var divineCount = 10;
var width_list = [201,199];
var mq1 = iframe_window.matchMedia("(max-width:200px)");
mq1.addListener(function(mql){
count = count + 1;
mq1.addListener(function(mql){
count = count + 1;
});

View file

@ -47,7 +47,7 @@
<caption>
<div id="caption-element-child"></div>
</caption>
<tbody>
<tr id="table-element-tr">
<td id="table-element-td">
@ -112,7 +112,7 @@ test(function() {
{ assert: "The offsetParent attribute algorithm rule checking passed!" }
);
test(function() {
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);
@ -123,9 +123,9 @@ test(function() {
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(caption_element_child.offsetParent,table_element);
assert_equals(window.getComputedStyle(td_element).position,'static');
assert_equals(td_element.offsetParent,table_element);
assert_equals(td_element.offsetParent,table_element);
}, "Valid the algorithm rule of offsetParent check step 2",
{ assert: "The offsetParent attribute algorithm rule checking passed!" }
);

View file

@ -10,7 +10,7 @@
<style type="text/css">
#phitem{height: 2000px;}
#viewitem{width:300px;height:200px;margin:0 auto;background-color: lightgreen;}
</style>
</style>
</head>
<body>
<div id="myDiv">
@ -26,6 +26,7 @@
assert_true(window.pageYOffset + window.innerHeight &gt; viewitem.offsetTop, "The element isn't in the viewport")
})
asytest.done()
</script>
</script>
</body></html>

View file

@ -4,24 +4,24 @@
<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" />
<meta content="screen.height is immutable" name="assert" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.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>
}, "immutability test");
</script>
</body></html>

View file

@ -4,9 +4,9 @@
<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" />
<meta content="screen.height mutation throws exception" name="assert" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
@ -14,10 +14,10 @@
<script>
test(function() {
assert_throws(null, function() {
window.screen.height = 0
window.screen.height = 0
}), "chaning window.screen.height should throw exception"
}, "mutation exception test");
</script>
}, "mutation exception test");
</script>
</body></html>

View file

@ -4,34 +4,34 @@
<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" />
<meta content="window.screen.height has sensible values" name="assert" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
var upperBound = 50000;
test(
test(
function() {
assert_not_equals(window.screen.height, 0, "window.screen.height is zero")
}, "zero check"
);
test(
function() {
assert_true(window.screen.height &gt; 0, "window.screen.height shouldn't be negative")
}, "positive check"
);
test(
function() {
assert_true(window.screen.height &lt; upperBound, "window.screen.height shouldn't be so large")
}, "upper bound check"
);
</script>
</script>
</body></html>

View file

@ -4,24 +4,24 @@
<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" />
<meta content="screen.width is immutable" name="assert" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.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>
}, "immutability test");
</script>
</body></html>

View file

@ -4,9 +4,9 @@
<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" />
<meta content="screen.width mutation throws exception" name="assert" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
@ -14,10 +14,10 @@
<script>
test(function() {
assert_throws(null, function() {
window.screen.width = 0
window.screen.width = 0
}), "chaning window.screen.width should throw exception"
}, "mutation exception test");
</script>
}, "mutation exception test");
</script>
</body></html>

View file

@ -4,34 +4,34 @@
<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" />
<meta content="window.screen.width has sensible values" name="assert" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="myDiv"></div>
<div id="log"></div>
<script>
var upperBound = 50000;
test(
test(
function() {
assert_not_equals(window.screen.width, 0, "window.screen.width is zero")
}, "zero check"
);
test(
function() {
assert_true(window.screen.width &gt; 0, "window.screen.width shouldn't be negative")
}, "positive check"
);
test(
function() {
assert_true(window.screen.width &lt; upperBound, "window.screen.width shouldn't be so large")
}, "upper bound check"
);
</script>
</script>
</body></html>