Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255

This commit is contained in:
James Graham 2015-03-27 09:15:38 +00:00
parent b2a5225831
commit 1a81b18b9f
12321 changed files with 544385 additions and 6 deletions

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<title>CanvasRenderingContext2D imageSmoothingEnabled test</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" href="/resources/testharness.css" media="all">
<link rel="author" title="ShinHyunjin" href="mailto:jini7927@gmail.com">
<link rel="help" href="http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/#image-smoothing">
</head>
<body>
<div id="log"></div>
<canvas id="test_canvas_1"></canvas>
<canvas id="test_canvas_2"></canvas>
<canvas id="test_canvas_3"></canvas>
<script>
(function() {
test(function() {
var canvas = document.getElementById('test_canvas_1');
var ctx = canvas.getContext('2d');
assert_true(ctx.imageSmoothingEnabled);
}, "When the CanvasRenderingContext2D object is created, the attribute must be set to true.");
test(function() {
var canvas = document.getElementById('test_canvas_2');
var ctx = canvas.getContext('2d');
ctx.imageSmoothingEnabled = false;
assert_false(ctx.imageSmoothingEnabled);
}, "On getting the imageSmoothingEnabled attribute, the user agent must return the last value it was set to.");
test(function() {
var canvas = document.getElementById('test_canvas_3');
var ctx = canvas.getContext('2d');
ctx.imageSmoothingEnabled = false;
assert_equals(ctx.imageSmoothingEnabled, false);
}, "On setting the imageSmoothingEnabled attribute, it must be set to the new value.");
})();
</script>
</body>
</html>