diff options
author | Adenilson Cavalcanti <cavalcantii@gmail.com> | 2015-11-02 08:53:21 -0800 |
---|---|---|
committer | Adenilson Cavalcanti <cavalcantii@gmail.com> | 2015-11-02 08:53:21 -0800 |
commit | 4fdf73d1055a31f7acef69fa1152615b6aa8e840 (patch) | |
tree | 1cbe9c9b87a05ee2b8daa9c5ea9278dbb7ce9286 | |
parent | 5c11c88e92ccbc3013501096d5625778774c9fee (diff) | |
download | servo-4fdf73d1055a31f7acef69fa1152615b6aa8e840.tar.gz servo-4fdf73d1055a31f7acef69fa1152615b6aa8e840.zip |
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!).
-rw-r--r-- | tests/wpt/mozilla/meta/MANIFEST.json | 14 | ||||
-rw-r--r-- | tests/wpt/mozilla/tests/css/canvas_over_area.html | 32 | ||||
-rw-r--r-- | tests/wpt/mozilla/tests/css/canvas_over_area_ref.html | 11 |
3 files changed, 56 insertions, 1 deletions
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 6132dea8524..1ec8719b951 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -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 -}
\ No newline at end of file +} diff --git a/tests/wpt/mozilla/tests/css/canvas_over_area.html b/tests/wpt/mozilla/tests/css/canvas_over_area.html new file mode 100644 index 00000000000..d7c3b3e3f78 --- /dev/null +++ b/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> diff --git a/tests/wpt/mozilla/tests/css/canvas_over_area_ref.html b/tests/wpt/mozilla/tests/css/canvas_over_area_ref.html new file mode 100644 index 00000000000..5cfa3c76ad6 --- /dev/null +++ b/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> |