mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Update CSS tests to revision 7d0ff6117ee51720c307ea24d413d13eb5abf3e6
This commit is contained in:
parent
40c52d55e2
commit
349c75536d
7391 changed files with 304135 additions and 153491 deletions
|
@ -1,44 +1,44 @@
|
|||
<!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>
|
||||
<title>CSSOM View Module test:CaretPosition</title>
|
||||
<link href="mailto:tidelgl@gmail.com" rel="author" title="unbug">
|
||||
<link href="https://drafts.csswg.org/cssom-view-1/#dom-document-elementfrompoint" 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>
|
||||
<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(document.elementFromPoint(400, 100),
|
||||
document.getElementById('box2'),
|
||||
"Expected value for element id is 'box2'");
|
||||
}, 'Element at (400, 100)');
|
||||
|
||||
test(function(){
|
||||
assert_equals(document.elementFromPoint(400, 900),
|
||||
null,
|
||||
"Expected value for element id is 'box2'");
|
||||
}, 'Element at (400, 900)');
|
||||
</script>
|
||||
|
||||
|
||||
</body></html>
|
Loading…
Add table
Add a link
Reference in a new issue