# Copyright (c) 2010 Philip Taylor # Released under the BSD license and W3C Test Suite License: see LICENSE.txt framed: |
[show output] %(fonthack)s
Actual output:
%(expected)s%(desc)s
Actual output:
%(expected)sPass
Fail
%(fonthack)sThese images should be identical:
%(expected)s%(desc)s
%(notes)s %(fonthack)sActual output:
%(expected)sCanvas test: %(mochi_name)s
%(mochi_desc)s%(fonthack)s %(mochi_images)s mochitest.isPixel: | function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) { var pixel = ctx.getImageData(x, y, 1, 1); var pr = pixel.data[0], pg = pixel.data[1], pb = pixel.data[2], pa = pixel.data[3]; ok(r-d <= pr && pr <= r+d && g-d <= pg && pg <= g+d && b-d <= pb && pb <= b+d && a-d <= pa && pa <= a+d, "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d); } mochitest.todo_isPixel: | function todo_isPixel(ctx, x,y, r,g,b,a, pos, colour, d) { var pixel = ctx.getImageData(x, y, 1, 1); var pr = pixel.data[0], pg = pixel.data[1], pb = pixel.data[2], pa = pixel.data[3]; todo(r-d <= pr && pr <= r+d && g-d <= pg && pg <= g+d && b-d <= pb && pb <= b+d && a-d <= pa && pa <= a+d, "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d); } mochitest.deferTest: | function deferTest() { _deferred = true; } mochitest.wrapFunction: | function wrapFunction(f) { return function () { f.apply(null, arguments); SimpleTest.finish(); } } mochitest.exception: | var _thrown_outer = false; try { %s } catch (e) { _thrown_outer = true; } todo(!_thrown_outer, 'should not throw exception'); mochitest.Makefile: | # # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. # # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Mozilla Corporation. # Portions created by the Initial Developer are Copyright (C) 2007 # the Initial Developer. All Rights Reserved. # # Contributor(s): # Philip Taylor# FF trunk doesn't do onload in object, so use iframe instead #index.frame.item: |- # index.frame.item: |- index.w3c.frame: |
index.w3c.frame.item: |- index: |
<canvas>
testsDeveloped by Philip Taylor. Last updated %(updated)s.
Based on the HTML Draft Standard — 22 February 2010. See also the annotated specification.
See test results for some browsers. (Generated semi-automatically via the report generator.)
You may want to download the source code/data (e.g. to create an offline copy of the tests).
For each test, a green background indicates success, red indicates failure, blue indicates a need to manually confirm the output is as expected.
The versions in the report generator are the most visually minimalist. The category links below show the actual and expected renderings, and any error messages. The individual test pages have links to relevant parts of the specification and extra notes.
There may be many inaccuracies: tests that do not notice when part of the output is incorrect; tests that are too intolerant of acceptable renderings differences, or make other unreasonable assumptions; tests that were written for an outdated version of the specification, and tests that are just wrong. Also a number of features are not tested, most notably text rendering. Please contact me (email, IRC, etc) if you find any problems. index.w3c: |
<canvas>
tests%d test%s expand
index.w3c.category.item: |%d test%s
reportgen: |This is mainly for my own use, so it is not designed to be user-friendly. If anyone else wants to use it for some reason, just wait until "tests not yet loaded" and "tests not yet completed" get down to zero, then click the pass/fail button for any test it shows where it cannot work out the answer (or use the y/n keys to choose for the magenta-highlighted case), then use the buttons at the bottom to collect all the results.
Test |
---|