mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update CSS tests to revision 0698c2aa9ead844b6d7d10eafb096cb1118e13ef
This commit is contained in:
parent
9aa1b1e408
commit
35c74aecc2
11290 changed files with 92400 additions and 49214 deletions
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -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;
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -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!" }
|
||||
);
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue