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:
Adenilson Cavalcanti 2015-11-02 08:53:21 -08:00
parent 5c11c88e92
commit 4fdf73d105
3 changed files with 56 additions and 1 deletions

View file

@ -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
}
}

View 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>

View file

@ -0,0 +1,11 @@
<style>
#base {
background-color: green;
height: 100px;
width: 100px;
}
</style>
<div id="base"></div>