mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Adding a reference test where a bigger area than the original
element is defined in script. The test is now using wpt infrastructure (thanks Manishearth!).
This commit is contained in:
parent
5c11c88e92
commit
4fdf73d105
3 changed files with 56 additions and 1 deletions
|
@ -4153,6 +4153,18 @@
|
|||
]
|
||||
},
|
||||
"testharness": {
|
||||
"css/canvas_over_area.html": [
|
||||
{
|
||||
"path": "css/canvas_over_area.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/canvas_over_area_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/canvas_over_area.html"
|
||||
}
|
||||
],
|
||||
"css/test_variable_legal_values.html": [
|
||||
{
|
||||
"path": "css/test_variable_legal_values.html",
|
||||
|
@ -8808,4 +8820,4 @@
|
|||
"rev": null,
|
||||
"url_base": "/_mozilla/",
|
||||
"version": 2
|
||||
}
|
||||
}
|
||||
|
|
32
tests/wpt/mozilla/tests/css/canvas_over_area.html
Normal file
32
tests/wpt/mozilla/tests/css/canvas_over_area.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<style>
|
||||
|
||||
#base {
|
||||
background-color: red;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#painted {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
position: relative;
|
||||
top: -100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="base"></div>
|
||||
<canvas id="painted"></canvas>
|
||||
|
||||
|
||||
<script>
|
||||
onload = function() {
|
||||
var obj = document.getElementById("painted");
|
||||
obj.width = 500;
|
||||
obj.height = 500;
|
||||
var context = obj.getContext("2d");
|
||||
context.save();
|
||||
context.fillStyle = "green";
|
||||
context.fillRect(0, 0, 500, 500);
|
||||
context.restore();
|
||||
};
|
||||
</script>
|
11
tests/wpt/mozilla/tests/css/canvas_over_area_ref.html
Normal file
11
tests/wpt/mozilla/tests/css/canvas_over_area_ref.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<style>
|
||||
|
||||
#base {
|
||||
background-color: green;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="base"></div>
|
Loading…
Add table
Add a link
Reference in a new issue