Skip to content

Commit

Permalink
Adding a reference test where a bigger area than the original
Browse files Browse the repository at this point in the history
element is defined in script.

The test is now using wpt infrastructure (thanks Manishearth!).
  • Loading branch information
Adenilson committed Nov 2, 2015
1 parent 5c11c88 commit 4fdf73d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/wpt/mozilla/meta/MANIFEST.json
Expand Up @@ -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",
Expand Down Expand Up @@ -8808,4 +8820,4 @@
"rev": null,
"url_base": "/_mozilla/",
"version": 2
}
}
32 changes: 32 additions & 0 deletions tests/wpt/mozilla/tests/css/canvas_over_area.html
@@ -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 changes: 11 additions & 0 deletions tests/wpt/mozilla/tests/css/canvas_over_area_ref.html
@@ -0,0 +1,11 @@
<style>

#base {
background-color: green;
height: 100px;
width: 100px;
}

</style>

<div id="base"></div>

0 comments on commit 4fdf73d

Please sign in to comment.