[common][tct-canvas-html5-tests][Testcase sync from Suprem] 32/93932/1
authorxianglan0.li <xianglan0.li@samsung.com>
Wed, 26 Oct 2016 08:54:18 +0000 (16:54 +0800)
committerxianglan0.li <xianglan0.li@samsung.com>
Wed, 26 Oct 2016 08:54:22 +0000 (16:54 +0800)
Change-Id: I39c22cef9e361226be70ae9c9ee8a107b488fcd3
Signed-off-by: xianglan0.li <xianglan0.li@samsung.com>
1217 files changed:
common/tct-canvas-html5-tests/COPYING [new file with mode: 0644]
common/tct-canvas-html5-tests/LICENSE.Apache-2.0 [new file with mode: 0644]
common/tct-canvas-html5-tests/NOTICE [new file with mode: 0644]
common/tct-canvas-html5-tests/README [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_misarg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_with_anticlockwise.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasPattern_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_misarg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_extra_argument.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_misarg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_currentTransform_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_direction_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_filter_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_extra_argument.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_imageSmoothingEnabled_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_extra_argument.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_misarg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_with_path.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_misarg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_extra_argument.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_with_path.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_webkitImageSmoothingEnabled_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_misarg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_with_arguments.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/MouseEvent_region_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxAscent_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxDescent_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxLeft_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxRight_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_alphabeticBaseline_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_emHeightAscent_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_emHeightDescent_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxAscent_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxDescent_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_hangingBaseline_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/TextMetrics_ideographicBaseline_attribute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_arcTo_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_arc_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_attributes.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_beginPath_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_bezierCurveTo_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_canvas_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_clearRect_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_clip_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_closePath_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_createPattern_basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_createPattern_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_return_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_element.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_drawImage_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_fillRect_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_fillStyle_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_fillText_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_fill_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_font_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_getImageData_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_checktype.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_globalAlpha_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_invalid_value.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_isPointInPath_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_lineCap_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_value.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_lineJoin_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_lineTo_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_default_value.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_measureText_basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_measureText_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_miterLimit_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_moveTo_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_putImageData_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_quadraticCurveTo_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_rect_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_restore_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_rotate_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_save_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_scale_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_setTransform_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_checktype.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_strokeRect_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_strokeStyle_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_strokeText_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_stroke_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_textAlign_defaultvalue.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_textAlign_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_defaultvalue.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_transform_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas2d_translate_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_attributes.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_getContext_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_globalCompositeOperation_modes.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_height_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_height_new_value.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_height_reflect_value.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_height_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_toDataURL_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_toDataURL_jpeg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_toDataURL_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_width_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_width_new_value.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_width_reflect_value.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvas_width_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_INDEX_SIZE_ERR.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_SYNTAX_ERR.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_exsit.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/common/COPYING [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/common/canvas-tests.css [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/common/canvas-tests.js [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/fonts/COPYING [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/fonts/CanvasTest.ttf [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_data_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_data_readonly.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_data_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_height_100px.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_height_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_height_readonly.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_height_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_width_200px.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_width_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_width_readonly.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/imagedata_width_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/COPYING [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/anim-gr.gif [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/anim-gr.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/anim-poster-gr.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/background.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/black-rectangle.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/broken.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/canvas-line.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/clear-100x50.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/ggrr-256x256.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/green-100x50.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/green-16x16.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/green-1x1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/green.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/green.svg [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/letters.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/red-16x16.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/red.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/redtransparent.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/rgrg-256x256.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/rrgg-256x256.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/smiley.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/threecolors.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/transparent.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/transparent50.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/yellow.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/images/yellow75.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/support/canvas.js [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/support/unitcommon.js [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/textmetrics_width_exist.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/textmetrics_width_readonly.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/textmetrics_width_type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.canvas.readonly.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.canvas.reference.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.clip.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalalpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalcomposite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.path.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.shadow.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.transform.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.copy.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.copy.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-over.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.lighter.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.lighter.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-over.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.xor.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.xor.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.copy.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.lighter.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.xor.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvas.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvaspattern.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.fill.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.image.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.imagepattern.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.range.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.copy.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.copy.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-over.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.lighter.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.lighter.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-over.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.xor.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.xor.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.casesensitive.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.get.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.highlight.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.nullsuffix.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.unrecognised.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.copy.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.copy.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-over.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.lighter.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.lighter.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-over.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.xor.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.xor.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.copy.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.copy.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-over.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.lighter.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.lighter.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-over.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-over.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.xor.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.xor.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.copy.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.copy.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.copy.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.copy.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.copy.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.copy.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.copy.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.copy.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-atop.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-atop.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-in.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-in.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-out.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-out.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.coordinatespace.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.coordinatespace.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.3arg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.5arg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destpos.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destsize.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcepos.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcesize.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.alpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.apng.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.gif.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.poster.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.broken.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.canvas.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.clip.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.composite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.errorCheck.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.floatsource.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.omitted.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.emptysrc.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.nosrc.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.reload.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.removedsrc.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedest.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedir.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativesource.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nowrap.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.null.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.path.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.svg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.transform.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.wrongtype.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerocanvas.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerosource.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.clip.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.path.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.shadow.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.transform.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.semitransparent.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.solid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.transparent.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidstring.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidtype.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.changed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.notrendered.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.removed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.removed.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex3.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex6.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex6.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-3.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-4.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-5.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-6.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-6.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-3.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-4.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-3.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-4.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-5.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-6.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-6.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.html4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.html4.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex6.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex7.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex8.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-6.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-6.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-7.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-6.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-7.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-3.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-4.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-5.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-eof.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-eof.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-num.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-num.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-percent.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-percent.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-eof.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-eof.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-percent.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-percent.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-3.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-4.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.system.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-1.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.exists.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.extraargs.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.shared.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.unique.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.alpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.alpha.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.colour.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.colour.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.multiple.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.multiple.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.outside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.solid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.vertical.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.vertical.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fill.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillRect.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillText.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.stroke.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeRect.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeText.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.compare.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.crosscanvas.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.current.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.current.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidcolour.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidoffset.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.return.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.update.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.behind.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.beside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.bottom.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.cylinder.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.front.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.top.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.equal.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.initial.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.this.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.initial.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.large.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.round.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.this.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.tiny.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.clamp.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.length.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonpremul.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.alpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.cols.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rgb.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rows.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.range.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.outside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.size.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.tiny.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.unaffected.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.clamp.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.ctor.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.nan.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.properties.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.readonly.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.round.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.set.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.string.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.undefined.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.alpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.alpha.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.clip.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.created.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.cross.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.outside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.modified.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.null.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.path.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unaffected.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unchanged.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.wrongtype.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.butt.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.closed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.open.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.round.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.square.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.valid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.cross.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.defaults.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.bevel.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.closed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.miter.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.open.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.parallel.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.round.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.valid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.acute.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.exceeded.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.lineedge.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.obtuse.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.rightangle.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.valid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.within.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.union.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.scaledefault.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.transformed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.valid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.6.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.end.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonempty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zeroradius.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.scale.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.end.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.start.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.transformation.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.beginPath.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.scaled.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.shape.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.intersect.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.unaffected.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.newline.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.nextpoint.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.unaffected.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.overlap.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.overlap.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.add.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.initial.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.arc.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bezier.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bigarc.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.edge.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.outside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.subpath.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.unclosed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.winding.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nextpoint.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.multiple.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.newsubpath.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.scaled.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.shape.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.closed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.newsubpath.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.selfintersect.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.winding.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.6.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.overlap.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.overlap.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.arc.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.closed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.corner.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.curve.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.line.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.rect.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.skew.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.unaffected.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.union.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.changing.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.multiple.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.animated.gif.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.canvas.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.image.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.nocontext.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.type.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.zerocanvas.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.crosscanvas.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.emptysrc.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.immediate.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.nosrc.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.reload.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.removedsrc.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.null.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.string.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.undefined.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.outside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.canvas.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.image.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.outside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.outside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.outside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.case.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.null.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.nullsuffix.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.undefined.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognised.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognisednull.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.scaled.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.scaled.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.2.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.3.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.4.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.5.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.initial.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.valid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.initial.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.valid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.initial.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.valid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.blur.high.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.blur.high.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.alpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.alpha.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.blur.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.x.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.y.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.alpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.alpha.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.alpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.alpha.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.scale.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.section.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeX.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeY.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveX.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveY.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.outside.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.alpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.alpha.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.bitmap.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.clip.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.fillStyle.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.font.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalAlpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalCompositeOperation.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineCap.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineJoin.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineWidth.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.miterLimit.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.path.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowBlur.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowColor.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetX.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetY.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stack.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stackdepth.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.strokeStyle.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textAlign.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textBaseline.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.transformation.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.underflow.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.clip.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalalpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalcomposite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.path.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.shadow.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.transform.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.4.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.5.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.strokeStyle.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.align.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.align.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.align.valid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.valid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.center.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.ltr.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.rtl.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.left.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.right.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.ltr.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.rtl.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.baseline.alphabetic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.basic.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.bound.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.fontface.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.large.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.large.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.small.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.rtl.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.rtl.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.unaffected.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.repeat.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.kern.consistent.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.collapse.nonspace.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.basic.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.unaffected.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.complex.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.invalid.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.system.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.order.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.direction.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.radians.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrap.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrapnegative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.large.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.multiple.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.negative.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.multiple.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.skewed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.identity.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.multiply.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.skewed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.nonfinite.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.type.delete.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.type.exists.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.type.extend.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.type.prototype.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.type.replace.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/2d.voidreturn.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/COPYING [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/Makefile.am [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_addcolorstop_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_createlineargradient_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_arcto_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_beziercurveto_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_ispointInpath_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_compositing_globalcompositeoperation_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_linestyles_linecap_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_002-ref.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_002.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_state_restore_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_text_font_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/canvas_transformations_scale_001.htm [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/clear-100x50.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/context.arguments.missing.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/context.casesensitive.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/context.emptystring.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badname.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badsuffix.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.nullsuffix.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.unicode.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_002.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_003.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/fallback.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/fallback.multiple.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/fallback.nested.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/green-100x50.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/historical.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/imagesmoothing.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.colour.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.colour.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.2dstate.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.clip.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.different.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.different.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.gradient.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.path.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.path.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.pattern.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.same.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.same.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/initial.reset.transform.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/security.dataURI.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/security.pattern.canvas.timing.sub.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/security.pattern.create.sub.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.default.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.get.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.get.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.set.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.decimal.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.decimal.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.em.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.em.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.empty.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.exp.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.exp.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.hex.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.junk.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.junk.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.minus.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.minus.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.octal.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.octal.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.onlyspace.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.onlyspace.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.percent.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.percent.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.plus.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.plus.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.space.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.space.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.trailingjunk.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.trailingjunk.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.whitespace.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.whitespace.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setcontent.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setcontent.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidl.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidl.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidlzero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.removed.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.removed.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.decimal.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.decimal.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.em.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.em.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.empty.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.empty.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.exp.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.exp.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.hex.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.junk.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.junk.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.minus.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.minus.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.octal.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.octal.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.onlyspace.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.onlyspace.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.percent.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.percent.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.plus.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.plus.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.space.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.space.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.trailingjunk.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.trailingjunk.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.whitespace.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.whitespace.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.zero.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.style.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/size.attributes.style.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.1.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.2.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.3.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.bogustype.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.default.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.alpha.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.alpha.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.primarycolours.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.primarycolours.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.basic.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.basic.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.notnumber.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.outsiderange.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpg.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.ascii.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.unicode.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.nocontext.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.complexcolours.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.complexcolours.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.primarycolours.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.primarycolours.png [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.unrecognised.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.zeroheight.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerosize.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerowidth.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/type.delete.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/type.exists.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/type.extend.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/type.name.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/type.prototype.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/type.replace.html [new file with mode: 0644]
common/tct-canvas-html5-tests/canvas/w3c/yellow.png [new file with mode: 0644]
common/tct-canvas-html5-tests/common/COPYING [new file with mode: 0644]
common/tct-canvas-html5-tests/common/domtestcase.js [new file with mode: 0644]
common/tct-canvas-html5-tests/common/media.js [new file with mode: 0644]
common/tct-canvas-html5-tests/config.xml [new file with mode: 0644]
common/tct-canvas-html5-tests/icon.png [new file with mode: 0644]
common/tct-canvas-html5-tests/inst.apk.py [new file with mode: 0644]
common/tct-canvas-html5-tests/inst.wgt.py [new file with mode: 0644]
common/tct-canvas-html5-tests/inst.xpk.py [new file with mode: 0644]
common/tct-canvas-html5-tests/manifest.json [new file with mode: 0644]
common/tct-canvas-html5-tests/pack.py [new file with mode: 0644]
common/tct-canvas-html5-tests/resources/COPYING [new file with mode: 0644]
common/tct-canvas-html5-tests/resources/testharness.css [new file with mode: 0644]
common/tct-canvas-html5-tests/resources/testharness.js [new file with mode: 0644]
common/tct-canvas-html5-tests/resources/testharnessreport.js [new file with mode: 0644]
common/tct-canvas-html5-tests/suite.json [new file with mode: 0644]
common/tct-canvas-html5-tests/testcase.xsl [new file with mode: 0644]
common/tct-canvas-html5-tests/testresult.xsl [new file with mode: 0644]
common/tct-canvas-html5-tests/tests.css [new file with mode: 0644]
common/tct-canvas-html5-tests/tests.full.xml [new file with mode: 0644]
common/tct-canvas-html5-tests/tests.xml [new file with mode: 0644]
common/tct-canvas-html5-tests/webrunner/index.html [new file with mode: 0644]
common/tct-canvas-html5-tests/webrunner/jquery-1.10.2.min.js [new file with mode: 0644]
common/tct-canvas-html5-tests/webrunner/testrunner.js [new file with mode: 0644]

diff --git a/common/tct-canvas-html5-tests/COPYING b/common/tct-canvas-html5-tests/COPYING
new file mode 100644 (file)
index 0000000..fb71791
--- /dev/null
@@ -0,0 +1,24 @@
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/LICENSE.Apache-2.0 b/common/tct-canvas-html5-tests/LICENSE.Apache-2.0
new file mode 100644 (file)
index 0000000..7a4a3ea
--- /dev/null
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/NOTICE b/common/tct-canvas-html5-tests/NOTICE
new file mode 100644 (file)
index 0000000..2dfbf29
--- /dev/null
@@ -0,0 +1,5 @@
+Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
+Copyright (c) 2012 Intel Corporation.
+Except as noted, this software is licensed under Apache License, Version 2 or BSD-3-Clause License.
+Please, see the LICENSE.Apache-2.0 file for Apache License, Version 2 terms and conditions
+or the COPYING file for BSD-3-Clause License.
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/README b/common/tct-canvas-html5-tests/README
new file mode 100644 (file)
index 0000000..fc7eb59
--- /dev/null
@@ -0,0 +1,125 @@
+----------------------------------------------
+License
+----------------------------------------------
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Lin, Wanming <wanmingx.lin@intel.com>
+
+
+
+----------------------------------------------
+Introduction
+----------------------------------------------
+This test suite is for testing HTML5 2D Canvas specification:
+http://www.w3.org/TR/2012/WD-2dcontext-20120329/
+
+
+----------------------------------------------
+Test Environment
+----------------------------------------------
+1. Pre-install Testkit-Lite package.
+2. Run these cases as "normal" user.
+
+
+----------------------------------------------
+Pre-conditions
+----------------------------------------------
+For Test Cases:
+            security.drawImage.canvas.html
+            security.drawImage.image.html
+            security.pattern.canvas.fillStyle.html
+            security.pattern.canvas.strokeStyle.html
+            security.pattern.cross.html
+            security.pattern.image.fillStyle.html
+            security.pattern.image.strokeStyle.html
+            security.reset.html
+Steps:
+1. Install Apache server:
+   open terminal and type in this command: sudo apt-get install apache2
+   (Note: If you have installed Apache2 and configured the virtual host, you can skip to step 3.)
+2. Configure virtual host, do the following steps:
+     (1).Create /etc/apache2/sites-available/webtestingservice:
+          NameVirtualHost *:8081
+          Listen 8081
+
+          <VirtualHost *:8081>
+              ServerAdmin your-mail-address
+          </VirtualHost>
+
+          Alias /opt "/var/www/opt/"
+          <Directory "/var/www/opt/">
+              Options Indexes FollowSymLinks MultiViews
+              AllowOverride None
+              Order deny,allow
+              Allow from all
+          </Directory>
+     (2).Enable the /etc/apache2/sites-enable/webtestingservice in Apache2:
+         $cd /etc/apache2/sites-enabled/
+         $sudo ln -s /etc/apache2/sites-available/webtestingservice 001-webtestingservice
+
+3. Create the web project directory:
+   open terminal and type in this command: mkdir -p /var/www/opt/tct-canvas-html5-tests;
+4. Properly organize the web resources:
+   opt/tct-canvas-html5-tests/resources  -->  /var/www/opt/tct-canvas-html5-tests
+   opt/tct-canvas-html5-tests/canvas  -->  /var/www/opt/tct-canvas-html5-tests
+5. Modify tct-canvas-html5-tests/tests.xml to change the est_script_entry node from 'http://127.0.0.1:8080' to 'http://192.168.13.28:8080'(If your IP address is 192.168.13.28);
+6. Modify following TCs in /var/www/opt/tct-canvas-html5-tests/canvas/w3c/
+        security.drawImage.canvas.html
+        security.drawImage.image.html
+        security.pattern.canvas.fillStyle.html
+        security.pattern.canvas.strokeStyle.html
+        security.reset.html
+   change:
+   'http://127.0.0.1:8081'
+   to:
+   http://192.168.13.28:8081'(If your IP address is 192.168.13.28);
+7. Restart Apache server:
+   open terminal and type in this command: sudo /etc/init.d/apache2 restart
+
+
+----------------------------------------------
+Build and Run
+----------------------------------------------
+(Suppose you only get the source code and Testkit-Lite has been set up on your test machine.
+ If you have obtained tct-canvas-html5-tests ZIP packages, you can directly go to step 3 on the test machine;
+ if you have not installed Testkit-Lite, you need to install the latest version.)
+
+Steps:
+1. Prepare for building by running the following command:
+   cd tct-canvas-html5-tests
+
+2. Build ZIP package by running the following command:
+   ./pack.sh
+
+3. Unzip the package on the test machine by running the following command:
+   unzip -o tct-canvas-html5-tests-<version>.zip -d /home/owner/share/tct
+
+4. Install the package on the test machine by running the following command:
+   /home/owner/share/tct/opt/tct-canvas-html5-tests/inst.sh
+
+5. Run test cases by running the following command on host:
+   testkit-lite -f device:/home/owner/share/tct/opt/tct-canvas-html5-tests/tests.xml -e "WRTLauncher" -o tct-canvas-html5-tests.results.xml
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse.html b/common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse.html
new file mode 100644 (file)
index 0000000..0ec66c3
--- /dev/null
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasPathMethods_ellipse</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasPathMethods_ellipse
+//==== LABEL Check if ellipse() correctly draws the ellipse.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasPathMethods:ellipse M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MMINA MAST
+
+test(function () {
+    var canvas, ctx, retVal = null, imageData, data;
+
+    canvas = document.createElement('canvas');
+    document.body.appendChild(canvas);
+    canvas.setAttribute('width', '400');
+    canvas.setAttribute('height', '400');
+    ctx = canvas.getContext('2d');
+    ctx.fillStyle="rgba(255, 255, 255, 1.0)";
+    ctx.fillRect(0, 0, 400, 400);
+    ctx.strokeStyle="rgba(0, 0, 0, 1.0)";
+    ctx.lineWidth = 10;
+    ctx.beginPath();
+    ctx.moveTo(0, 100);
+    retVal = ctx.ellipse(200, 200, 100, 150, Math.PI / 9, -Math.PI, Math.PI * 5 / 9);
+    assert_equals(retVal, undefined, "Return value should be undefined.");
+    ctx.lineTo(0, 300);
+    ctx.stroke();
+    imageData = ctx.getImageData(101, 179, 1, 1);
+    data = imageData.data;
+    assert_equals(data[0], 255, "data[0] should be 255.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_exist.html
new file mode 100644 (file)
index 0000000..c94ad78
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasPathMethods_ellipse_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasPathMethods_ellipse_exist
+//==== LABEL Check if method ellipse() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasPathMethods:ellipse M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "ellipse");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_misarg.html b/common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_misarg.html
new file mode 100644 (file)
index 0000000..15d74a1
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasPathMethods_ellipse_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasPathMethods_ellipse_misarg
+//==== LABEL Check if ellipse() method throws exception when argument is missing.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasPathMethods:ellipse M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    assert_throws({name: "TypeError"}, function () {
+        ctx.ellipse();
+    }, "Missing non-optional argument should throw an exception");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_with_anticlockwise.html b/common/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_with_anticlockwise.html
new file mode 100644 (file)
index 0000000..7a2abdf
--- /dev/null
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasPathMethods_ellipse_with_anticlockwise</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasPathMethods_ellipse_with_anticlockwise
+//==== LABEL Check if ellipse() correctly draws the ellipse with anticlockwise.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasPathMethods:ellipse M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods
+//==== PRIORITY P1
+//==== TEST_CRITERIA MOA MR
+
+test(function () {
+    var canvas, ctx, retVal = null, imageData, data;
+
+    canvas = document.createElement('canvas');
+    document.body.appendChild(canvas);
+    canvas.setAttribute('width', '400');
+    canvas.setAttribute('height', '400');
+    ctx = canvas.getContext('2d');
+    ctx.fillStyle="rgba(255, 255, 255, 1.0)";
+    ctx.fillRect(0, 0, 400, 400);
+    ctx.strokeStyle="rgba(0, 0, 0, 1.0)";
+    ctx.lineWidth = 10;
+    ctx.beginPath();
+    ctx.moveTo(0, 100);
+    retVal = ctx.ellipse(200, 200, 100, 150, Math.PI / 9, -Math.PI, Math.PI * 5 / 9, false);
+    assert_equals(retVal, undefined, "Return value should be undefined.");
+    ctx.lineTo(0, 300);
+    ctx.stroke();
+    imageData = ctx.getImageData(101, 179, 1, 1);
+    data = imageData.data;
+    assert_equals(data[0], 255, "data[0] should be 255.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasPattern_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasPattern_exist.html
new file mode 100644 (file)
index 0000000..7833c9f
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: CanvasPattern_exist</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#canvaspattern"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if CanvasPattern exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+            var canvas = document.getElementById("canvas");
+            assert_true('height' in canvas, "Check if canvas.height exists");
+            assert_true("CanvasPattern" in window,"CanvasPattern does not exist");
+        });
+        
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion.html
new file mode 100644 (file)
index 0000000..d224211
--- /dev/null
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_addHitRegion</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="400" height="400">
+  <button id="face"></button>
+  <button id="eyes"></button>
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_addHitRegion
+//==== LABEL Check if addHitRegion() correctly adds hit region.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:addHitRegion M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MMINA
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    ctx.beginPath();
+    ctx.fillStyle = "red";
+    ctx.rect(125, 240, 150, 20);
+    ctx.fill();
+    retVal = ctx.addHitRegion({ id : "mouth" });
+    assert_equals(retVal, undefined, "Return value should be undefined.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_exist.html
new file mode 100644 (file)
index 0000000..9bb93d2
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_addHitRegion_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_addHitRegion_exist
+//==== LABEL Check if method addHitRegion() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:addHitRegion M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "addHitRegion");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_misarg.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_misarg.html
new file mode 100644 (file)
index 0000000..4ac06dc
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_addHitRegion_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_addHitRegion_misarg
+//==== LABEL Check if addHitRegion() method throws exception when argument is missing.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:addHitRegion M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    assert_throws({name: "NotSupportedError"}, function () {
+        ctx.addHitRegion();
+    }, "Missing non-optional argument should throw an exception");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions.html
new file mode 100644 (file)
index 0000000..fe25818
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_clearHitRegions</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="400" height="400">
+  <button id="face"></button>
+  <button id="eyes"></button>
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_clearHitRegions
+//==== LABEL Check if clearHitRegions() correctly clears hit region.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:clearHitRegions M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MNA
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    ctx.beginPath();
+    ctx.fillStyle = "red";
+    ctx.rect(125, 240, 150, 20);
+    ctx.fill();
+    ctx.addHitRegion({ id : "mouth" });
+    retVal = ctx.clearHitRegions();
+    assert_equals(retVal, undefined, "Return value should be undefined.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_exist.html
new file mode 100644 (file)
index 0000000..2c7bf5b
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_clearHitRegions_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_clearHitRegions_exist
+//==== LABEL Check if method clearHitRegions() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:clearHitRegions M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "clearHitRegions");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_extra_argument.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_extra_argument.html
new file mode 100644 (file)
index 0000000..c0e291a
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_clearHitRegions_extra_argument</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_clearHitRegions_extra_argument
+//==== LABEL Check using clearHitRegions() with extra argument.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:clearHitRegions M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MNAEX
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    checkExtraArgument(ctx, "clearHitRegions");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData.html
new file mode 100644 (file)
index 0000000..1728e42
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_createImageData</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_createImageData
+//==== LABEL Check if createImageData() correctly creates image data.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:createImageData M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MAST
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    retVal = ctx.createImageData(100,50)
+    assert_type(retVal, "object", "Return value should be type object.");
+    assert_equals(retVal.width, 100, "Width should be 100.");
+    assert_equals(retVal.height, 50, "Height should be 50.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_exist.html
new file mode 100644 (file)
index 0000000..c463091
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_createImageData_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_createImageData_exist
+//==== LABEL Check if method createImageData() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:createImageData M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "createImageData");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_misarg.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_misarg.html
new file mode 100644 (file)
index 0000000..71ecfad
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_createImageData_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_createImageData_misarg
+//==== LABEL Check if createImageData() method throws exception when argument is missing.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:createImageData M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    assert_throws({name: "TypeError"}, function () {
+        ctx.createImageData();
+    }, "Missing non-optional argument should throw an exception");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_currentTransform_attribute.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_currentTransform_attribute.html
new file mode 100644 (file)
index 0000000..46d6b55
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_currentTransform_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_currentTransform_attribute
+//==== LABEL Check if attribute currentTransform of CanvasRenderingContext2D exists, has type object.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:currentTransform A
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT
+
+test(function () {
+    var canvas, ctx, tmp;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    assert_true("currentTransform" in ctx, "currentTransform doesn't exist in provided object.");
+    assert_type(ctx.currentTransform, "object", "Type of currentTransform is incorrect.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_direction_attribute.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_direction_attribute.html
new file mode 100644 (file)
index 0000000..178c8cf
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_direction_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_direction_attribute
+//==== LABEL Check if attribute direction of CanvasRenderingContext2D exists, has type string.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:direction A
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_readonly(ctx, "direction", ctx.direction, "string", ctx.direction+"5");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_filter_attribute.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_filter_attribute.html
new file mode 100644 (file)
index 0000000..6a6be49
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_filter_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_filter_attribute
+//==== LABEL Check if attribute filter of CanvasRenderingContext2D exists, has type string.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:filter A
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_readonly(ctx, "filter", ctx.filter, "string", ctx.filter+"5");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes.html
new file mode 100644 (file)
index 0000000..4afe64d
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_getContextAttributes</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_getContextAttributes
+//==== LABEL Check if getContextAttributes() correctly gets context attributes.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:getContextAttributes M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MNA
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    retVal = ctx.getContextAttributes();
+    assert_type(retVal, "object", "Return value should be type object.");
+    assert_equals(retVal.alpha, true, "Attribute alpha should be true.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_exist.html
new file mode 100644 (file)
index 0000000..0151d49
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_getContextAttributes_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_getContextAttributes_exist
+//==== LABEL Check if method getContextAttributes() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:getContextAttributes M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "getContextAttributes");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_extra_argument.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_extra_argument.html
new file mode 100644 (file)
index 0000000..52901d7
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_getContextAttributes_extra_argument</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_getContextAttributes_extra_argument
+//==== LABEL Check using getContextAttributes() with extra argument.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:getContextAttributes M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MNAEX
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    checkExtraArgument(ctx, "getContextAttributes");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_imageSmoothingEnabled_attribute.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_imageSmoothingEnabled_attribute.html
new file mode 100644 (file)
index 0000000..b405e40
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_imageSmoothingEnabled_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_imageSmoothingEnabled_attribute
+//==== LABEL Check if attribute imageSmoothingEnabled of CanvasRenderingContext2D exists, has type boolean.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:imageSmoothingEnabled A
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ASG AN
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_attribute(ctx, "imageSmoothingEnabled", ctx.imageSmoothingEnabled, "boolean", !ctx.imageSmoothingEnabled);
+    check_not_nullable(ctx, "imageSmoothingEnabled");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost.html
new file mode 100644 (file)
index 0000000..86e3a26
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_isContextLost</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_isContextLost
+//==== LABEL Check if isContextLost() method shows whether context is lost.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:isContextLost M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MNA
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    retVal = ctx.isContextLost();
+    assert_type(retVal, "boolean", "Return value should be type boolean.");
+    assert_equals(retVal, false, "Context should not be lost.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_exist.html
new file mode 100644 (file)
index 0000000..e267a9b
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_isContextLost_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_isContextLost_exist
+//==== LABEL Check if method isContextLost() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:isContextLost M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "isContextLost");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_extra_argument.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_extra_argument.html
new file mode 100644 (file)
index 0000000..41fbeed
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_isContextLost_extra_argument</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_isContextLost_extra_argument
+//==== LABEL Check using isContextLost() with extra argument.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:isContextLost M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MNAEX
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    checkExtraArgument(ctx, "isContextLost");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke.html
new file mode 100644 (file)
index 0000000..cea39bb
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_isPointInStroke</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_isPointInStroke
+//==== LABEL Check if isPointInStroke() correctly returns whether point is in stroke.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:isPointInStroke M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.createElement('canvas');
+    ctx = canvas.getContext("2d");
+    ctx.beginPath();
+    ctx.rect(20,20,100,100);
+    retVal = ctx.isPointInStroke(20,20);
+    assert_type(retVal, "boolean", "Return value should be type boolean.");
+    assert_equals(retVal, true, "Return value should be true.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_exist.html
new file mode 100644 (file)
index 0000000..5636117
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_isPointInStroke_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_isPointInStroke_exist
+//==== LABEL Check if method isPointInStroke() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:isPointInStroke M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "isPointInStroke");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_misarg.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_misarg.html
new file mode 100644 (file)
index 0000000..5cf0d39
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_isPointInStroke_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_isPointInStroke_misarg
+//==== LABEL Check if isPointInStroke() method throws exception when argument is missing.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:isPointInStroke M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    assert_throws({name: "TypeError"}, function () {
+        ctx.isPointInStroke();
+    }, "Missing non-optional argument should throw an exception");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_with_path.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_with_path.html
new file mode 100644 (file)
index 0000000..82bdc72
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_isPointInStroke_with_path</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_isPointInStroke_with_path
+//==== LABEL Check if isPointInStroke() correctly returns whether point is in stroke with path.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:isPointInStroke M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.createElement('canvas');
+    ctx = canvas.getContext("2d");
+    path = new Path2D();
+    path.rect(20,20,100,100);
+    retVal = ctx.isPointInStroke(path,20,20);
+    assert_type(retVal, "boolean", "Return value should be type boolean.");
+    assert_equals(retVal, true, "Return value should be true.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion.html
new file mode 100644 (file)
index 0000000..9e80e70
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_removeHitRegion</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="400" height="400">
+  <button id="face"></button>
+  <button id="eyes"></button>
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_removeHitRegion
+//==== LABEL Check if clearHitRegions() correctly removes hit region.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:removeHitRegion M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    ctx.beginPath();
+    ctx.fillStyle = "red";
+    ctx.rect(125, 240, 150, 20);
+    ctx.fill();
+    ctx.addHitRegion({ id : "mouth" });
+    retVal = ctx.removeHitRegion("mouth");
+    assert_equals(retVal, undefined, "Return value should be undefined.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_exist.html
new file mode 100644 (file)
index 0000000..decfa6f
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_removeHitRegion_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_removeHitRegion_exist
+//==== LABEL Check if method removeHitRegion() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:removeHitRegion M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "removeHitRegion");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_misarg.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_misarg.html
new file mode 100644 (file)
index 0000000..13f2441
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_removeHitRegion_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_removeHitRegion_misarg
+//==== LABEL Check if removeHitRegion() method throws exception when argument is missing.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:removeHitRegion M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    assert_throws({name: "TypeError"}, function () {
+        ctx.removeHitRegion();
+    }, "Missing non-optional argument should throw an exception");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform.html
new file mode 100644 (file)
index 0000000..f84ab13
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_resetTransform</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_resetTransform
+//==== LABEL Check if resetTransform() correctly resets transform.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:resetTransform M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MNA
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.createElement("canvas");
+    ctx = canvas.getContext("2d");
+    ctx.beginPath();
+    ctx.rect(0,0,100,100);
+    ctx.save();
+    ctx.setTransform(0.5, 0, 0, 0.5, 10, 10);
+    ctx.fillStyle = 'red';
+    ctx.fillRect(0, 0, 100, 100);
+    retVal = ctx.resetTransform();
+    ctx.save();
+    assert_equals(retVal, undefined, "Return value should be undefined.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_exist.html
new file mode 100644 (file)
index 0000000..c09958a
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_resetTransform_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_resetTransform_exist
+//==== LABEL Check if method resetTransform() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:resetTransform M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "resetTransform");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_extra_argument.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_extra_argument.html
new file mode 100644 (file)
index 0000000..8d03660
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_resetTransform_extra_argument</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_resetTransform_extra_argument
+//==== LABEL Check using resetTransform() with extra argument.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:resetTransform M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MNAEX
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    checkExtraArgument(ctx, "resetTransform");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView.html
new file mode 100644 (file)
index 0000000..a6e18c1
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_scrollPathIntoView</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_scrollPathIntoView
+//==== LABEL Check if scrollPathIntoView() correctly scrolls path into view.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:scrollPathIntoView M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MMINA
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.createElement('canvas');
+    ctx = canvas.getContext("2d");
+    ctx.rect(-50, -50, 100, 100);
+    ctx.clearRect(0, 0, 400, 400);
+    ctx.save();
+    ctx.translate(200, 200);
+    ctx.beginPath();
+    ctx.stroke();
+    retVal = ctx.scrollPathIntoView();
+    assert_equals(retVal, undefined, "Return value should be undefined.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_exist.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_exist.html
new file mode 100644 (file)
index 0000000..896858f
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_scrollPathIntoView_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_scrollPathIntoView_exist
+//==== LABEL Check if method scrollPathIntoView() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:scrollPathIntoView M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_method_exists(ctx, "scrollPathIntoView");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_with_path.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_with_path.html
new file mode 100644 (file)
index 0000000..1a4bba6
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_scrollPathIntoView_with_path</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_scrollPathIntoView_with_path
+//==== LABEL Check if scrollPathIntoView() correctly scrolls path into view with path.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:scrollPathIntoView M
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA MOA MR
+
+test(function () {
+    var canvas, ctx, retVal = null;
+
+    canvas = document.createElement('canvas');
+    ctx = canvas.getContext("2d");
+    path = new Path2D();
+    path.rect(-50, -50, 100, 100);
+    ctx.clearRect(0, 0, 400, 400);
+    ctx.save();
+    ctx.translate(200, 200);
+    ctx.beginPath();
+    ctx.stroke(path);
+    retVal = ctx.scrollPathIntoView(path);
+    assert_equals(retVal, undefined, "Return value should be undefined.");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_webkitImageSmoothingEnabled_attribute.html b/common/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_webkitImageSmoothingEnabled_attribute.html
new file mode 100644 (file)
index 0000000..04ab51a
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>CanvasRenderingContext2D_webkitImageSmoothingEnabled_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: CanvasRenderingContext2D_webkitImageSmoothingEnabled_attribute
+//==== LABEL Check if attribute webkitImageSmoothingEnabled of CanvasRenderingContext2D exists, has type boolean.
+//==== SPEC Tizen Web API:Graphics:Canvas:CanvasRenderingContext2D:webkitImageSmoothingEnabled A
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ASG AN
+
+test(function () {
+    var canvas, ctx;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    check_attribute(ctx, "webkitImageSmoothingEnabled", ctx.webkitImageSmoothingEnabled, "boolean", !ctx.webkitImageSmoothingEnabled);
+    check_not_nullable(ctx, "webkitImageSmoothingEnabled");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob.html b/common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob.html
new file mode 100644 (file)
index 0000000..40a9c43
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>HTMLCanvasElement_toBlob</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: HTMLCanvasElement_toBlob
+//==== LABEL Check if toBlob() correctly callbacks a Blob object.
+//==== SPEC Tizen Web API:Graphics:Canvas:HTMLCanvasElement:toBlob M
+//==== SPEC_URL https://html.spec.whatwg.org/#the-canvas-element
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR MMINA MAST
+
+setup({timeout: 120000});
+var t = async_test(document.title, {timeout: 120000}), canvas, ctx, newImg, callback, url, canvas2, ctx2, retVal = null;
+
+t.step(function () {
+    canvas = document.createElement("canvas");
+    ctx = canvas.getContext("2d");
+    ctx.fillStyle = "#FF0000";
+    ctx.fillRect(0, 0, 150, 75);
+    newImg = new Image();
+    canvas2 = document.createElement("canvas");
+    ctx2 = canvas2.getContext("2d");
+
+    callback = t.step_func(function (blob) {
+        assert_equals(retVal, undefined, "Return value should be undefined.");
+        url = URL.createObjectURL(blob);
+        newImg.src = url;
+    });
+
+    newImg.onload = t.step_func(function () {
+        ctx2.drawImage(newImg, 0, 0, 150, 75);
+        assert_equals(ctx2.getImageData(0, 0, 150, 75).data[4], ctx.getImageData(0, 0, 150, 75).data[4],
+            "Got image data of the two contexts should be equal.");
+        t.done();
+    });
+
+    retVal = canvas.toBlob(callback);
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_exist.html b/common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_exist.html
new file mode 100644 (file)
index 0000000..802d4a1
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>HTMLCanvasElement_toBlob_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: HTMLCanvasElement_toBlob_exist
+//==== LABEL Check if method toBlob() exists.
+//==== SPEC Tizen Web API:Graphics:Canvas:HTMLCanvasElement:toBlob M
+//==== SPEC_URL https://html.spec.whatwg.org/#the-canvas-element
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    var canvas = document.createElement("canvas");
+    check_method_exists(canvas, "toBlob");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_misarg.html b/common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_misarg.html
new file mode 100644 (file)
index 0000000..808e318
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>HTMLCanvasElement_toBlob_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: HTMLCanvasElement_toBlob_misarg
+//==== LABEL Check if toBlob() method throws exception when argument is missing.
+//==== SPEC Tizen Web API:Graphics:Canvas:HTMLCanvasElement:toBlob M
+//==== SPEC_URL https://html.spec.whatwg.org/#the-canvas-element
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    var canvas = document.createElement("canvas");
+    assert_throws({name: "TypeError"}, function () {
+        canvas.toBlob();
+    }, "Missing non-optional argument should throw an exception");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_with_arguments.html b/common/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_with_arguments.html
new file mode 100644 (file)
index 0000000..44b20f9
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>HTMLCanvasElement_toBlob_with_arguments</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="mycanvas"></canvas>
+<img id="result">
+<div id="log"></div>
+<script>
+//==== TEST: HTMLCanvasElement_toBlob_with_arguments
+//==== LABEL Check if toBlob() correctly callbacks a Blob object with type.
+//==== SPEC Tizen Web API:Graphics:Canvas:HTMLCanvasElement:toBlob M
+//==== SPEC_URL https://html.spec.whatwg.org/#the-canvas-element
+//==== PRIORITY P1
+//==== TEST_CRITERIA MOA MR MAST
+
+setup({timeout: 120000});
+var t = async_test(document.title, {timeout: 120000}), canvas, ctx, image, callback, url, retVal = null;
+
+t.step(function () {
+    image = new Image();
+
+    callback = t.step_func(function (blob) {
+        assert_equals(retVal, undefined, "Return value should be undefined.");
+        url = URL.createObjectURL(blob);
+        result.src = url;
+        t.done();
+    });
+
+    image.onload = t.step_func(function () {
+    canvas = document.getElementById("mycanvas");
+    ctx = canvas.getContext("2d");
+        canvas.width = image.width;
+        canvas.height = image.height;
+        ctx.drawImage(image, 0, 0);
+        retVal = canvas.toBlob(callback, "image/jpeg", 0.2);
+    });
+
+    image.src = "images/letters.png";
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/MouseEvent_region_attribute.html b/common/tct-canvas-html5-tests/canvas/MouseEvent_region_attribute.html
new file mode 100644 (file)
index 0000000..943019d
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>MouseEvent_region_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: MouseEvent_region_attribute
+//==== LABEL Check if attribute region of MouseEvent exists, has type string.
+//==== SPEC Tizen Web API:Graphics:Canvas:MouseEvent:region A
+//==== SPEC_URL http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#MouseEvent-partial
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var event = new MouseEvent("5");
+    check_readonly(event, "region", event.region, "string", event.region+"5");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxAscent_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxAscent_attribute.html
new file mode 100644 (file)
index 0000000..deddaa6
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_actualBoundingBoxAscent_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_actualBoundingBoxAscent_attribute
+//==== LABEL Check if attribute actualBoundingBoxAscent of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:actualBoundingBoxAscent A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "actualBoundingBoxAscent", metrics.actualBoundingBoxAscent, "double", metrics.actualBoundingBoxAscent+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxDescent_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxDescent_attribute.html
new file mode 100644 (file)
index 0000000..f33bf61
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_actualBoundingBoxDescent_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_actualBoundingBoxDescent_attribute
+//==== LABEL Check if attribute actualBoundingBoxDescent of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:actualBoundingBoxDescent A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "actualBoundingBoxDescent", metrics.actualBoundingBoxDescent, "double", metrics.actualBoundingBoxDescent+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxLeft_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxLeft_attribute.html
new file mode 100644 (file)
index 0000000..92331d7
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_actualBoundingBoxLeft_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_actualBoundingBoxLeft_attribute
+//==== LABEL Check if attribute actualBoundingBoxLeft of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:actualBoundingBoxLeft A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "actualBoundingBoxLeft", metrics.actualBoundingBoxLeft, "double", metrics.actualBoundingBoxLeft+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxRight_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxRight_attribute.html
new file mode 100644 (file)
index 0000000..8942e86
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_actualBoundingBoxRight_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_actualBoundingBoxRight_attribute
+//==== LABEL Check if attribute actualBoundingBoxRight of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:actualBoundingBoxRight A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "actualBoundingBoxRight", metrics.actualBoundingBoxRight, "double", metrics.actualBoundingBoxRight+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_alphabeticBaseline_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_alphabeticBaseline_attribute.html
new file mode 100644 (file)
index 0000000..b2e61a5
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_alphabeticBaseline_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_alphabeticBaseline_attribute
+//==== LABEL Check if attribute alphabeticBaseline of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:alphabeticBaseline A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "alphabeticBaseline", metrics.alphabeticBaseline, "double", metrics.alphabeticBaseline+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_emHeightAscent_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_emHeightAscent_attribute.html
new file mode 100644 (file)
index 0000000..569d707
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_emHeightAscent_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_emHeightAscent_attribute
+//==== LABEL Check if attribute emHeightAscent of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:emHeightAscent A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "emHeightAscent", metrics.emHeightAscent, "double", metrics.emHeightAscent+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_emHeightDescent_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_emHeightDescent_attribute.html
new file mode 100644 (file)
index 0000000..3603083
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_emHeightDescent_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_emHeightDescent_attribute
+//==== LABEL Check if attribute emHeightDescent of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:emHeightDescent A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "emHeightDescent", metrics.emHeightDescent, "double", metrics.emHeightDescent+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxAscent_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxAscent_attribute.html
new file mode 100644 (file)
index 0000000..8cb3b65
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_fontBoundingBoxAscent_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_fontBoundingBoxAscent_attribute
+//==== LABEL Check if attribute fontBoundingBoxAscent of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:fontBoundingBoxAscent A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "fontBoundingBoxAscent", metrics.fontBoundingBoxAscent, "double", metrics.fontBoundingBoxAscent+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxDescent_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxDescent_attribute.html
new file mode 100644 (file)
index 0000000..8d2ce54
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_fontBoundingBoxDescent_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_fontBoundingBoxDescent_attribute
+//==== LABEL Check if attribute fontBoundingBoxDescent of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:fontBoundingBoxDescent A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "fontBoundingBoxDescent", metrics.fontBoundingBoxDescent, "double", metrics.fontBoundingBoxDescent+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_hangingBaseline_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_hangingBaseline_attribute.html
new file mode 100644 (file)
index 0000000..5bcbe9a
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_hangingBaseline_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_hangingBaseline_attribute
+//==== LABEL Check if attribute hangingBaseline of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:hangingBaseline A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "hangingBaseline", metrics.hangingBaseline, "double", metrics.hangingBaseline+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/TextMetrics_ideographicBaseline_attribute.html b/common/tct-canvas-html5-tests/canvas/TextMetrics_ideographicBaseline_attribute.html
new file mode 100644 (file)
index 0000000..7cb7f79
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Wei Ji <wei.ji@samsung.com>
+
+-->
+<html>
+<head>
+<title>TextMetrics_ideographicBaseline_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+    Your browser does not support the canvas element.
+</canvas>
+<div id="log"></div>
+<script>
+//==== TEST: TextMetrics_ideographicBaseline_attribute
+//==== LABEL Check if attribute ideographicBaseline of TextMetrics exists, has type double.
+//==== SPEC Tizen Web API:Graphics:Canvas:TextMetrics:ideographicBaseline A
+//==== SPEC_URL https://html.spec.whatwg.org/#textmetrics
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ARO
+
+test(function () {
+    var canvas, ctx, metrics;
+
+    canvas = document.getElementById("canvas");
+    ctx = canvas.getContext("2d");
+    metrics = ctx.measureText("T");
+    check_readonly(metrics, "ideographicBaseline", metrics.ideographicBaseline, "double", metrics.ideographicBaseline+5.0);
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_arcTo_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_arcTo_exist.html
new file mode 100644 (file)
index 0000000..8482f9a
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_arcTo_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.arcTo exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('arcTo');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_arc_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_arc_exist.html
new file mode 100644 (file)
index 0000000..0d8d237
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_arc_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.arc exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('arc');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_attributes.html b/common/tct-canvas-html5-tests/canvas/canvas2d_attributes.html
new file mode 100644 (file)
index 0000000..4fda788
--- /dev/null
@@ -0,0 +1,135 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<meta charset="utf-8">
+<title>Canvas Test: canvas2d_attributes</title>
+<link rel="author" title="Intel" href="http://www.intel.com">
+<link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/">
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+var element = document.createElement("canvas");
+var canvas = element.getContext('2d');
+[
+
+  ["function", "arc"],
+  ["function", "arcTo"],
+  ["function", "beginPath"],
+  ["function", "bezierCurveTo"],
+  ["object", "canvas"],
+  ["function", "clearRect"],
+  ["function", "clip"],
+  ["function", "closePath"],
+  ["function", "createImageData"],
+  ["function", "createLinearGradient"],
+  ["function", "createPattern"],
+  ["function", "createRadialGradient"],
+  ["function", "drawImage"],
+  ["function", "fill"],
+  ["function", "fillRect"],
+  ["any", "fillStyle"],
+  ["function", "fillText"],
+  ["DOMString", "font"],
+  ["function", "getImageData"],
+  ["double", "globalAlpha"],
+  ["DOMString", "globalCompositeOperation"],
+  ["function", "isPointInPath"],
+  ["DOMString", "lineCap"],
+  ["DOMString", "lineJoin"],
+  ["function", "lineTo"],
+  ["double", "lineWidth"],
+  ["function", "measureText"],
+  ["double", "miterLimit"],
+  ["function", "moveTo"],
+  ["function", "putImageData"],
+  ["function", "quadraticCurveTo"],
+  ["function", "rect"],
+  ["function", "restore"],
+  ["function", "rotate"],
+  ["function", "save"],
+  ["function", "scale"],
+  ["function", "setTransform"],
+  ["double", "shadowBlur"],
+  ["DOMString", "shadowColor"],
+  ["double", "shadowOffsetX"],
+  ["double", "shadowOffsetY"],
+  ["function", "stroke"],
+  ["function", "strokeRect"],
+  ["any", "strokeStyle"],
+  ["function", "strokeText"],
+  ["DOMString", "textAlign"],
+  ["DOMString", "textBaseline"],
+  ["function", "transform"],
+  ["function", "translate"],
+
+].forEach(function(attr) {
+  var type = attr[0];
+  var name = attr[1];
+
+  // existence check
+  test(function() {
+    assert_true(name in canvas, "The canvas." + name + " exists");
+  }, "Check if the canvas." + name + " exists");
+
+  //check type
+  switch(type) {
+
+    case "function":
+        test(function() {
+            assert_equals(typeof canvas[name], "function", "The type of canvas." + name);
+        }, "Check if the type of canvas." + name + " is function");
+        break;
+
+    case "object":
+        test(function() {
+            assert_equals(typeof canvas[name], "object", "The type of canvas." + name);
+        }, "Check if the type of canvas." + name + " is object");
+        break;
+
+    case "DOMString":
+        test(function() {
+            assert_equals(typeof canvas[name], "string", "The type of canvas." + name);
+        }, "Check if the type of canvas." + name + " is string");
+        break;
+
+    case "double":
+        test(function() {
+            assert_equals(typeof canvas[name], "number", "The type of canvas." + name);
+        }, "Check if the type of canvas." + name + " is number");
+        break;
+
+    default:
+        break;
+  }
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_beginPath_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_beginPath_exist.html
new file mode 100644 (file)
index 0000000..4c9bfc1
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_beginPath_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beginpath" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.beginPath exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('beginPath');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_bezierCurveTo_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_bezierCurveTo_exist.html
new file mode 100644 (file)
index 0000000..65140a7
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_bezierCurveTo_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beziercurveto" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.bezierCurveTo exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('bezierCurveTo');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_canvas_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_canvas_exist.html
new file mode 100644 (file)
index 0000000..2a3e2ba
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_canvas_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.canvas exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('canvas');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_clearRect_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_clearRect_exist.html
new file mode 100644 (file)
index 0000000..e95e0d9
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_clearRect_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.clearRect exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('clearRect');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_clip_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_clip_exist.html
new file mode 100644 (file)
index 0000000..2ca7771
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_clip_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.clip exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+         canvas_property_exists('clip');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_closePath_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_closePath_exist.html
new file mode 100644 (file)
index 0000000..ff64673
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_closePath_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-closepath" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.closePath exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('closePath');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_basic.html b/common/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_basic.html
new file mode 100644 (file)
index 0000000..5f880a7
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_createLinearGradient_basic</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-createLinearGradient"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check canvas2d.createLinearGradient works normal"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="/support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var canvas, context;
+            canvas = document.createElement("canvas");
+            context = canvas.getContext("2d");
+            try {
+                context.createLinearGradient(0, 2, 3, 4);
+            } catch(e){
+                assert_unreached("check createLinearGradient basic function failed");
+            }
+        }, document.title);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_exist.html
new file mode 100644 (file)
index 0000000..a02c5f0
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_createLinearGradient_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.createLinearGradient exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('createLinearGradient');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_createPattern_basic.html b/common/tct-canvas-html5-tests/canvas/canvas2d_createPattern_basic.html
new file mode 100644 (file)
index 0000000..1913d3b
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_createPattern_basic</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-createPattern"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check canvas2d.createPattern works normal"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="/support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var canvas, context, img;
+            canvas = document.createElement("canvas");
+            context = canvas.getContext("2d");
+            img = new Image();
+            try {
+                context.createPattern(img, "repeat");
+            } catch(e){
+                assert_unreached("check createPattern basic function failed");
+            }
+        }, document.title);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_createPattern_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_createPattern_exist.html
new file mode 100644 (file)
index 0000000..144c6e1
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_createPattern_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.creatPattern exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('createPattern');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_basic.html b/common/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_basic.html
new file mode 100644 (file)
index 0000000..c2a4200
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_createRadialGradient_basic</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-createradialgradient"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check canvas2d.createRadialGradient works normal"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="/support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var canvas, context, gradient;
+            canvas = document.createElement("canvas");
+            context = canvas.getContext("2d");
+            try {
+                gradient = context.createRadialGradient(0, 0, 1, 0, 0, 1);
+            } catch(e){
+                assert_unreached("check createRadialGradient basic function failed");
+            }
+        }, document.title);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_exist.html
new file mode 100644 (file)
index 0000000..61c11bc
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_createRadialGradient_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.createRadialGradient exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('createRadialGradient');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_return_type.html b/common/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_return_type.html
new file mode 100644 (file)
index 0000000..6370a44
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_createRadialGradient_return_type</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-createradialgradient"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check canvas2d.createRadialGradient return type"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="/support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var canvas, context;
+            canvas = document.createElement("canvas");
+            context = canvas.getContext("2d");
+            assert_true(context.createRadialGradient(0, 0, 200, 0, 1, 1) instanceof CanvasGradient, "return type is wrong,it should be CanvasGradient object" );
+        }, document.title);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_element.html b/common/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_element.html
new file mode 100644 (file)
index 0000000..f117dd4
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_drawFocusIfNeeded_element</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-drawfocusifneeded"/>
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.drawFocusIfNeeded with element object works normaly"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <em id="em"></em>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+    test(function () {
+        var ctx = document.getElementById("canvas").getContext("2d");
+            element = document.getElementById("em");
+        try {
+            ctx.drawFocusIfNeeded(element);
+        }catch(e){
+            assert_unreached("drawFocusIfNeeded throw " + e.message);
+        }
+    },document.title);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_exist.html
new file mode 100644 (file)
index 0000000..0946331
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_drawFocusIfNeeded_exist</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-drawfocusifneeded"/>
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.drawFocusIfNeeded existed"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+    canvas_property_exists("drawFocusIfNeeded");
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_drawImage_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_drawImage_exist.html
new file mode 100644 (file)
index 0000000..504d14a
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_drawImage_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.drawImage exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('drawImage');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_fillRect_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_fillRect_exist.html
new file mode 100644 (file)
index 0000000..7f5f172
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_fillRect_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.fillRect exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('fillRect');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_fillStyle_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_fillStyle_exist.html
new file mode 100644 (file)
index 0000000..0194e43
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_fillStyle_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.FillStyle exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('fillStyle');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_fillText_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_fillText_exist.html
new file mode 100644 (file)
index 0000000..a1bf34d
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_fillText_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.fillText exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('fillText');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_fill_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_fill_exist.html
new file mode 100644 (file)
index 0000000..f8a7673
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_fill_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.fill exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+         canvas_property_exists('fill');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_font_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_font_exist.html
new file mode 100644 (file)
index 0000000..5e1b7a8
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_font_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.font exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('font');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_getImageData_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_getImageData_exist.html
new file mode 100644 (file)
index 0000000..8f08fea
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_getImageData_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.getImageData exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('getImageData');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_basic.html b/common/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_basic.html
new file mode 100644 (file)
index 0000000..b71d124
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_getlinedash_basic</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-getlinedash"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.getlinedash works normaly"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+        var ctx = document.getElementById("canvas").getContext("2d");
+        assert_array_equals(ctx.getLineDash(), [], "fail to getLineDash");
+        ctx.setLineDash([5, 15]);
+        assert_array_equals(ctx.getLineDash(), [5, 15], "fail to change LineDash");
+    },document.title); 
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_checktype.html b/common/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_checktype.html
new file mode 100644 (file)
index 0000000..28b4bb3
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Tang Lei <lei312.tang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_getlinedash_checktype</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-getlinedash"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.getlinedash method return type is object"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var ctx = document.getElementById("canvas").getContext("2d");
+            ctx.setLineDash([5, 15]);
+            assert_equals(typeof ctx.getLineDash(), "object", "Check if the type of canvas.getLineDash is object");
+        },document.title); 
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_exist.html
new file mode 100644 (file)
index 0000000..b94147a
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_getlinedash_exist</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-getlinedash"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.getlinedash existed"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+    canvas_property_exists("getLineDash");
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_globalAlpha_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_globalAlpha_exist.html
new file mode 100644 (file)
index 0000000..abbc78c
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_globalAlpha_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.globalAlpha exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('globalAlpha');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_exist.html
new file mode 100644 (file)
index 0000000..58f420a
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_globalCompositeOperation_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.globalCompositeOperation exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('globalCompositeOperation');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_invalid_value.html b/common/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_invalid_value.html
new file mode 100644 (file)
index 0000000..59c9129
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_globalCompositeOperation_invalid_value</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d" />
+    <meta name="assert" content="Check if globalCompositeOperation is set to a invalid value,then the value must be ignored"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+             var canvas = document.getElementById("canvas");
+             var ctx = canvas.getContext("2d");
+
+             ctx.globalCompositeOperation = "source";
+
+             assert_equals(ctx.globalCompositeOperation, 'source-over', "The value of globalCompositeOperation");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_isPointInPath_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_isPointInPath_exist.html
new file mode 100644 (file)
index 0000000..097bd96
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_isPointInPath_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.isPointInPath exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('isPointInPath');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_lineCap_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_lineCap_exist.html
new file mode 100644 (file)
index 0000000..8cd1558
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_lineCap_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.lineCap exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('lineCap');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_exist.html
new file mode 100644 (file)
index 0000000..bd00cb1
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_lineDashOffset_exist</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com" />
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-linedashoffset"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.lineDashOffset exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        canvas_property_exists("lineDashOffset");
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_type.html b/common/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_type.html
new file mode 100644 (file)
index 0000000..2db111e
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_lineDashOffset_type</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-linedashoffset"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.lineDashOffset type is number"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+    test( function () {
+        var canvas = document.getElementById("canvas");
+        ctx = canvas.getContext("2d");
+        assert_equals(typeof ctx.lineDashOffset, 'number', "The type of canvas.lineDashOffset");
+      });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_value.html b/common/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_value.html
new file mode 100644 (file)
index 0000000..b766575
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_lineDashOffset_value</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-linedashoffset"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.lineDashOffset is writable"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+    test( function () {
+        var canvas = document.getElementById("canvas");
+        ctx = canvas.getContext("2d");
+        assert_equals(ctx.lineDashOffset, 0, "the default value is wrong");
+        ctx.lineDashOffset = 2;
+        assert_equals(ctx.lineDashOffset, 2, "The canvas.lineDashOffset can not be changed");
+      });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_lineJoin_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_lineJoin_exist.html
new file mode 100644 (file)
index 0000000..57d659a
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_lineJoin_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.lineJoin exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('lineJoin');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_lineTo_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_lineTo_exist.html
new file mode 100644 (file)
index 0000000..9f8dd2a
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_lineTo_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-lineto" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.lineTo exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('lineTo');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_default_value.html b/common/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_default_value.html
new file mode 100644 (file)
index 0000000..32a852e
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_lineWidth_default_value</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linewidth" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if the default value of canvas2d.lineWidth is 1"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            assert_equals(cxt.lineWidth, 1, " the default value of canvas2d.lineWidth");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_exist.html
new file mode 100644 (file)
index 0000000..b3d9a43
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_lineWidth_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linewidth" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.lineWidth exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('lineWidth');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_measureText_basic.html b/common/tct-canvas-html5-tests/canvas/canvas2d_measureText_basic.html
new file mode 100644 (file)
index 0000000..c6f29b7
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_measureText_basic</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-measuretext"/>
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.measureText works normaly"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+    test( function () {
+        var canvas = document.getElementById("canvas");
+        ctx = canvas.getContext("2d");
+        tm1 = ctx.measureText("f");
+        tm = ctx.measureText("fff")
+        assert_equals(tm.width, tm1.width * 3, "the length of measureText is not equal to 16");
+      });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_measureText_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_measureText_exist.html
new file mode 100644 (file)
index 0000000..9376eb6
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_measureText_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-measuretext" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.measureText exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('measureText');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_miterLimit_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_miterLimit_exist.html
new file mode 100644 (file)
index 0000000..046335b
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_miterLimit_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-miterlimit" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.translate exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('miterLimit');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_moveTo_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_moveTo_exist.html
new file mode 100644 (file)
index 0000000..db11869
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_moveTo_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-moveto" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.moveTo exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('moveTo');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_putImageData_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_putImageData_exist.html
new file mode 100644 (file)
index 0000000..c19e81f
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_putImageData_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.putImageData exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('putImageData');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_quadraticCurveTo_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_quadraticCurveTo_exist.html
new file mode 100644 (file)
index 0000000..6064c30
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_quadraticCurveTo_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-quadraticcurveto" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.quadraticCurveTo exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('quadraticCurveTo');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_rect_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_rect_exist.html
new file mode 100644 (file)
index 0000000..cbf20e2
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_rect_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.rect exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('rect');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_restore_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_restore_exist.html
new file mode 100644 (file)
index 0000000..dd54e74
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_restore_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.restore exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+         canvas_property_exists('restore');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_rotate_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_rotate_exist.html
new file mode 100644 (file)
index 0000000..b0aa741
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_rotate_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rotate" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.rotate exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('rotate');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_save_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_save_exist.html
new file mode 100644 (file)
index 0000000..ceca569
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_save_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.save exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('save');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_scale_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_scale_exist.html
new file mode 100644 (file)
index 0000000..15d5dbc
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_scale_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-scale" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.scale exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('scale');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_setTransform_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_setTransform_exist.html
new file mode 100644 (file)
index 0000000..130ee83
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_setTransform_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-settransform" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.setTransform exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('setTransform');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_basic.html b/common/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_basic.html
new file mode 100644 (file)
index 0000000..9f621bb
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_setlinedash_basic</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-setlinedash"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.setlinedash works normaly"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+        var ctx = document.getElementById("canvas").getContext("2d");
+        ctx.setLineDash([5, 15]);
+         assert_array_equals(ctx.getLineDash(), [5, 15], "fail to setLineDash");
+    },document.title); 
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_checktype.html b/common/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_checktype.html
new file mode 100644 (file)
index 0000000..edd18b8
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Tang Lei <lei312.tang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_setlinedash_checktype</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-setlinedash"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.setlinedash method return type is undefined"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var ctx = document.getElementById("canvas").getContext("2d");
+            assert_equals(typeof ctx.setLineDash([5, 15]), "undefined", "Check if the type of canvas.setLineDash is object");
+        },document.title); 
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_exist.html
new file mode 100644 (file)
index 0000000..d9e5ea0
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        wang xiaochun <xiaochn.wang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_setlinedash_exist</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-setlinedash"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.setlinedash existed"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+    canvas_property_exists("setLineDash");
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_default.html b/common/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_default.html
new file mode 100644 (file)
index 0000000..84cb74a
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_shadowBlur_default</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-shadowBlur"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check canvas2d.shadowBlur default value"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="/support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var canvas, context;
+            canvas = document.createElement("canvas");
+            context = canvas.getContext("2d");
+            assert_equals(context.shadowBlur, 0, " default value of attribute shadowBlur");
+        }, document.title);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_exist.html
new file mode 100644 (file)
index 0000000..2d5093f
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_shadowBlur_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowblur" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.shadowBlur exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('shadowBlur');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_default.html b/common/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_default.html
new file mode 100644 (file)
index 0000000..c8cd5eb
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_shadowColor_default</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-shadowColor"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check canvas2d.shadowColor default value"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="/support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var canvas, context;
+            canvas = document.createElement("canvas");
+            context = canvas.getContext("2d");
+            assert_equals(context.shadowColor, "rgba(0, 0, 0, 0)", " default value of attribute shadowColor");
+        }, document.title);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_exist.html
new file mode 100644 (file)
index 0000000..bc814e5
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_shadowColor_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.shadowColor exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('shadowColor');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_default.html b/common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_default.html
new file mode 100644 (file)
index 0000000..8007159
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_shadowOffsetX_default</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-shadowoffsetx"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check canvas2d.shadowOffsetX default value"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="/support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var canvas, context;
+            canvas = document.createElement("canvas");
+            context = canvas.getContext("2d");
+            assert_equals(context.shadowOffsetX, 0, " default value of attribute shadowOffsetX");
+        }, document.title);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_exist.html
new file mode 100644 (file)
index 0000000..c4ee1f0
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_shadowOffsetX_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsetx" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.shadowOffsetX exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('shadowOffsetX');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_default.html b/common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_default.html
new file mode 100644 (file)
index 0000000..027dc3f
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_shadowOffsetY_default</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-shadowoffsety"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check canvas2d.shadowOffsetY default value"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="/support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var canvas, context;
+            canvas = document.createElement("canvas");
+            context = canvas.getContext("2d");
+            assert_equals(context.shadowOffsetY, 0, " default value of attribute shadowOffsetY");
+        }, document.title);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_exist.html
new file mode 100644 (file)
index 0000000..e42689c
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_shadowOffsetY_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsety" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.shadowOffsetY exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('shadowOffsetY');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_strokeRect_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_strokeRect_exist.html
new file mode 100644 (file)
index 0000000..1f8204c
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_strokeRect_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.strokeRect exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('strokeRect');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_strokeStyle_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_strokeStyle_exist.html
new file mode 100644 (file)
index 0000000..3730679
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_strokeStyle_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokestyle" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.strokeStyle exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('strokeStyle');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_strokeText_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_strokeText_exist.html
new file mode 100644 (file)
index 0000000..bfac4fe
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_strokeText_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroketext" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.strokeText exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('strokeText');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_stroke_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_stroke_exist.html
new file mode 100644 (file)
index 0000000..820d032
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_stroke_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.stroke exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('stroke');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_textAlign_defaultvalue.html b/common/tct-canvas-html5-tests/canvas/canvas2d_textAlign_defaultvalue.html
new file mode 100644 (file)
index 0000000..a2db723
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Tang Lei <lei312.tang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_textAlign_defaultvalue</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-textalign"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.textAlign default value is start"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+    test( function () {
+        var t, ctx = document.getElementById("canvas").getContext("2d");
+        t = ctx.textAlign;
+        assert_equals(t, "start", "The canvas.lineDashOffset can not be changed");
+    });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_textAlign_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_textAlign_exist.html
new file mode 100644 (file)
index 0000000..98e1d23
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_textAlign_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.textAlign exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('textAlign');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_defaultvalue.html b/common/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_defaultvalue.html
new file mode 100644 (file)
index 0000000..a096fe1
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Tang Lei <lei312.tang@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_textBaseline_defaultvalue</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textbaseline"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvas2d.textBaseline default value is alphabetic"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+    test( function () {
+        var t, ctx = document.getElementById("canvas").getContext("2d");
+        t = ctx.textBaseline;
+        assert_equals(t, "alphabetic", "The canvas.lineDashOffset can not be changed");
+    });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_exist.html
new file mode 100644 (file)
index 0000000..bdfcbea
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_textBaseline_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textbaseline" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.textBaseline exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('textBaseline');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_transform_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_transform_exist.html
new file mode 100644 (file)
index 0000000..e87e48c
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_transform_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-transform" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.strokeText exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('transform');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas2d_translate_exist.html b/common/tct-canvas-html5-tests/canvas/canvas2d_translate_exist.html
new file mode 100644 (file)
index 0000000..483eefe
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas2d_translate_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-translate" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if canvas2d.translate exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+    <script src="support/canvas.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        canvas_property_exists('translate');
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_attributes.html b/common/tct-canvas-html5-tests/canvas/canvas_attributes.html
new file mode 100644 (file)
index 0000000..a4f10cd
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<meta charset="utf-8">
+<title>Canvas Test: canvas_attributes</title>
+<link rel="author" title="Intel" href="http://www.intel.com">
+<link rel="help" href="http://www.w3.org/TR/2dcontext/">
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+var canvas = document.createElement('canvas');
+var ctx = canvas.getContext('2d');
+test(function() {
+  assert_true("ellipse" in ctx, "the method ellipse exists");
+}, "Check if the method ellipse exists");
+
+test(function() {
+  assert_true("setLineDash" in ctx, "the method setLineDash exists");
+}, "Check if the method setLineDash exists");
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_getContext_type.html b/common/tct-canvas-html5-tests/canvas/canvas_getContext_type.html
new file mode 100644 (file)
index 0000000..5e50cb4
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_getContext_type</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html?path=1_6_3_2_0#the-canvas-element" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if the type of canvas.getContext('2d') is CanvasRenderingContext2D"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+        test(function () {
+            var CanvasRenderingContext2D = window.CanvasRenderingContext2D;
+            canvas = document.createElement("canvas");
+            context = canvas.getContext("2d");
+            assert_true(!!CanvasRenderingContext2D, "CanvasRenderingContext2D supported" );
+            assert_true(context instanceof CanvasRenderingContext2D, "context instanceof CanvasRenderingContext2D" );
+        }, document.title);
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_globalCompositeOperation_modes.html b/common/tct-canvas-html5-tests/canvas/canvas_globalCompositeOperation_modes.html
new file mode 100644 (file)
index 0000000..c7bc7a1
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<meta charset="utf-8">
+<title>Canvas Test: canvas_globalCompositeOperation_modes</title>
+<link rel="author" title="Intel" href="http://www.intel.com">
+<link rel="help" href="http://www.w3.org/TR/2dcontext/">
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+test(function() {
+  var canvas = document.createElement('canvas');
+  var ctx = canvas.getContext('2d');
+  canvas.width = 1;
+  canvas.height = 1;
+  ctx.fillStyle = '#fff';
+  ctx.fillRect(0,0,1,1);
+  ctx.globalCompositeOperation = 'screen';
+  ctx.fillStyle = '#000';
+  ctx.fillRect(0,0,1,1);
+  var data = ctx.getImageData(0,0,1,1);
+  assert_equals(ctx.globalCompositeOperation, 'screen', "the ctx.globalCompositeOperation value");
+  assert_equals(data.data[0], 255, "the data value");
+}, "Check if the canvas supports the blending modes");
+</script>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_height_exist.html b/common/tct-canvas-html5-tests/canvas/canvas_height_exist.html
new file mode 100644 (file)
index 0000000..c6972ab
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_height_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if canvas.height exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          assert_true('height' in canvas, "Check if canvas.height exists");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_height_new_value.html b/common/tct-canvas-html5-tests/canvas/canvas_height_new_value.html
new file mode 100644 (file)
index 0000000..79d84b7
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_height_new_value</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if canvas.height is set,the bitmap and any associated contexts must be cleared back to their initial state"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          var ctx = canvas.getContext("2d");
+          ctx.fillStyle = "rgba(255, 0, 0, 1.0)";
+          ctx.fillRect(0, 0, 100, 50);
+          canvas.setAttribute('height', '200'); // clears the canvas
+          var imgdata = ctx.getImageData(45, 45, 1, 1);
+          assert_equals(imgdata.data[0], 0, "The value of imgdata.data[0]");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_height_reflect_value.html b/common/tct-canvas-html5-tests/canvas/canvas_height_reflect_value.html
new file mode 100644 (file)
index 0000000..6dc8594
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_height_reflect_value</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if canvas.height get the height value"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          assert_equals(canvas.height, 200, "The value of canvas.height");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_height_type.html b/common/tct-canvas-html5-tests/canvas/canvas_height_type.html
new file mode 100644 (file)
index 0000000..fdfe7e3
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_height_type</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if the type of canvas.height is 'number'"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          assert_equals(typeof canvas.height, 'number', "The type of canvas.height");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_toDataURL_exist.html b/common/tct-canvas-html5-tests/canvas/canvas_toDataURL_exist.html
new file mode 100644 (file)
index 0000000..799cccb
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_toDataURL_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if canvas.toDataURL exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          assert_true('toDataURL' in canvas, "Check if canvas.toDataURL exists");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_toDataURL_jpeg.html b/common/tct-canvas-html5-tests/canvas/canvas_toDataURL_jpeg.html
new file mode 100644 (file)
index 0000000..dd6d99b
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Cui, Jieqiong <jieqiongx.cui@intel.com>
+
+-->
+
+<meta charset="utf-8">
+<title>Canvas Test: canvas_toDataURL_jpeg</title>
+<link rel="author" title="Intel" href="http://www.intel.com">
+<link rel="help" href="http://www.w3.org/TR/2dcontext/">
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+test(function() {
+  var canvas = document.createElement('canvas');
+  assert_equals(canvas.toDataURL('image/jpeg').substring(5,15), 'image/jpeg', "The return value of toDataURL");
+}, "Check if the toDataURL with image/jpeg returns a jpeg");
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_toDataURL_type.html b/common/tct-canvas-html5-tests/canvas/canvas_toDataURL_type.html
new file mode 100644 (file)
index 0000000..5fceaea
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_toDataURL_type</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if the type of canvas.toDataURL is 'function'"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          assert_equals(typeof canvas.toDataURL, 'function', "The type of canvas.toDataURL");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_width_exist.html b/common/tct-canvas-html5-tests/canvas/canvas_width_exist.html
new file mode 100644 (file)
index 0000000..9b30cd6
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_width_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if canvas.width exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          assert_true('width' in canvas, "Check if canvas.width exists");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_width_new_value.html b/common/tct-canvas-html5-tests/canvas/canvas_width_new_value.html
new file mode 100644 (file)
index 0000000..eae8bfb
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_width_new_value</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if canvas.width is set,the bitmap and any associated contexts must be cleared back to their initial state"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          var ctx = canvas.getContext("2d");
+          ctx.fillStyle = "rgba(255, 0, 0, 1.0)";
+          ctx.fillRect(0, 0, 100, 50);
+          canvas.setAttribute('width', '200'); // clears the canvas
+          var imgdata = ctx.getImageData(45, 45, 1, 1);
+          assert_equals(imgdata.data[0], 0, "The value of canvas.width");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_width_reflect_value.html b/common/tct-canvas-html5-tests/canvas/canvas_width_reflect_value.html
new file mode 100644 (file)
index 0000000..425aa03
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_width_reflect_value</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if canvas.width get the width value"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas" width="300" height="200">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          assert_equals(canvas.width, 300, "The value of canvas.width");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvas_width_type.html b/common/tct-canvas-html5-tests/canvas/canvas_width_type.html
new file mode 100644 (file)
index 0000000..cd0ccf7
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvas_width_type</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element" />
+    <meta name="assert" content="Check if the type of canvas.width is 'number'"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+          var canvas = document.getElementById("canvas");
+          assert_equals(typeof canvas.width, 'number', "The type of canvas.width");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_INDEX_SIZE_ERR.html b/common/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_INDEX_SIZE_ERR.html
new file mode 100644 (file)
index 0000000..582d11f
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvasgradient_addColorStop_INDEX_SIZE_ERR</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/"/>
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasgradient"/>
+    <meta name="assert" content="Check if the offset is less than 0, greater than 1, infinite, or NaN, then an INDEX_SIZE_ERR exception must be raised"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        function invalid_args (offset) {
+            test(function () {
+                var canvas = document.getElementById("canvas");
+                var ctx = canvas.getContext("2d");
+                var lingrad = ctx.createLinearGradient(0, 0, 100, 0);
+                try {
+                    lingrad.addColorStop(offset, "#000000");
+                    assert_true(false, "not throw an INDEX_SIZE_ERR exception");
+                } catch (e) {
+                    assert_equals(e.code, DOMException.INDEX_SIZE_ERR, "throw an INDEX_SIZE_ERR exception");
+                }
+           });
+       }
+       invalid_args(-1);
+       invalid_args(2);
+       //invalid_args(Infinity);
+       //invalid_args(NaN);
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_SYNTAX_ERR.html b/common/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_SYNTAX_ERR.html
new file mode 100644 (file)
index 0000000..a1380cc
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        xy.qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvasgradient_addColorStop_SYNTAX_ERR</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com/"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-canvasgradient-addcolorstop"/>
+    <meta name="assert" content="Check if the color cannot be parsed as a CSS <color> value, then a SyntaxError exception must be thrown."/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="canvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var canvas = document.getElementById("canvas");
+            var ctx = canvas.getContext("2d");
+            var lingrad = ctx.createLinearGradient(0, 0, 100, 0);
+            try {
+                   lingrad.addColorStop(0.1, "#01");
+                    assert_true(false, "not throw an SYNTAX_ERR exception");
+                } catch (e) {
+                    assert_equals(e.code, DOMException.SYNTAX_ERR, "throw an SYNTAX_ERR exception");
+                }
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_exsit.html b/common/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_exsit.html
new file mode 100644 (file)
index 0000000..b5baa68
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: canvasgradient_addColorStop_exsit</title>
+    <link rel="author" title="Intel" href="http://www.intel.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if canvasgradient.addColorStop is exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var grd = cxt.createLinearGradient(0, 0, 175, 50);
+            assert_true("addColorStop" in grd, "canvasgradient.addColorStop exists");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/common/COPYING b/common/tct-canvas-html5-tests/canvas/common/COPYING
new file mode 100644 (file)
index 0000000..724a8f5
--- /dev/null
@@ -0,0 +1,11 @@
+These files come from
+https://github.com/w3c/web-platform-tests
+without any modification.
+
+These tests are copyright by W3C and/or the author listed in the test
+file. The tests are dual-licensed under the W3C Test Suite License:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+and the BSD 3-clause License:
+http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+under W3C's test suite licensing policy:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
diff --git a/common/tct-canvas-html5-tests/canvas/common/canvas-tests.css b/common/tct-canvas-html5-tests/canvas/common/canvas-tests.css
new file mode 100644 (file)
index 0000000..e006e81
--- /dev/null
@@ -0,0 +1,134 @@
+html.fail {
+    background: #f66;
+}
+html.pass {
+    background: #6f6;
+}
+html.needs_check {
+    background: #99f;
+}
+
+body {
+    font-size: small;
+    font-family: sans-serif;
+    color: black;
+}
+
+a:link {
+    color: #00c;
+}
+a:visited {
+    color: #808;
+}
+
+body.framed {
+    font-size: x-small;
+}
+
+h1 {
+    font-size: larger;
+    margin: 0;
+    padding-left: 0.5em;
+    text-indent: -0.5em;
+}
+
+p {
+    margin: 0;
+}
+
+p.notes {
+    margin-bottom: 0.5em;
+    font-style: italic;
+}
+
+ul {
+    margin: 0;
+    margin-bottom: 0.5em;
+    padding: 0;
+    padding-left: 1em;
+}
+
+.refs {
+    font-style: italic;
+    margin-bottom: 0.5em;
+}
+
+.refs ul {
+    display: inline;
+    margin: 0;
+    padding: 0;
+}
+
+.refs li {
+    display: inline;
+    list-style-type: none;
+    margin: 0;
+    padding: 0;
+}
+
+canvas {
+    display: none;
+    visibility: hidden;
+    border: 2px #f0f solid;
+    background: url(../images/background.png);
+}
+
+img.expected {
+    display: none;
+    border: 2px #f0f solid;
+    background: url(../images/background.png);
+}
+
+iframe {
+    border: 2px #f0f solid;
+}
+
+.output {
+    display: none;
+}
+
+.show_output .output, .needs_check .output  {
+    display: block !important;
+    visibility: visible !important;
+}
+
+.show_output #show_output {
+    display: none;
+}
+
+.resource {
+    visibility: hidden;
+    height: 0;
+}
+
+.fallback {
+    font-size: 2em;
+    font-weight: bold;
+    color: #a00;
+}
+
+
+html.minimal body {
+    color: white;
+}
+html.fail.minimal {
+    background: #f00;
+}
+html.pass.minimal {
+    background: #080;
+}
+html.needs_check.minimal {
+    background: #008;
+}
+.minimal #d {
+    display: none !important;
+}
+.minimal .expectedtext {
+    visibility: hidden !important;
+}
+#passtext, #failtext {
+    display: none;
+}
+.minimal.pass #passtext, .minimal.fail #failtext {
+    display: block;
+}
diff --git a/common/tct-canvas-html5-tests/canvas/common/canvas-tests.js b/common/tct-canvas-html5-tests/canvas/common/canvas-tests.js
new file mode 100644 (file)
index 0000000..cfdacba
--- /dev/null
@@ -0,0 +1,170 @@
+function _valToString(val)
+{
+    if (val === undefined || val === null)
+        return '[' + typeof(val) + ']';
+    return val.toString() + '[' + typeof(val) + ']';
+}
+
+var _failed = false;
+var _asserted = false;
+
+function _warn(text)
+{
+    document.getElementById('d').appendChild(document.createElement('li')).appendChild(document.createTextNode(text));
+}
+
+function _fail(text)
+{
+    _warn(text);
+    _failed = true;
+}
+
+function _assert(cond, text)
+{
+    _asserted = true;
+    if (! cond)
+        _fail('Failed assertion: ' + text);
+}
+
+function _assertSame(a, b, text_a, text_b)
+{
+    _asserted = true;
+    if (a !== b)
+        _fail('Failed assertion ' + text_a + ' === ' + text_b +
+                ' (got ' + _valToString(a) + ', expected ' + _valToString(b) + ')');
+}
+
+function _assertDifferent(a, b, text_a, text_b)
+{
+    _asserted = true;
+    if (a === b)
+        _fail('Failed assertion ' + text_a + ' !== ' + text_b +
+                ' (got ' + _valToString(a) + ', expected not ' + _valToString(b) + ')');
+}
+
+function _assertEqual(a, b, text_a, text_b)
+{
+    _asserted = true;
+    if (a != b)
+        _fail('Failed assertion ' + text_a + ' == ' + text_b +
+                ' (got ' + _valToString(a) + ', expected ' + _valToString(b) + ')');
+}
+
+function _assertMatch(a, b, text_a, text_b)
+{
+    _asserted = true;
+    if (! a.match(b))
+        _fail('Failed assertion ' + text_a + ' matches ' + text_b +
+                ' (got ' + _valToString(a) + ')');
+}
+
+
+var _manual_check = false;
+
+function _requireManualCheck()
+{
+    _manual_check = true;
+}
+
+function _crash()
+{
+    _fail('Aborted due to predicted crash');
+}
+
+function _getPixel(canvas, x,y)
+{
+    try
+    {
+        var ctx = canvas.getContext('2d');
+        var imgdata = ctx.getImageData(x, y, 1, 1);
+        return [ imgdata.data[0], imgdata.data[1], imgdata.data[2], imgdata.data[3] ];
+    }
+    catch (e)
+    {
+        // probably a security exception caused by having drawn
+        // data: URLs onto the canvas
+        _manual_check = true;
+        return undefined;
+    }
+}
+
+function _assertPixel(canvas, x,y, r,g,b,a, pos, colour)
+{
+    _asserted = true;
+    var c = _getPixel(canvas, x,y);
+    if (c && ! (c[0] == r && c[1] == g && c[2] == b && c[3] == a))
+        _fail('Failed assertion: got pixel [' + c + '] at ('+x+','+y+'), expected ['+r+','+g+','+b+','+a+']');
+}
+
+function _assertPixelApprox(canvas, x,y, r,g,b,a, pos, colour, tolerance)
+{
+    _asserted = true;
+    var c = _getPixel(canvas, x,y);
+    if (c)
+    {
+        var diff = Math.max(Math.abs(c[0]-r), Math.abs(c[1]-g), Math.abs(c[2]-b), Math.abs(c[3]-a));
+        if (diff > tolerance)
+            _fail('Failed assertion: got pixel [' + c + '] at ('+x+','+y+'), expected ['+r+','+g+','+b+','+a+'] +/- '+tolerance);
+    }
+}
+
+function _addTest(test)
+{
+    var deferred = false;
+    window.deferTest = function () { deferred = true; };
+    function endTest()
+    {
+        if (_failed) // test failed
+        {
+            document.documentElement.className += ' fail';
+            window._testStatus = ['fail', document.getElementById('d').innerHTML];
+        }
+        else if (_manual_check || !_asserted)
+        { // test case explicitly asked for a manual check, or no automatic assertions were performed
+            document.getElementById('d').innerHTML += '<li>Cannot automatically verify result';
+            document.documentElement.className += ' needs_check';
+            window._testStatus = ['check', document.getElementById('d').innerHTML];
+        }
+        else // test succeeded
+        {
+            document.getElementById('d').innerHTML += '<li>Passed';
+            document.documentElement.className += ' pass';
+            window._testStatus = ['pass', document.getElementById('d').innerHTML];
+        }
+    };
+    window.endTest = endTest;
+    window.wrapFunction = function (f)
+    {
+        return function()
+        {
+            try
+            {
+                f.apply(null, arguments);
+            }
+            catch (e)
+            {
+                _fail('Aborted with exception: ' + e.message);
+            }
+            endTest();
+        };
+    };
+
+    window.onload = function ()
+    {
+        try
+        {
+            var canvas = document.getElementById('c');
+            var ctx = canvas.getContext('2d');
+            test(canvas, ctx);
+        }
+        catch (e)
+        {
+            _fail('Aborted with exception: ' + e.message);
+            deferred = false; // cancel any deference
+        }
+
+        if (! deferred)
+            endTest();
+    };
+}
+
diff --git a/common/tct-canvas-html5-tests/canvas/fonts/COPYING b/common/tct-canvas-html5-tests/canvas/fonts/COPYING
new file mode 100644 (file)
index 0000000..026f379
--- /dev/null
@@ -0,0 +1,12 @@
+All test files except this COPYING and Makefile.am under this folder come from
+http://w3c-test.org/html/tests/approved/fonts/
+without any modification except necessary ajustment on reference path to test harness.
+
+These tests are copyright by W3C and/or the author listed in the test
+file. The tests are dual-licensed under the W3C Test Suite License:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+and the BSD 3-clause License:
+http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+under W3C's test suite licensing policy:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
+
diff --git a/common/tct-canvas-html5-tests/canvas/fonts/CanvasTest.ttf b/common/tct-canvas-html5-tests/canvas/fonts/CanvasTest.ttf
new file mode 100644 (file)
index 0000000..9023592
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/fonts/CanvasTest.ttf differ
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_data_exist.html b/common/tct-canvas-html5-tests/canvas/imagedata_data_exist.html
new file mode 100644 (file)
index 0000000..f0a0abc
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_data_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-data" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if imagedata.data exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            assert_true("data" in imagedata, "imagedata.data exists");
+            }
+        );
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_data_readonly.html b/common/tct-canvas-html5-tests/canvas/imagedata_data_readonly.html
new file mode 100644 (file)
index 0000000..5318060
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        xy.qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_data_readonly</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-data"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if the imagedata.data is readonly"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            var pre_data = new Uint8ClampedArray(imagedata.data);
+            imagedata.data = new Uint8ClampedArray([12, 13]);
+            assert_equals(imagedata.data[0], pre_data[0], "imagedata.data is not readonly.");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_data_type.html b/common/tct-canvas-html5-tests/canvas/imagedata_data_type.html
new file mode 100644 (file)
index 0000000..e032e2e
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        xy.qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_data_type</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-data"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check the imagedata.data's type"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            assert_equals(typeof imagedata.data, 'object', "imagedata.height's type is wrong");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_height_100px.html b/common/tct-canvas-html5-tests/canvas/imagedata_height_100px.html
new file mode 100644 (file)
index 0000000..3ae6729
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_height_100px</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-height" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if the value of imagedata.height's is 100px"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            var imgHeight = imagedata.height;
+            assert_equals(imgHeight, 100, "imagedata.height's value");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_height_exist.html b/common/tct-canvas-html5-tests/canvas/imagedata_height_exist.html
new file mode 100644 (file)
index 0000000..9ca5b03
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_height_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-height" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if imagedata.height exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        test( function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            assert_true("height" in imagedata, "imagedata.height exists");
+            }
+        );
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_height_readonly.html b/common/tct-canvas-html5-tests/canvas/imagedata_height_readonly.html
new file mode 100644 (file)
index 0000000..2e26ec7
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        xy.qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_height_readonly</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-height"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check the imagedata.height is readonly"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            imagedata.height = 200;
+            assert_equals(imagedata.height, 100, "imagedata.height is not readonly.");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_height_type.html b/common/tct-canvas-html5-tests/canvas/imagedata_height_type.html
new file mode 100644 (file)
index 0000000..8e210d3
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        xy.qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_height_type</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-height"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check the imagedata.height's type"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            assert_equals(typeof imagedata.height, 'number', "imagedata.height's type is wrong");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_width_200px.html b/common/tct-canvas-html5-tests/canvas/imagedata_width_200px.html
new file mode 100644 (file)
index 0000000..0964123
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_width_200px</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-width" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if the value of imagedata.width is 200px"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            var imgWidth = imagedata.width;
+            assert_equals(imgWidth, 200, "imagedata.width's value");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_width_exist.html b/common/tct-canvas-html5-tests/canvas/imagedata_width_exist.html
new file mode 100644 (file)
index 0000000..d0c4fde
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_width_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-width" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if imagedata.width exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            assert_true("width" in imagedata, "imagedata.width is exists");
+            }
+        );
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_width_readonly.html b/common/tct-canvas-html5-tests/canvas/imagedata_width_readonly.html
new file mode 100644 (file)
index 0000000..ab37a66
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        xy.qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_width_readonly</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-width"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check the imagedata.width is readonly"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            imagedata.width = 100;
+            assert_equals(imagedata.width, 200, "imagedata.width is not readonly.");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/imagedata_width_type.html b/common/tct-canvas-html5-tests/canvas/imagedata_width_type.html
new file mode 100644 (file)
index 0000000..1fe4b5e
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author:
+        xy.qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: imagedata_width_type</title>
+    <link rel="author" title="Samsung" href="http://www.samsung.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-width"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check the imagedata.width's type"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var imagedata = cxt.createImageData(c.width, c.height);
+            assert_equals(typeof imagedata.width, 'number', "imagedata.width's type is wrong");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/images/COPYING b/common/tct-canvas-html5-tests/canvas/images/COPYING
new file mode 100644 (file)
index 0000000..5c9606a
--- /dev/null
@@ -0,0 +1,12 @@
+All test files except this COPYING and Makefile.am under this folder come from
+http://w3c-test.org/html/tests/approved/images/
+without any modification except necessary ajustment on reference path to test harness.
+
+These tests are copyright by W3C and/or the author listed in the test
+file. The tests are dual-licensed under the W3C Test Suite License:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+and the BSD 3-clause License:
+http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+under W3C's test suite licensing policy:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
+
diff --git a/common/tct-canvas-html5-tests/canvas/images/anim-gr.gif b/common/tct-canvas-html5-tests/canvas/images/anim-gr.gif
new file mode 100644 (file)
index 0000000..45263e0
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/anim-gr.gif differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/anim-gr.png b/common/tct-canvas-html5-tests/canvas/images/anim-gr.png
new file mode 100644 (file)
index 0000000..925e2ef
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/anim-gr.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/anim-poster-gr.png b/common/tct-canvas-html5-tests/canvas/images/anim-poster-gr.png
new file mode 100644 (file)
index 0000000..6941207
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/anim-poster-gr.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/background.png b/common/tct-canvas-html5-tests/canvas/images/background.png
new file mode 100644 (file)
index 0000000..6db6c6b
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/background.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/black-rectangle.png b/common/tct-canvas-html5-tests/canvas/images/black-rectangle.png
new file mode 100644 (file)
index 0000000..a0bf1fe
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/black-rectangle.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/broken.png b/common/tct-canvas-html5-tests/canvas/images/broken.png
new file mode 100644 (file)
index 0000000..f258101
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/broken.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/canvas-line.png b/common/tct-canvas-html5-tests/canvas/images/canvas-line.png
new file mode 100644 (file)
index 0000000..30f8f45
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/canvas-line.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/clear-100x50.png b/common/tct-canvas-html5-tests/canvas/images/clear-100x50.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/clear-100x50.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/ggrr-256x256.png b/common/tct-canvas-html5-tests/canvas/images/ggrr-256x256.png
new file mode 100644 (file)
index 0000000..0342e4a
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/ggrr-256x256.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/green-100x50.png b/common/tct-canvas-html5-tests/canvas/images/green-100x50.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/green-100x50.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/green-16x16.png b/common/tct-canvas-html5-tests/canvas/images/green-16x16.png
new file mode 100644 (file)
index 0000000..e19a3ff
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/green-16x16.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/green-1x1.png b/common/tct-canvas-html5-tests/canvas/images/green-1x1.png
new file mode 100644 (file)
index 0000000..862d1dd
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/green-1x1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/green.png b/common/tct-canvas-html5-tests/canvas/images/green.png
new file mode 100644 (file)
index 0000000..28a1faa
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/green.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/green.svg b/common/tct-canvas-html5-tests/canvas/images/green.svg
new file mode 100644 (file)
index 0000000..d91971f
--- /dev/null
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="50">
+  <rect fill="lime" width="100" height="50"/>
+</svg>
diff --git a/common/tct-canvas-html5-tests/canvas/images/letters.png b/common/tct-canvas-html5-tests/canvas/images/letters.png
new file mode 100644 (file)
index 0000000..089cce6
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/letters.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/red-16x16.png b/common/tct-canvas-html5-tests/canvas/images/red-16x16.png
new file mode 100644 (file)
index 0000000..9038fef
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/red-16x16.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/red.png b/common/tct-canvas-html5-tests/canvas/images/red.png
new file mode 100644 (file)
index 0000000..a6e195d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/red.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/redtransparent.png b/common/tct-canvas-html5-tests/canvas/images/redtransparent.png
new file mode 100644 (file)
index 0000000..75da08c
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/redtransparent.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/rgrg-256x256.png b/common/tct-canvas-html5-tests/canvas/images/rgrg-256x256.png
new file mode 100644 (file)
index 0000000..e6fba3d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/rgrg-256x256.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/rrgg-256x256.png b/common/tct-canvas-html5-tests/canvas/images/rrgg-256x256.png
new file mode 100644 (file)
index 0000000..7f63515
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/rrgg-256x256.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/smiley.png b/common/tct-canvas-html5-tests/canvas/images/smiley.png
new file mode 100644 (file)
index 0000000..640a223
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/smiley.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/threecolors.png b/common/tct-canvas-html5-tests/canvas/images/threecolors.png
new file mode 100644 (file)
index 0000000..0643e6e
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/threecolors.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/transparent.png b/common/tct-canvas-html5-tests/canvas/images/transparent.png
new file mode 100644 (file)
index 0000000..2b49869
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/transparent.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/transparent50.png b/common/tct-canvas-html5-tests/canvas/images/transparent50.png
new file mode 100644 (file)
index 0000000..55f8e69
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/transparent50.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/yellow.png b/common/tct-canvas-html5-tests/canvas/images/yellow.png
new file mode 100644 (file)
index 0000000..51e8aaf
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/yellow.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/images/yellow75.png b/common/tct-canvas-html5-tests/canvas/images/yellow75.png
new file mode 100644 (file)
index 0000000..2bb82c9
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/images/yellow75.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/support/canvas.js b/common/tct-canvas-html5-tests/canvas/support/canvas.js
new file mode 100644 (file)
index 0000000..42dd580
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+*/
+
+
+
+var canvas;
+var purpose;
+
+
+
+function getcanvas()
+{
+    if (canvas == null) {
+        canvas = document.getElementById("canvas").getContext('2d');
+    }
+}
+
+//attribute/method/constant type
+function canvas_property_type(property_name, property_type,isInstance)
+{  
+    getcanvas();
+    if (isInstance) {
+       test( function() {
+            assert_true(canvas[property_name] instanceof property_type, "canvas." + property_name +" is of type   "+ canvas[property_name].toString());
+        }, purpose);
+    } else {
+        test( function() {
+            assert_true(typeof canvas[property_name] == property_type, "canvas." + property_name +" is of type   "+property_type);
+        }, purpose);
+    }
+}
+
+//attribute/method/constant exist
+function canvas_property_exists(property_name)
+{
+    test( function() {
+        getcanvas();
+        assert_true(property_name in canvas, "canvas." + property_name +" exists");
+    }, purpose);
+}
diff --git a/common/tct-canvas-html5-tests/canvas/support/unitcommon.js b/common/tct-canvas-html5-tests/canvas/support/unitcommon.js
new file mode 100644 (file)
index 0000000..59e2b11
--- /dev/null
@@ -0,0 +1,564 @@
+/*
+
+Copyright (c) 2014 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+Authors:
+
+ */
+
+
+MIN_BYTE = -128;
+MAX_BYTE = 127;
+MIN_OCTET = 0;
+MAX_OCTET = 255;
+MIN_SHORT = -32768;
+MAX_SHORT = 32767;
+MIN_UNSIGNED_SHORT = 0;
+MAX_UNSIGNED_SHORT = 65535;
+MIN_LONG = -2147483648;
+MAX_LONG = 2147483647;
+MIN_UNSIGNED_LONG = 0;
+MAX_UNSIGNED_LONG = 4294967295;
+MIN_LONG_LONG = -9223372036854775808;
+MAX_LONG_LONG = 9223372036854775807;
+MIN_UNSIGNED_LONG_LONG = 0;
+MAX_UNSIGNED_LONG_LONG = 18446744073709551615;
+
+TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};
+NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};
+INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};
+IO_EXCEPTION = {name: 'IOError'};
+SECURITY_EXCEPTION = {name: 'SecurityError'};
+
+
+(function () {
+   var head_src = document.head.innerHTML;
+   if (head_src.search(/\/testharness.js\W/) === -1) {
+       document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');
+   }
+   if (head_src.search(/\/testharnessreport.js\W/) === -1) {
+       document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');
+   }
+})();
+
+var _registered_types = {};
+
+function _resolve_registered_type(type) {
+    while (type in _registered_types) {
+        type = _registered_types[type];
+    }
+    return type;
+}
+
+/**
+ * Method checks extra argument for none argument method.
+ * The only check is that method will not throw an exception.
+ * Example usage:
+ * checkExtraArgument(tizen.notification, "removeAll");
+ *
+ * @param object object
+ * @param methodName string - name of the method
+ */
+function checkExtraArgument(object, methodName) {
+    var extraArgument = [
+        null,
+        undefined,
+        "Tizen",
+        1,
+        false,
+        ["one", "two"],
+        {argument: 1},
+        function () {}
+    ], i;
+
+    for (i = 0; i < extraArgument.length; i++) {
+        object[methodName](extraArgument[i]);
+    }
+}
+
+/**
+ * Method to validate conversion.
+ * Example usage:
+ *   conversionTable = getTypeConversionExceptions("functionObject", true);
+ *   for(i = 0; i < conversionTable.length; i++) {
+ *       errorCallback = conversionTable[i][0];
+ *       exceptionName = conversionTable[i][1];
+ *
+ *       assert_throws({name : exceptionName},
+ *       function () {
+ *           tizen.systemsetting.setProperty("HOME_SCREEN",
+ *               propertyValue, successCallback, errorCallback);
+ *       }, exceptionName + " should be thrown - given incorrect errorCallback.");
+ *   }
+ *
+ * @param conversionType
+ * @param isOptional
+ * @returns table of tables which contain value (index 0) and exceptionName (index 1)
+ *
+ */
+function getTypeConversionExceptions(conversionType, isOptional) {
+    var exceptionName = "TypeMismatchError",
+        conversionTable;
+    switch (conversionType) {
+        case "enum":
+            conversionTable = [
+                [undefined, exceptionName],
+                [0, exceptionName],
+                [true, exceptionName],
+                ["dummyInvalidEnumValue", exceptionName],
+                [{ }, exceptionName]
+            ];
+            if (!isOptional) {
+                conversionTable.push([null, exceptionName]);
+            }
+            break;
+        case "double":
+            conversionTable = [
+                [undefined, exceptionName],
+                [NaN, exceptionName],
+                [Number.POSITIVE_INFINITY, exceptionName],
+                [Number.NEGATIVE_INFINITY, exceptionName],
+                ["TIZEN", exceptionName],
+                [{ name : "TIZEN" }, exceptionName],
+                [function () { }, exceptionName]
+            ];
+            break;
+        case "object":
+            conversionTable = [
+                [true, exceptionName],
+                [false, exceptionName],
+                [NaN, exceptionName],
+                [0, exceptionName],
+                ["", exceptionName],
+                ["TIZEN", exceptionName],
+                [undefined, exceptionName]
+            ];
+            if (!isOptional) {
+                conversionTable.push([null, exceptionName]);
+            }
+            break;
+        case "functionObject":
+            conversionTable = [
+                [true, exceptionName],
+                [false, exceptionName],
+                [NaN, exceptionName],
+                [0, exceptionName],
+                ["", exceptionName],
+                ["TIZEN", exceptionName],
+                [[], exceptionName],
+                [{ }, exceptionName],
+                [undefined, exceptionName]
+            ];
+            if (!isOptional) {
+                conversionTable.push([null, exceptionName]);
+            }
+            break;
+        case "array":
+            conversionTable = [
+                [true, exceptionName],
+                [false, exceptionName],
+                [NaN, exceptionName],
+                [0, exceptionName],
+                ["", exceptionName],
+                ["TIZEN", exceptionName],
+                [{ }, exceptionName],
+                [function () { }, exceptionName],
+                [undefined, exceptionName]
+            ];
+            if (!isOptional) {
+                conversionTable.push([null, exceptionName]);
+            }
+            break;
+        case "dictionary":
+            conversionTable = [
+                [true, exceptionName],
+                [false, exceptionName],
+                [NaN, exceptionName],
+                [0, exceptionName],
+                ["", exceptionName],
+                ["TIZEN", exceptionName],
+                [undefined, exceptionName]
+            ];
+            if (!isOptional) {
+                conversionTable.push([null, exceptionName]);
+            }
+            break;
+        default:
+            assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");
+    };
+
+    return conversionTable;
+}
+
+
+function assert_type(obj, type, description) {
+    var org_type = type, prop_name, prop_type, prop_value;
+
+    type = _resolve_registered_type(type);
+
+    if (typeof (type) === 'string') {
+        type = type.toLowerCase();
+        switch (type) {
+            case 'object':
+            case 'string':
+            case 'number':
+            case 'function':
+            case 'boolean':
+            case 'undefined':
+            case 'xml':
+                assert_equals(typeof (obj), type, description);
+                break;
+            case 'null':
+                assert_true(obj === null, description);
+                break;
+            case 'array':
+                assert_true(Array.isArray(obj), description);
+                break;
+            case 'date':
+                assert_true(obj instanceof Date, description);
+                break;
+            case 'byte':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+                break;
+            case 'octet':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");
+                break;
+            case 'short':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+                break;
+            case 'unsigned short':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");
+                break;
+            case 'long':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+                break;
+            case 'unsigned long':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");
+                break;
+            case 'long long':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+                break;
+            case 'unsigned long long':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");
+                break;
+            case 'double':
+                assert_equals(typeof (obj), 'number', description);
+                break;
+            default:
+                assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');
+        }
+    } else if (typeof (type) === 'function') {
+        assert_true(obj instanceof type, description);
+    } else if (typeof (type) === 'object') {
+        for (prop_name in type) {
+            prop_type = type[prop_name];
+            if (prop_type === 'function') {
+                assert_inherits(obj, prop_name);
+                assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);
+            } else {
+                assert_own_property(obj, prop_name);
+            }
+        }
+    } else {
+        assert_unreached('Fix your test. Wrong type ' + org_type);
+    }
+}
+
+function register_type(alias, type_spec) {
+    _registered_types[alias] = type_spec;
+}
+
+/**
+ * Method to check if attribute is const.
+ * Example usage:
+ * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);
+ *
+ * @param obj  object to test which  has const attribute
+ * @param attributeName attribute name.
+ * @param expectedValue expected value of provided attribute name
+ * @param expectedType expected type of provided attribute name
+ * @param valueToAssign value to assign in order to check if attribute value can be modified
+ */
+function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {
+    var tmp;
+    if (expectedValue === valueToAssign) {
+        assert_unreached("Fix your test. The same values given for "  + attributeName +
+            " in 'value' and 'valueToSet' arguments.");
+    }
+    if (typeof (attributeName) === "string") {
+        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
+        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
+        if (typeof (expectedType) !== "undefined") {
+            if (expectedValue === null) {
+                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
+            } else {
+                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
+            }
+        } else {
+            assert_unreached("Fix your test. Wrong type " + expectedType);
+        }
+        tmp = obj[attributeName];
+        obj[attributeName] = valueToAssign;
+        assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");
+    } else {
+        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
+    }
+}
+
+/**
+ * Method to check if attribute is readonly.
+ * Example usage:
+ * check_readonly(statusNotification, "postedTime", null, 'object', new Date());
+ *
+ * @param obj  object to test which  has readonly attribute
+ * @param attributeName attribute name.
+ * @param expectedValue expected value of provided attribute name
+ * @param expectedType expected type of provided attribute name
+ * @param valueToAssign value to assign in order to check if attribute value can be modified
+ */
+function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {
+    check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);
+}
+
+/**
+ * Method to check if attribute can be set to null.
+ * Example usage:
+ * check_not_nullable(syncInfo, "mode");
+ *
+ * @param obj object to test which has not nullable attribute
+ * @param attributeName attribute name.
+ */
+function check_not_nullable(obj, attributeName)
+{   var old_value = obj[attributeName];
+    obj[attributeName] = null;
+    assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");
+    obj[attributeName] = old_value;
+}
+
+/**
+ * Method to check NoInterfaceObject
+ * Example usage:
+ * check_no_interface_object("BluetoothAdapter")
+ *
+ * @param interfaceName interface name
+ */
+function check_no_interface_object(interfaceName) {
+    assert_throws({name: "TypeError"}, function () {
+        tizen[interfaceName]();
+    },"Wrong call as a function");
+    assert_throws({name: "TypeError"}, function () {
+        new tizen[interfaceName]();
+    },"Wrong call as a new function");
+    assert_throws({name: "TypeError"}, function () {
+        ({}) instanceof tizen[interfaceName];
+    },"instanceof exception");
+    assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");
+}
+
+
+/**
+ * Method to check Constructors
+ * Example usage:
+ * check_constructor("BluetoothAdapter")
+ *
+ * @param constructorName constructor name
+ */
+
+function check_constructor(constructorName) {
+    assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");
+    assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);
+    assert_throws({
+        name: "TypeError"
+    }, function () {
+        tizen[constructorName]();
+    }, "Constructor called as function.");
+}
+
+/**
+ * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).
+ * That method also checks if given method exists in a given object.
+ * Example usage:
+ * check_method_exists(tizen.notification, "get");
+ *
+ * @param obj object with method
+ * @param methodName name of the method to check.
+ */
+function check_method_exists(obj, methodName) {
+    assert_type(obj[methodName], 'function', "Method does not exist.");
+}
+
+/**
+ * Method to check extensibility of given object.
+ * Method checks if new attribute and method can be added.
+ * Example usage:
+ * check_extensibility(tizen.notification);
+ *
+ * @param obj object to check
+ */
+function check_extensibility(obj) {
+    var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";
+    obj.newDummyMethod = function() {
+        return dummyMethodResult;
+    }
+    assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");
+
+    obj.newDummyAttribute = dummyAttribute;
+    assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");
+}
+
+/**
+ * Method to check if attribute can be modify.
+ * Example usage:
+ * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");
+ *
+ * @param obj  object to test which has not readonly attribute
+ * @param attributeName attribute name.
+ * @param expectedValue expected value of provided attribute name
+ * @param expectedType expected type of provided attribute name
+ * @param valueToAssign value to assign in order to check if attribute value can be modified
+ */
+function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {
+    if (expectedValue === valueToAssign) {
+        assert_unreached("Fix your test. The same values given for "  + attributeName +
+            " in 'value' and 'valueToSet' arguments.");
+    }
+    if (typeof (attributeName) === "string") {
+        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
+        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
+        if (typeof (expectedType) !== "undefined") {
+            if (expectedValue === null) {
+                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
+            } else {
+                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
+            }
+        } else {
+            assert_unreached("Fix your test. Wrong type " + expectedType);
+        }
+        obj[attributeName] = valueToAssign;
+        assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");
+    } else {
+        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
+    }
+}
+
+/**
+ * Method to check if whole array can be overwritten with an invalid value.
+ * Sample usage:
+ * check_invalid_array_assignments(message, "to", false);
+ *
+ * @param obj object which has the array as its property
+ * @param array name of the array to check
+ * @param isNullable indicates if the array can be null
+ */
+function check_invalid_array_assignments(obj, array, isNullable) {
+    var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],
+        val = obj[array], i;
+
+    if (!isNullable) {
+        obj[array] = null;
+        assert_not_equals(obj[array], null, "Non-nullable array was set to null");
+        assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");
+        assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");
+    }
+
+    for (i = 0 ; i < args.length ; i++) {
+        obj[array] = args[i];
+        assert_type(obj[array], "array", "Array type changed after assigning an invalid value");
+        assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");
+    }
+}
+
+/**
+ * Method to check if an object can be overwritten with an invalid value.
+ * Sample usage:
+ * check_invalid_object_assignments(message, "body", false);
+ *
+ * @param parentObj object which has the 'obj' object as its property
+ * @param obj name of the object to check
+ * @param isNullable indicates if the object can be null
+ */
+function check_invalid_obj_assignments(parentObj, obj, isNullable) {
+    var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],
+        val = parentObj[obj], i;
+
+    if (!isNullable) {
+        parentObj[obj] = null;
+        assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");
+    }
+
+    for (i = 0 ; i < args.length ; i++) {
+        parentObj[obj] = args[i];
+        assert_equals(parentObj[obj], val, "The object was set to " + args[i]);
+    }
+}
+
+/**
+ * Method to validate conversion for listeners.
+ * Example usage:
+ * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);
+ * for(i = 0; i < incorrectListeners.length; i++) {
+ *     packageInformationEventCallback  = incorrectListeners[i][0];
+ *     exceptionName = incorrectListeners[i][1];
+ *     assert_throws({name : exceptionName},
+ *        function () {
+ *             tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
+ *         }, exceptionName + " should be thrown - given incorrect successCallback.");
+ * }
+ *
+ *
+ * @param callbackNames Array with names
+ * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)
+ *
+ */
+function getListenerConversionExceptions(callbackNames) {
+    var result = [], conversionTable, i, j, listenerName;
+    conversionTable = getTypeConversionExceptions("functionObject", false);
+
+    for (i = 0; i < callbackNames.length; i++) {
+        for (j = 0; j < conversionTable.length; j++) {
+            listenerName = {};
+            listenerName[callbackNames[i]] = conversionTable[j][0];
+            result.push([listenerName, conversionTable[j][1]]);
+        }
+    }
+
+    return result;
+}
diff --git a/common/tct-canvas-html5-tests/canvas/textmetrics_width_exist.html b/common/tct-canvas-html5-tests/canvas/textmetrics_width_exist.html
new file mode 100644 (file)
index 0000000..cfc62c9
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list 
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice, 
+  this list of conditions and the following disclaimer in the documentation 
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors 
+  may be used to endorse or promote products derived from this work without 
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
+  
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: textmetrics_width_exist</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-textmetrics-width" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if textmetrics.width exists"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script type="text/javascript">
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            cxt.fillText("Text", 1, 20);
+            var metrics = cxt.measureText("T");
+            assert_true('width' in metrics, "textmetrics.width is exists");
+            }
+        );
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/textmetrics_width_readonly.html b/common/tct-canvas-html5-tests/canvas/textmetrics_width_readonly.html
new file mode 100644 (file)
index 0000000..21ba7da
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: textmetrics_width_readonly</title>
+    <link rel="author" title="Intel" href="http://www.intel.com"/>
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-textmetrics-width"/>
+    <meta name="flags" content=""/>
+    <meta name="assert" content="Check if textmetrics.width is readonly"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test(function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            var metrics = cxt.measureText("T");
+            metrics.width = 50;
+            assert_not_equals(metrics.width, 50, "The textmetrics.width value");
+        });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/textmetrics_width_type.html b/common/tct-canvas-html5-tests/canvas/textmetrics_width_type.html
new file mode 100644 (file)
index 0000000..fcd5b16
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2014 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this lis
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work withou
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+         Cao, Jun <junx.cao@intel.com>
+
+-->
+
+<html>
+  <head>
+    <title>Canvas Test: textmetrics_width_type</title>
+    <link rel="author" title="Intel" href="http://www.intel.com" />
+    <link rel="help" href="http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-textmetrics-width" />
+    <meta name="flags" content="" />
+    <meta name="assert" content="Check if the type of textmetrics.width is number"/>
+    <script src="../resources/testharness.js"></script>
+    <script src="../resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <canvas id="myCanvas">
+      Your browser does not support the canvas element.
+    </canvas>
+    <script>
+        test( function () {
+            var c = document.getElementById("myCanvas");
+            var cxt = c.getContext("2d");
+            cxt.fillText("Text", 1, 20);
+            var metrics = cxt.measureText("T");
+            assert_equals(typeof metrics.width, 'number', "the type of textmetrics.width");
+        });
+    </script>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.canvas.readonly.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.canvas.readonly.html
new file mode 100644 (file)
index 0000000..bad7817
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.canvas.readonly</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.canvas.html">canvas</a>.readonly</h1>
+<p class="desc">CanvasRenderingContext2D.canvas is readonly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.canvas.attribute">2d.canvas.attribute</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var c = document.createElement('canvas');
+var d = ctx.canvas;
+_assertDifferent(c, d, "c", "d");
+ctx.canvas = c;
+_assertSame(ctx.canvas, d, "ctx.canvas", "d");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.canvas.reference.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.canvas.reference.html
new file mode 100644 (file)
index 0000000..234cefb
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.canvas.reference</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.canvas.html">canvas</a>.reference</h1>
+<p class="desc">CanvasRenderingContext2D.canvas refers back to its canvas</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.canvas">2d.canvas</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.canvas, canvas, "ctx.canvas", "canvas");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.basic.html
new file mode 100644 (file)
index 0000000..d3c7ce8
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.basic</h1>
+<p class="desc">clearRect clears to transparent black</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.clearRect">2d.clearRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.clearRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.clip.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.clip.html
new file mode 100644 (file)
index 0000000..9a4e05c
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.clip</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.clip</h1>
+<p class="desc">clearRect is affected by clipping regions</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.clearRect">2d.clearRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.rect(0, 0, 16, 16);
+ctx.clip();
+
+ctx.clearRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 16, 16);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalalpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalalpha.html
new file mode 100644 (file)
index 0000000..30b7528
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.globalalpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.globalalpha</h1>
+<p class="desc">clearRect is not affected by globalAlpha</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.clearRect">2d.clearRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalAlpha = 0.1;
+ctx.clearRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalcomposite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalcomposite.html
new file mode 100644 (file)
index 0000000..be23466
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.globalcomposite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.globalcomposite</h1>
+<p class="desc">clearRect is not affected by globalCompositeOperation</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.clearRect">2d.clearRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.clearRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.negative.html
new file mode 100644 (file)
index 0000000..0b8cb65
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.negative</h1>
+<p class="desc">clearRect of negative sizes works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.clearRect">2d.clearRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.clearRect(0, 0, 50, 25);
+ctx.clearRect(100, 0, -50, 25);
+ctx.clearRect(0, 50, 50, -25);
+ctx.clearRect(100, 50, -50, -25);
+_assertPixel(canvas, 25,12, 0,0,0,0, "25,12", "0,0,0,0");
+_assertPixel(canvas, 75,12, 0,0,0,0, "75,12", "0,0,0,0");
+_assertPixel(canvas, 25,37, 0,0,0,0, "25,37", "0,0,0,0");
+_assertPixel(canvas, 75,37, 0,0,0,0, "75,37", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.nonfinite.html
new file mode 100644 (file)
index 0000000..b691923
--- /dev/null
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.nonfinite</h1>
+<p class="desc">clearRect() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.clearRect(Infinity, 0, 100, 50);
+ctx.clearRect(-Infinity, 0, 100, 50);
+ctx.clearRect(NaN, 0, 100, 50);
+ctx.clearRect(0, Infinity, 100, 50);
+ctx.clearRect(0, -Infinity, 100, 50);
+ctx.clearRect(0, NaN, 100, 50);
+ctx.clearRect(0, 0, Infinity, 50);
+ctx.clearRect(0, 0, -Infinity, 50);
+ctx.clearRect(0, 0, NaN, 50);
+ctx.clearRect(0, 0, 100, Infinity);
+ctx.clearRect(0, 0, 100, -Infinity);
+ctx.clearRect(0, 0, 100, NaN);
+ctx.clearRect(Infinity, Infinity, 100, 50);
+ctx.clearRect(Infinity, Infinity, Infinity, 50);
+ctx.clearRect(Infinity, Infinity, Infinity, Infinity);
+ctx.clearRect(Infinity, Infinity, 100, Infinity);
+ctx.clearRect(Infinity, 0, Infinity, 50);
+ctx.clearRect(Infinity, 0, Infinity, Infinity);
+ctx.clearRect(Infinity, 0, 100, Infinity);
+ctx.clearRect(0, Infinity, Infinity, 50);
+ctx.clearRect(0, Infinity, Infinity, Infinity);
+ctx.clearRect(0, Infinity, 100, Infinity);
+ctx.clearRect(0, 0, Infinity, Infinity);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.path.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.path.html
new file mode 100644 (file)
index 0000000..20f0f3f
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.path</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.path</h1>
+<p class="desc">clearRect does not affect the current path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.clearRect">2d.clearRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.beginPath();
+ctx.rect(0, 0, 100, 50);
+ctx.clearRect(0, 0, 16, 16);
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.shadow.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.shadow.html
new file mode 100644 (file)
index 0000000..98d4de7
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.shadow</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.shadow</h1>
+<p class="desc">clearRect does not draw shadows</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.clearRect">2d.clearRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#f00';
+ctx.shadowBlur = 0;
+ctx.shadowOffsetX = 0;
+ctx.shadowOffsetY = 50;
+ctx.clearRect(0, -50, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.transform.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.transform.html
new file mode 100644 (file)
index 0000000..3b1d5c7
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.transform</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.transform</h1>
+<p class="desc">clearRect is affected by transforms</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.clearRect">2d.clearRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.scale(10, 10);
+ctx.translate(0, 5);
+ctx.clearRect(0, -5, 10, 5);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.zero.html
new file mode 100644 (file)
index 0000000..de608dd
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.clearRect.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.clearRect.html">clearRect</a>.zero</h1>
+<p class="desc">clearRect of zero pixels has no effect</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.clearRect">2d.clearRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.clearRect(0, 0, 100, 0);
+ctx.clearRect(0, 0, 0, 50);
+ctx.clearRect(0, 0, 0, 0);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.copy.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.copy.html
new file mode 100644 (file)
index 0000000..4852f31
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.copy</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.copy</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.copy">2d.composite.copy</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.copy.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.copy.png
new file mode 100644 (file)
index 0000000..8e0668e
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.copy.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-atop.html
new file mode 100644 (file)
index 0000000..4472202
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.destination-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.destination-atop</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-atop">2d.composite.destination-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-atop.png
new file mode 100644 (file)
index 0000000..59bdc91
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-in.html
new file mode 100644 (file)
index 0000000..886d278
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.destination-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.destination-in</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-in">2d.composite.destination-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-in.png
new file mode 100644 (file)
index 0000000..790e418
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-out.html
new file mode 100644 (file)
index 0000000..39cb866
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.destination-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.destination-out</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-out">2d.composite.destination-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-out.png
new file mode 100644 (file)
index 0000000..7f5ed1a
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-over.html
new file mode 100644 (file)
index 0000000..8a86857
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.destination-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.destination-over</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-over">2d.composite.destination-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-over.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-over.png
new file mode 100644 (file)
index 0000000..ac86892
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-over.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.lighter.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.lighter.html
new file mode 100644 (file)
index 0000000..a759534
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.lighter</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.lighter</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.lighter">2d.composite.lighter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.lighter.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.lighter.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.lighter.png
new file mode 100644 (file)
index 0000000..6a7c1df
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.lighter.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-atop.html
new file mode 100644 (file)
index 0000000..1d7afd0
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.source-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.source-atop</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-atop">2d.composite.source-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-atop.png
new file mode 100644 (file)
index 0000000..1ef9630
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-in.html
new file mode 100644 (file)
index 0000000..1937210
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.source-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.source-in</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-in">2d.composite.source-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-in.png
new file mode 100644 (file)
index 0000000..c26cdcc
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-out.html
new file mode 100644 (file)
index 0000000..763c51a
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.source-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.source-out</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-out">2d.composite.source-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-out.png
new file mode 100644 (file)
index 0000000..c26cdcc
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-over.html
new file mode 100644 (file)
index 0000000..9386011
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.source-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.source-over</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-over">2d.composite.source-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-over.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-over.png
new file mode 100644 (file)
index 0000000..5437608
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-over.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.xor.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.xor.html
new file mode 100644 (file)
index 0000000..b51c80f
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.canvas.xor</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.canvas.html">canvas</a>.xor</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.xor">2d.composite.xor</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.xor.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = canvas.width;
+canvas2.height = canvas.height;
+var ctx2 = canvas2.getContext('2d');
+ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.xor.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.xor.png
new file mode 100644 (file)
index 0000000..1ef9630
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.xor.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.copy.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.copy.html
new file mode 100644 (file)
index 0000000..0183d34
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.copy</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.copy</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.copy">2d.composite.copy</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-atop.html
new file mode 100644 (file)
index 0000000..077ed60
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.destination-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.destination-atop</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-atop">2d.composite.destination-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-in.html
new file mode 100644 (file)
index 0000000..57b79c5
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.destination-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.destination-in</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-in">2d.composite.destination-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-out.html
new file mode 100644 (file)
index 0000000..f1f8e05
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.destination-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.destination-out</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-out">2d.composite.destination-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-over.html
new file mode 100644 (file)
index 0000000..3c22fca
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.destination-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.destination-over</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-over">2d.composite.destination-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.lighter.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.lighter.html
new file mode 100644 (file)
index 0000000..5b8cc41
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.lighter</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.lighter</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.lighter">2d.composite.lighter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-atop.html
new file mode 100644 (file)
index 0000000..e8d16b4
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.source-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.source-atop</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-atop">2d.composite.source-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-in.html
new file mode 100644 (file)
index 0000000..daebb91
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.source-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.source-in</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-in">2d.composite.source-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-out.html
new file mode 100644 (file)
index 0000000..4532def
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.source-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.source-out</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-out">2d.composite.source-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-over.html
new file mode 100644 (file)
index 0000000..3d7a1af
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.source-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.source-over</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-over">2d.composite.source-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.xor.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.xor.html
new file mode 100644 (file)
index 0000000..cfda521
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.clip.xor</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.clip.html">clip</a>.xor</h1>
+<p class="desc">fill() does not affect pixels outside the clip region.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.xor">2d.composite.xor</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.rect(-20, -20, 10, 10);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvas.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvas.html
new file mode 100644 (file)
index 0000000..87ab0c8
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.globalAlpha.canvas</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.globalAlpha.html">globalAlpha</a>.canvas</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.globalAlpha.image">2d.composite.globalAlpha.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#f00';
+ctx2.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvaspattern.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvaspattern.html
new file mode 100644 (file)
index 0000000..065f4bf
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.globalAlpha.canvaspattern</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.globalAlpha.html">globalAlpha</a>.canvaspattern</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.globalAlpha.image">2d.composite.globalAlpha.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#f00';
+ctx2.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = ctx.createPattern(canvas2, 'no-repeat');
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.default.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.default.html
new file mode 100644 (file)
index 0000000..39b34e6
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.globalAlpha.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.globalAlpha.html">globalAlpha</a>.default</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.globalAlpha.default">2d.composite.globalAlpha.default</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.fill.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.fill.html
new file mode 100644 (file)
index 0000000..5f0dae1
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.globalAlpha.fill</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.globalAlpha.html">globalAlpha</a>.fill</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.globalAlpha.shape">2d.composite.globalAlpha.shape</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.image.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.image.html
new file mode 100644 (file)
index 0000000..f6fc03c
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.globalAlpha.image</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.globalAlpha.html">globalAlpha</a>.image</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.globalAlpha.image">2d.composite.globalAlpha.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.drawImage(document.getElementById('red.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.imagepattern.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.imagepattern.html
new file mode 100644 (file)
index 0000000..86555b0
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.globalAlpha.imagepattern</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.globalAlpha.html">globalAlpha</a>.imagepattern</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.globalAlpha.image">2d.composite.globalAlpha.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = ctx.createPattern(document.getElementById('red.png'), 'no-repeat');
+ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.invalid.html
new file mode 100644 (file)
index 0000000..986b6f7
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.globalAlpha.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.globalAlpha.html">globalAlpha</a>.invalid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.globalAlpha.range">2d.composite.globalAlpha.range</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalAlpha = 0.5;
+var a = ctx.globalAlpha; // might not be exactly 0.5, if it is rounded/quantised, so remember for future comparisons
+ctx.globalAlpha = Infinity;
+_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ctx.globalAlpha = -Infinity;
+_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ctx.globalAlpha = NaN;
+_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.range.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.range.html
new file mode 100644 (file)
index 0000000..9dea0f0
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.globalAlpha.range</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.globalAlpha.html">globalAlpha</a>.range</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.globalAlpha.range">2d.composite.globalAlpha.range</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalAlpha = 0.5;
+var a = ctx.globalAlpha; // might not be exactly 0.5, if it is rounded/quantised, so remember for future comparisons
+ctx.globalAlpha = 1.1;
+_assertEqual(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ctx.globalAlpha = -0.1;
+_assertEqual(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ctx.globalAlpha = 0;
+_assertEqual(ctx.globalAlpha, 0, "ctx.globalAlpha", "0");
+ctx.globalAlpha = 1;
+_assertEqual(ctx.globalAlpha, 1, "ctx.globalAlpha", "1");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.copy.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.copy.html
new file mode 100644 (file)
index 0000000..b4dee53
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.copy</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.copy</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.copy">2d.composite.copy</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.copy.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.copy.png
new file mode 100644 (file)
index 0000000..8e0668e
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.copy.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-atop.html
new file mode 100644 (file)
index 0000000..506970d
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.destination-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.destination-atop</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-atop">2d.composite.destination-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-atop.png
new file mode 100644 (file)
index 0000000..59bdc91
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-in.html
new file mode 100644 (file)
index 0000000..3e7f33a
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.destination-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.destination-in</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-in">2d.composite.destination-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-in.png
new file mode 100644 (file)
index 0000000..790e418
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-out.html
new file mode 100644 (file)
index 0000000..a924546
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.destination-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.destination-out</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-out">2d.composite.destination-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.destination-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-out.png
new file mode 100644 (file)
index 0000000..7f5ed1a
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-over.html
new file mode 100644 (file)
index 0000000..46d9d42
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.destination-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.destination-over</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-over">2d.composite.destination-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.destination-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-over.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-over.png
new file mode 100644 (file)
index 0000000..ac86892
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-over.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.lighter.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.lighter.html
new file mode 100644 (file)
index 0000000..3dc1a0e
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.lighter</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.lighter</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.lighter">2d.composite.lighter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.lighter.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.lighter.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.lighter.png
new file mode 100644 (file)
index 0000000..6a7c1df
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.lighter.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-atop.html
new file mode 100644 (file)
index 0000000..efa69e2
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.source-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.source-atop</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-atop">2d.composite.source-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.source-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-atop.png
new file mode 100644 (file)
index 0000000..1ef9630
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-in.html
new file mode 100644 (file)
index 0000000..ef52e86
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.source-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.source-in</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-in">2d.composite.source-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-in.png
new file mode 100644 (file)
index 0000000..c26cdcc
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-out.html
new file mode 100644 (file)
index 0000000..08e65e2
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.source-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.source-out</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-out">2d.composite.source-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-out.png
new file mode 100644 (file)
index 0000000..c26cdcc
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-over.html
new file mode 100644 (file)
index 0000000..c57e6e0
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.source-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.source-over</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-over">2d.composite.source-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.source-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-over.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-over.png
new file mode 100644 (file)
index 0000000..5437608
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-over.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.xor.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.xor.html
new file mode 100644 (file)
index 0000000..fc25967
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.image.xor</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.image.html">image</a>.xor</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.xor">2d.composite.xor</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.image.xor.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.drawImage(document.getElementById('yellow75.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
+
+
+});
+</script>
+<img src="../images/yellow75.png" id="yellow75.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.xor.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.xor.png
new file mode 100644 (file)
index 0000000..1ef9630
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.xor.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.casesensitive.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.casesensitive.html
new file mode 100644 (file)
index 0000000..78c2e46
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.operation.casesensitive</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.operation.html">operation</a>.casesensitive</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.operation.casesensitive">2d.composite.operation.casesensitive</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'Source-over';
+_assertEqual(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.default.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.default.html
new file mode 100644 (file)
index 0000000..15a98c0
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.operation.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.operation.html">operation</a>.default</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.operation.default">2d.composite.operation.default</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertEqual(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.get.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.get.html
new file mode 100644 (file)
index 0000000..2a52da8
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.operation.get</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.operation.html">operation</a>.get</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.operation">2d.composite.operation</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var modes = ['source-atop', 'source-in', 'source-out', 'source-over',
+    'destination-atop', 'destination-in', 'destination-out', 'destination-over',
+    'lighter', 'copy', 'xor'];
+for (var i = 0; i < modes.length; ++i)
+{
+    ctx.globalCompositeOperation = modes[i];
+    _assertEqual(ctx.globalCompositeOperation, modes[i], "ctx.globalCompositeOperation", "modes[\""+(i)+"\"]");
+}
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.highlight.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.highlight.html
new file mode 100644 (file)
index 0000000..4c9873f
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.operation.highlight</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.operation.html">operation</a>.highlight</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.operation.unrecognised">2d.composite.operation.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'highlight';
+_assertEqual(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.nullsuffix.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.nullsuffix.html
new file mode 100644 (file)
index 0000000..103ed94
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.operation.nullsuffix</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.operation.html">operation</a>.nullsuffix</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.operation.exact">2d.composite.operation.exact</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'source-over\0';
+_assertEqual(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.over.html
new file mode 100644 (file)
index 0000000..2c2a9e6
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.operation.over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.operation.html">operation</a>.over</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.operation.unrecognised">2d.composite.operation.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'over';
+_assertEqual(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.unrecognised.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.unrecognised.html
new file mode 100644 (file)
index 0000000..5274447
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.operation.unrecognised</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.operation.html">operation</a>.unrecognised</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.operation.unrecognised">2d.composite.operation.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'xor';
+ctx.globalCompositeOperation = 'nonexistent';
+_assertEqual(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.copy.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.copy.html
new file mode 100644 (file)
index 0000000..b887731
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.copy</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.copy</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.copy">2d.composite.copy</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.copy.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.copy.png
new file mode 100644 (file)
index 0000000..8373e62
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.copy.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-atop.html
new file mode 100644 (file)
index 0000000..172ed68
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.destination-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.destination-atop</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-atop">2d.composite.destination-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-atop.png
new file mode 100644 (file)
index 0000000..9b811df
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-in.html
new file mode 100644 (file)
index 0000000..06caf73
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.destination-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.destination-in</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-in">2d.composite.destination-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-in.png
new file mode 100644 (file)
index 0000000..9b811df
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-out.html
new file mode 100644 (file)
index 0000000..1fa6ba2
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.destination-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.destination-out</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-out">2d.composite.destination-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.destination-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-out.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-over.html
new file mode 100644 (file)
index 0000000..2b47b6f
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.destination-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.destination-over</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-over">2d.composite.destination-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.destination-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-over.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-over.png
new file mode 100644 (file)
index 0000000..9b811df
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-over.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.lighter.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.lighter.html
new file mode 100644 (file)
index 0000000..66c7597
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.lighter</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.lighter</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.lighter">2d.composite.lighter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.lighter.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,255,255, "50,25", "255,255,255,255", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.lighter.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.lighter.png
new file mode 100644 (file)
index 0000000..f69a743
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.lighter.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-atop.html
new file mode 100644 (file)
index 0000000..81c77ab
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.source-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.source-atop</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-atop">2d.composite.source-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.source-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-atop.png
new file mode 100644 (file)
index 0000000..8373e62
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-in.html
new file mode 100644 (file)
index 0000000..74ff452
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.source-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.source-in</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-in">2d.composite.source-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-in.png
new file mode 100644 (file)
index 0000000..8373e62
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-out.html
new file mode 100644 (file)
index 0000000..f0776fd
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.source-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.source-out</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-out">2d.composite.source-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-out.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-over.html
new file mode 100644 (file)
index 0000000..5565739
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.source-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.source-over</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-over">2d.composite.source-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.source-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-over.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-over.png
new file mode 100644 (file)
index 0000000..8373e62
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-over.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.xor.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.xor.html
new file mode 100644 (file)
index 0000000..c78b2ad
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.solid.xor</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.solid.html">solid</a>.xor</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.xor">2d.composite.xor</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.solid.xor.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.xor.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.xor.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.xor.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.copy.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.copy.html
new file mode 100644 (file)
index 0000000..91e8b9b
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.copy</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.copy</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.copy">2d.composite.copy</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,255,191, "50,25", "0,0,255,191", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.copy.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.copy.png
new file mode 100644 (file)
index 0000000..170e881
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.copy.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-atop.html
new file mode 100644 (file)
index 0000000..a83360e
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.destination-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.destination-atop</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-atop">2d.composite.destination-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,128,128,191, "50,25", "0,128,128,191", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-atop.png
new file mode 100644 (file)
index 0000000..57bbf64
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-in.html
new file mode 100644 (file)
index 0000000..9239177
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.destination-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.destination-in</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-in">2d.composite.destination-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,0,96, "50,25", "0,255,0,96", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-in.png
new file mode 100644 (file)
index 0000000..c6895de
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-out.html
new file mode 100644 (file)
index 0000000..3b2bd79
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.destination-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.destination-out</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-out">2d.composite.destination-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.destination-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,0,32, "50,25", "0,255,0,32", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-out.png
new file mode 100644 (file)
index 0000000..873a9c4
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-over.html
new file mode 100644 (file)
index 0000000..b725f97
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.destination-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.destination-over</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-over">2d.composite.destination-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.destination-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,146,109,223, "50,25", "0,146,109,223", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-over.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-over.png
new file mode 100644 (file)
index 0000000..c0f0326
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-over.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.lighter.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.lighter.html
new file mode 100644 (file)
index 0000000..ca59bff
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.lighter</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.lighter</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.lighter">2d.composite.lighter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.lighter.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,128,191,255, "50,25", "0,128,191,255", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.lighter.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.lighter.png
new file mode 100644 (file)
index 0000000..e7a9ea6
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.lighter.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-atop.html
new file mode 100644 (file)
index 0000000..a64567a
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.source-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.source-atop</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-atop">2d.composite.source-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.source-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,64,191,128, "50,25", "0,64,191,128", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-atop.png
new file mode 100644 (file)
index 0000000..e0afff6
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-in.html
new file mode 100644 (file)
index 0000000..528b111
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.source-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.source-in</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-in">2d.composite.source-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,255,96, "50,25", "0,0,255,96", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-in.png
new file mode 100644 (file)
index 0000000..1459b5e
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-out.html
new file mode 100644 (file)
index 0000000..b75d729
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.source-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.source-out</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-out">2d.composite.source-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,255,96, "50,25", "0,0,255,96", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-out.png
new file mode 100644 (file)
index 0000000..1459b5e
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-over.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-over.html
new file mode 100644 (file)
index 0000000..ee6e88f
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.source-over</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.source-over</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-over">2d.composite.source-over</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.source-over.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,36,219,223, "50,25", "0,36,219,223", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-over.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-over.png
new file mode 100644 (file)
index 0000000..c92cd95
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-over.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.xor.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.xor.html
new file mode 100644 (file)
index 0000000..3daee30
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.transparent.xor</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.transparent.html">transparent</a>.xor</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.xor">2d.composite.xor</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.transparent.xor.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,64,191,128, "50,25", "0,64,191,128", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.xor.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.xor.png
new file mode 100644 (file)
index 0000000..e0afff6
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.xor.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.copy.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.copy.html
new file mode 100644 (file)
index 0000000..5c0e580
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.fill.copy</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.fill.html">fill</a>.copy</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.copy">2d.composite.copy</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.copy.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.copy.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.copy.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-atop.html
new file mode 100644 (file)
index 0000000..5282320
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.fill.destination-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.fill.html">fill</a>.destination-atop</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-atop">2d.composite.destination-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-atop.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-in.html
new file mode 100644 (file)
index 0000000..e9ceb17
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.fill.destination-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.fill.html">fill</a>.destination-in</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-in">2d.composite.destination-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-in.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-in.html
new file mode 100644 (file)
index 0000000..8e962d0
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.fill.source-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.fill.html">fill</a>.source-in</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-in">2d.composite.source-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-in.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-out.html
new file mode 100644 (file)
index 0000000..121c297
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.fill.source-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.fill.html">fill</a>.source-out</h1>
+<p class="desc">fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-out">2d.composite.source-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.fill.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
+ctx.translate(0, 25);
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-out.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.copy.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.copy.html
new file mode 100644 (file)
index 0000000..fd4fe71
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.image.copy</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.image.html">image</a>.copy</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.copy">2d.composite.copy</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.copy.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.copy.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.copy.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-atop.html
new file mode 100644 (file)
index 0000000..22e1143
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.image.destination-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.image.html">image</a>.destination-atop</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-atop">2d.composite.destination-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-atop.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-in.html
new file mode 100644 (file)
index 0000000..800243b
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.image.destination-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.image.html">image</a>.destination-in</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-in">2d.composite.destination-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-in.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-in.html
new file mode 100644 (file)
index 0000000..2c8d96b
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.image.source-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.image.html">image</a>.source-in</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-in">2d.composite.source-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-in.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-out.html
new file mode 100644 (file)
index 0000000..6624714
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.image.source-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.image.html">image</a>.source-out</h1>
+<p class="desc">drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-out">2d.composite.source-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.image.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10);
+_assertPixelApprox(canvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-out.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.copy.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.copy.html
new file mode 100644 (file)
index 0000000..edd325d
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.nocontext.copy</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.nocontext.html">nocontext</a>.copy</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.copy">2d.composite.copy</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.copy.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.copy.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.copy.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-atop.html
new file mode 100644 (file)
index 0000000..30abdac
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.nocontext.destination-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.nocontext.html">nocontext</a>.destination-atop</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-atop">2d.composite.destination-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-atop.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-in.html
new file mode 100644 (file)
index 0000000..bbe0c36
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.nocontext.destination-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.nocontext.html">nocontext</a>.destination-in</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-in">2d.composite.destination-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-in.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-in.html
new file mode 100644 (file)
index 0000000..65962c9
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.nocontext.source-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.nocontext.html">nocontext</a>.source-in</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-in">2d.composite.source-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-in.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-out.html
new file mode 100644 (file)
index 0000000..2abfeab
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.nocontext.source-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.nocontext.html">nocontext</a>.source-out</h1>
+<p class="desc">drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-out">2d.composite.source-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.nocontext.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+var canvas2 = document.createElement('canvas');
+ctx.drawImage(canvas2, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-out.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.copy.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.copy.html
new file mode 100644 (file)
index 0000000..f8f5571
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.pattern.copy</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.pattern.html">pattern</a>.copy</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.copy">2d.composite.copy</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.copy.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.copy.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.copy.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.copy.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-atop.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-atop.html
new file mode 100644 (file)
index 0000000..7554b33
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.pattern.destination-atop</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.pattern.html">pattern</a>.destination-atop</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-atop">2d.composite.destination-atop</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.destination-atop.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-atop.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-atop.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-atop.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-in.html
new file mode 100644 (file)
index 0000000..a57be68
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.pattern.destination-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.pattern.html">pattern</a>.destination-in</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.destination-in">2d.composite.destination-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.destination-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-in.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-in.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-in.html
new file mode 100644 (file)
index 0000000..a9b9708
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.pattern.source-in</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.pattern.html">pattern</a>.source-in</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-in">2d.composite.source-in</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.source-in.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-in.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-in.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-in.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-out.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-out.html
new file mode 100644 (file)
index 0000000..757f36c
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.composite.uncovered.pattern.source-out</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.composite.html">composite</a>.<a href="index.2d.composite.uncovered.html">uncovered</a>.<a href="index.2d.composite.uncovered.pattern.html">pattern</a>.source-out</h1>
+<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.composite.source-out">2d.composite.source-out</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.composite.uncovered.pattern.source-out.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat');
+ctx.fillRect(0, 50, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-out.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-out.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-out.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.coordinatespace.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.coordinatespace.html
new file mode 100644 (file)
index 0000000..7330bee
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.coordinatespace</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.coordinatespace</h1>
+<p class="desc">Coordinate space goes from top-left to bottom-right</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.coordinatespace">2d.coordinatespace</a>
+</ul>
+</div>
+<p class="notes">This should not be upside down.
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.coordinatespace.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#00f';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0ff';
+ctx.fillRect(0, 0, 50, 25);
+_assertPixel(canvas, 25,12, 0,255,255,255, "25,12", "0,255,255,255");
+_assertPixel(canvas, 75,12, 0,0,255,255, "75,12", "0,0,255,255");
+_assertPixel(canvas, 25,37, 0,0,255,255, "25,37", "0,0,255,255");
+_assertPixel(canvas, 75,37, 0,0,255,255, "75,37", "0,0,255,255");
+_requireManualCheck(); // because we can't tell that getPixelData isn't using the wrong coordinate space too
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.coordinatespace.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.coordinatespace.png
new file mode 100644 (file)
index 0000000..242be92
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.coordinatespace.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.3arg.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.3arg.html
new file mode 100644 (file)
index 0000000..a0b2855
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.3arg</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.3arg</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.defaultsource">2d.drawImage.defaultsource</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.defaultdest">2d.drawImage.defaultdest</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.drawImage(document.getElementById('green.png'), 0, 0);
+ctx.drawImage(document.getElementById('red.png'), -100, 0);
+ctx.drawImage(document.getElementById('red.png'), 100, 0);
+ctx.drawImage(document.getElementById('red.png'), 0, -50);
+ctx.drawImage(document.getElementById('red.png'), 0, 50);
+
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.5arg.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.5arg.html
new file mode 100644 (file)
index 0000000..0ec4083
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.5arg</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.5arg</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.defaultsource">2d.drawImage.defaultsource</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('green.png'), 50, 0, 50, 50);
+ctx.drawImage(document.getElementById('red.png'), 0, 0, 50, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 50);
+
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.basic.html
new file mode 100644 (file)
index 0000000..4fbc279
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.9arg.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.9arg.html">9arg</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.paint">2d.drawImage.paint</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('green.png'), 0, 0, 100, 50, 0, 0, 100, 50);
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destpos.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destpos.html
new file mode 100644 (file)
index 0000000..fc5811e
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.9arg.destpos</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.9arg.html">9arg</a>.destpos</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.paint">2d.drawImage.paint</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('green.png'), 0, 0, 100, 50, 0, 0, 100, 50);
+ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, -100, 0, 100, 50);
+ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 100, 0, 100, 50);
+ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, -50, 100, 50);
+ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, 50, 100, 50);
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destsize.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destsize.html
new file mode 100644 (file)
index 0000000..5ed6957
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.9arg.destsize</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.9arg.html">9arg</a>.destsize</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.paint">2d.drawImage.paint</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('green.png'), 1, 1, 1, 1, 0, 0, 100, 50);
+ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, -50, 0, 50, 50);
+ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 100, 0, 50, 50);
+ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, -25, 100, 25);
+ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, 50, 100, 25);
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcepos.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcepos.html
new file mode 100644 (file)
index 0000000..088665d
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.9arg.sourcepos</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.9arg.html">9arg</a>.sourcepos</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.paint">2d.drawImage.paint</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('rgrg-256x256.png'), 140, 20, 100, 50, 0, 0, 100, 50);
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/rgrg-256x256.png" id="rgrg-256x256.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcesize.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcesize.html
new file mode 100644 (file)
index 0000000..ec14d59
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.9arg.sourcesize</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.9arg.html">9arg</a>.sourcesize</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.paint">2d.drawImage.paint</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('rgrg-256x256.png'), 0, 0, 256, 256, 0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 51, 26);
+ctx.fillRect(49, 24, 51, 26);
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 80,20, 0,255,0,255, "80,20", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 20,30, 0,255,0,255, "20,30", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 80,30, 0,255,0,255, "80,30", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/rgrg-256x256.png" id="rgrg-256x256.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.alpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.alpha.html
new file mode 100644 (file)
index 0000000..eeb53a3
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.alpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.alpha</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.subject">2d.drawImage.subject</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalAlpha = 0;
+ctx.drawImage(document.getElementById('red.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.apng.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.apng.html
new file mode 100644 (file)
index 0000000..c7fabaf
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.animated.apng</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.animated.html">animated</a>.apng</h1>
+<p class="desc">drawImage() of an APNG with no poster frame draws the first frame</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.animated.image">2d.drawImage.animated.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.drawImage(document.getElementById('anim-gr.png'), 0, 0);
+    _assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+}), 500);
+
+
+});
+</script>
+<img src="../images/anim-gr.png" id="anim-gr.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.gif.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.gif.html
new file mode 100644 (file)
index 0000000..c0a20de
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.animated.gif</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.animated.html">animated</a>.gif</h1>
+<p class="desc">drawImage() of an animated GIF draws the first frame</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.animated.image">2d.drawImage.animated.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.drawImage(document.getElementById('anim-gr.gif'), 0, 0);
+    _assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+}), 500);
+
+
+});
+</script>
+<img src="../images/anim-gr.gif" id="anim-gr.gif" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.poster.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.poster.html
new file mode 100644 (file)
index 0000000..8a49f21
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.animated.poster</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.animated.html">animated</a>.poster</h1>
+<p class="desc">drawImage() of an APNG draws the poster frame</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.animated.image">2d.drawImage.animated.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.drawImage(document.getElementById('anim-poster-gr.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/anim-poster-gr.png" id="anim-poster-gr.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.broken.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.broken.html
new file mode 100644 (file)
index 0000000..a08b6a1
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.broken</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.broken</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.incomplete.image">2d.drawImage.incomplete.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="../images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('broken.png');
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/broken.png" id="broken.png" class="resource">
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.canvas.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.canvas.html
new file mode 100644 (file)
index 0000000..716a525
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.canvas</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.canvas</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.paint">2d.drawImage.paint</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#0f0';
+ctx2.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#f00';
+ctx.drawImage(canvas2, 0, 0);
+
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.clip.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.clip.html
new file mode 100644 (file)
index 0000000..738e527
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.clip</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.clip</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.subject">2d.drawImage.subject</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.rect(-10, -10, 1, 1);
+ctx.clip();
+ctx.drawImage(document.getElementById('red.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.composite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.composite.html
new file mode 100644 (file)
index 0000000..1779a04
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.composite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.composite</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.subject">2d.drawImage.subject</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.drawImage(document.getElementById('red.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.errorCheck.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.errorCheck.html
new file mode 100644 (file)
index 0000000..528b9d7
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.errorCheck</title>
+<meta name="author" content="Hyukin Kwon">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.broken</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.incomplete.image">2d.drawImage.incomplete.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="../images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+    ctx.fillStyle = '#0f0';
+    ctx.fillRect(0, 0, 100, 50);
+    var img = document.getElementById('broken.png');
+
+    try {
+        ctx.drawImage(img, 0, 0);
+        _fail("No exception thrown");
+    } catch (e) {
+        _assertEqual(e.name, "InvalidStateError", e.name, "InvalidStateError");
+    }
+});
+</script>
+<img src="./images/broken.png" id="broken.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.floatsource.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.floatsource.html
new file mode 100644 (file)
index 0000000..a3799ad
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.floatsource</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.floatsource</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.paint">2d.drawImage.paint</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.drawImage(document.getElementById('green.png'), 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.empty.html
new file mode 100644 (file)
index 0000000..06e7c42
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.image.incomplete.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.image.html">image</a>.<a href="index.2d.drawImage.image.incomplete.html">incomplete</a>.empty</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.incomplete.image.nosrc">2d.drawImage.incomplete.image.nosrc</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('red.png');
+img.src = "";
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.omitted.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.omitted.html
new file mode 100644 (file)
index 0000000..42a3b3c
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.image.incomplete.omitted</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.image.html">image</a>.<a href="index.2d.drawImage.image.incomplete.html">incomplete</a>.omitted</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.incomplete.image.nosrc">2d.drawImage.incomplete.image.nosrc</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('red.png');
+img.removeAttribute('src');
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.emptysrc.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.emptysrc.html
new file mode 100644 (file)
index 0000000..49d1785
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.incomplete.emptysrc</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.incomplete.html">incomplete</a>.emptysrc</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.incomplete.image">2d.drawImage.incomplete.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="../images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('red.png');
+img.src = "";
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.nosrc.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.nosrc.html
new file mode 100644 (file)
index 0000000..777318a
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.incomplete.nosrc</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.incomplete.html">incomplete</a>.nosrc</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.incomplete.image">2d.drawImage.incomplete.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="../images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = new Image();
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.reload.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.reload.html
new file mode 100644 (file)
index 0000000..468831a
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.incomplete.reload</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.incomplete.html">incomplete</a>.reload</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.incomplete.image">2d.drawImage.incomplete.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="../images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('yellow.png');
+img.src = '../../../images/red.png';
+// This triggers the "update the image data" algorithm,
+// and resets the image to the "unavailable" state.
+// The image will not go to the "completely available" state
+// until a fetch task in the networking task source is processed,
+// so the image must not be fully decodable yet:
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.removedsrc.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.removedsrc.html
new file mode 100644 (file)
index 0000000..4d30ed5
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.incomplete.removedsrc</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.incomplete.html">incomplete</a>.removedsrc</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.incomplete.image">2d.drawImage.incomplete.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="../images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('red.png');
+img.removeAttribute('src');
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedest.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedest.html
new file mode 100644 (file)
index 0000000..54fce3d
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.negativedest</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.negativedest</h1>
+<p class="desc">Negative destination width/height represents the correct rectangle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.direction">2d.drawImage.direction</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('ggrr-256x256.png'), 100, 78, 50, 50, 0, 50, 50, -50);
+ctx.drawImage(document.getElementById('ggrr-256x256.png'), 100, 128, 50, -50, 100, 50, -50, -50);
+_assertPixelApprox(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/ggrr-256x256.png" id="ggrr-256x256.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedir.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedir.html
new file mode 100644 (file)
index 0000000..a2b23a5
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.negativedir</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.negativedir</h1>
+<p class="desc">Negative dimensions do not affect the direction of the image</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.direction">2d.drawImage.direction</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('ggrr-256x256.png'), 0, 178, 50, -100, 0, 0, 50, 100);
+ctx.drawImage(document.getElementById('ggrr-256x256.png'), 0, 78, 50, 100, 50, 100, 50, -100);
+_assertPixelApprox(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/ggrr-256x256.png" id="ggrr-256x256.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativesource.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativesource.html
new file mode 100644 (file)
index 0000000..4af9968
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.negativesource</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.negativesource</h1>
+<p class="desc">Negative source width/height represents the correct rectangle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.direction">2d.drawImage.direction</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('ggrr-256x256.png'), 100, 78, -100, 50, 0, 0, 50, 50);
+ctx.drawImage(document.getElementById('ggrr-256x256.png'), 100, 128, -100, -50, 50, 0, 50, 50);
+_assertPixelApprox(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/ggrr-256x256.png" id="ggrr-256x256.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nonfinite.html
new file mode 100644 (file)
index 0000000..050b837
--- /dev/null
@@ -0,0 +1,334 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.nonfinite</h1>
+<p class="desc">drawImage() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var red = document.getElementById('red.png');
+ctx.drawImage(red, Infinity, 0);
+ctx.drawImage(red, -Infinity, 0);
+ctx.drawImage(red, NaN, 0);
+ctx.drawImage(red, 0, Infinity);
+ctx.drawImage(red, 0, -Infinity);
+ctx.drawImage(red, 0, NaN);
+ctx.drawImage(red, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50);
+ctx.drawImage(red, -Infinity, 0, 100, 50);
+ctx.drawImage(red, NaN, 0, 100, 50);
+ctx.drawImage(red, 0, Infinity, 100, 50);
+ctx.drawImage(red, 0, -Infinity, 100, 50);
+ctx.drawImage(red, 0, NaN, 100, 50);
+ctx.drawImage(red, 0, 0, Infinity, 50);
+ctx.drawImage(red, 0, 0, -Infinity, 50);
+ctx.drawImage(red, 0, 0, NaN, 50);
+ctx.drawImage(red, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, -Infinity);
+ctx.drawImage(red, 0, 0, 100, NaN);
+ctx.drawImage(red, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50, 0, 0, 100, 50);
+ctx.drawImage(red, -Infinity, 0, 100, 50, 0, 0, 100, 50);
+ctx.drawImage(red, NaN, 0, 100, 50, 0, 0, 100, 50);
+ctx.drawImage(red, 0, Infinity, 100, 50, 0, 0, 100, 50);
+ctx.drawImage(red, 0, -Infinity, 100, 50, 0, 0, 100, 50);
+ctx.drawImage(red, 0, NaN, 100, 50, 0, 0, 100, 50);
+ctx.drawImage(red, 0, 0, Infinity, 50, 0, 0, 100, 50);
+ctx.drawImage(red, 0, 0, -Infinity, 50, 0, 0, 100, 50);
+ctx.drawImage(red, 0, 0, NaN, 50, 0, 0, 100, 50);
+ctx.drawImage(red, 0, 0, 100, Infinity, 0, 0, 100, 50);
+ctx.drawImage(red, 0, 0, 100, -Infinity, 0, 0, 100, 50);
+ctx.drawImage(red, 0, 0, 100, NaN, 0, 0, 100, 50);
+ctx.drawImage(red, 0, 0, 100, 50, Infinity, 0, 100, 50);
+ctx.drawImage(red, 0, 0, 100, 50, -Infinity, 0, 100, 50);
+ctx.drawImage(red, 0, 0, 100, 50, NaN, 0, 100, 50);
+ctx.drawImage(red, 0, 0, 100, 50, 0, Infinity, 100, 50);
+ctx.drawImage(red, 0, 0, 100, 50, 0, -Infinity, 100, 50);
+ctx.drawImage(red, 0, 0, 100, 50, 0, NaN, 100, 50);
+ctx.drawImage(red, 0, 0, 100, 50, 0, 0, Infinity, 50);
+ctx.drawImage(red, 0, 0, 100, 50, 0, 0, -Infinity, 50);
+ctx.drawImage(red, 0, 0, 100, 50, 0, 0, NaN, 50);
+ctx.drawImage(red, 0, 0, 100, 50, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, 50, 0, 0, 100, -Infinity);
+ctx.drawImage(red, 0, 0, 100, 50, 0, 0, 100, NaN);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, 0, 0, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, 0, 0, 100, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, 0, 0, 100, 50);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50, Infinity, 0, 100, 50);
+ctx.drawImage(red, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50, 0, Infinity, 100, 50);
+ctx.drawImage(red, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50, 0, 0, Infinity, 50);
+ctx.drawImage(red, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, Infinity, 0, 100, 50, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, 0, 0, 100, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, 0, 0, 100, 50);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, 50, Infinity, 0, 100, 50);
+ctx.drawImage(red, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, 50, 0, Infinity, 100, 50);
+ctx.drawImage(red, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, 50, 0, 0, Infinity, 50);
+ctx.drawImage(red, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, Infinity, 100, 50, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, 0, 0, 100, 50);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, 50, Infinity, 0, 100, 50);
+ctx.drawImage(red, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, 50, 0, Infinity, 100, 50);
+ctx.drawImage(red, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, 50, 0, 0, Infinity, 50);
+ctx.drawImage(red, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, Infinity, 50, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, Infinity, Infinity, 0, 100, 50);
+ctx.drawImage(red, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, Infinity, 0, Infinity, 100, 50);
+ctx.drawImage(red, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, Infinity, 0, 0, Infinity, 50);
+ctx.drawImage(red, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, 100, Infinity, 0, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, 50, Infinity, Infinity, 100, 50);
+ctx.drawImage(red, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, 50, Infinity, 0, Infinity, 50);
+ctx.drawImage(red, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, 100, 50, Infinity, 0, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, 50, 0, Infinity, Infinity, 50);
+ctx.drawImage(red, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity);
+ctx.drawImage(red, 0, 0, 100, 50, 0, Infinity, 100, Infinity);
+ctx.drawImage(red, 0, 0, 100, 50, 0, 0, Infinity, Infinity);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nowrap.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nowrap.html
new file mode 100644 (file)
index 0000000..76e0a86
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.nowrap</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.nowrap</h1>
+<p class="desc">Stretched images do not get pixels wrapping around the edges</p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('redtransparent.png'), -1950, 0, 2000, 50);
+_assertPixelApprox(canvas, 45,25, 0,255,0,255, "45,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 55,25, 0,255,0,255, "55,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/redtransparent.png" id="redtransparent.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.null.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.null.html
new file mode 100644 (file)
index 0000000..dd6e82f
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.null</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.drawImage.null</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.drawImage(null, 0, 0);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.drawImage(null, 0, 0)"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.path.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.path.html
new file mode 100644 (file)
index 0000000..3108d6f
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.path</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.path</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.unaffect">2d.drawImage.unaffect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.rect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('red.png'), 0, 0);
+ctx.fill();
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.1.html
new file mode 100644 (file)
index 0000000..b050398
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.self.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.self.html">self</a>.1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.self">2d.drawImage.self</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(50, 0, 50, 50);
+ctx.drawImage(canvas, 50, 0);
+
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.2.html
new file mode 100644 (file)
index 0000000..73d0263
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.self.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.<a href="index.2d.drawImage.self.html">self</a>.2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.self">2d.drawImage.self</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 1, 100, 49);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 1);
+ctx.drawImage(canvas, 0, 1);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 2);
+
+_assertPixelApprox(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.svg.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.svg.html
new file mode 100644 (file)
index 0000000..671e626
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.svg</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.drawImage.svg</h1>
+<p class="desc">drawImage() of an SVG image</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.drawImage(document.getElementById('green.svg'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/green.svg" id="green.svg" class="resource">
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.transform.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.transform.html
new file mode 100644 (file)
index 0000000..9d6afaf
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.transform</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.transform</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.subject">2d.drawImage.subject</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.translate(100, 0);
+ctx.drawImage(document.getElementById('red.png'), 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.wrongtype.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.wrongtype.html
new file mode 100644 (file)
index 0000000..837ce7e
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.wrongtype</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.wrongtype</h1>
+<p class="desc">Incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.IDL">2d.drawImage.IDL</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.drawImage(undefined, 0, 0);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.drawImage(undefined, 0, 0)"); }
+try { var _thrown = false;
+  ctx.drawImage(0, 0, 0);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.drawImage(0, 0, 0)"); }
+try { var _thrown = false;
+  ctx.drawImage("", 0, 0);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.drawImage(\"\", 0, 0)"); }
+try { var _thrown = false;
+  ctx.drawImage(document.createElement('p'), 0, 0);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.drawImage(document.createElement('p'), 0, 0)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerocanvas.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerocanvas.html
new file mode 100644 (file)
index 0000000..e976623
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.zerocanvas</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.zerocanvas</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.zerocanvas">2d.drawImage.zerocanvas</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 0;
+canvas2.height = 10;
+try { var _thrown = false;
+  ctx.drawImage(canvas2, 0, 0);
+} catch (e) { if (e.code != DOMException.INVALID_STATE_ERR) _fail("Failed assertion: expected exception of type INVALID_STATE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INVALID_STATE_ERR: ctx.drawImage(canvas2, 0, 0)"); }
+
+canvas2.width = 10;
+canvas2.height = 0;
+try { var _thrown = false;
+  ctx.drawImage(canvas2, 0, 0);
+} catch (e) { if (e.code != DOMException.INVALID_STATE_ERR) _fail("Failed assertion: expected exception of type INVALID_STATE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INVALID_STATE_ERR: ctx.drawImage(canvas2, 0, 0)"); }
+
+canvas2.width = 0;
+canvas2.height = 0;
+try { var _thrown = false;
+  ctx.drawImage(canvas2, 0, 0);
+} catch (e) { if (e.code != DOMException.INVALID_STATE_ERR) _fail("Failed assertion: expected exception of type INVALID_STATE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INVALID_STATE_ERR: ctx.drawImage(canvas2, 0, 0)"); }
+
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerosource.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerosource.html
new file mode 100644 (file)
index 0000000..bbe02ed
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.zerosource</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.zerosource</h1>
+<p class="desc">drawImage with zero-sized source rectangle throws INDEX_SIZE_ERR</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.drawImage.zerosource">2d.drawImage.zerosource</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+try { var _thrown = false;
+  ctx.drawImage(document.getElementById('red.png'), 10, 10, 0, 1, 0, 0, 100, 50);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.drawImage(document.getElementById('red.png'), 10, 10, 0, 1, 0, 0, 100, 50)"); }
+try { var _thrown = false;
+  ctx.drawImage(document.getElementById('red.png'), 10, 10, 1, 0, 0, 0, 100, 50);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.drawImage(document.getElementById('red.png'), 10, 10, 1, 0, 0, 0, 100, 50)"); }
+try { var _thrown = false;
+  ctx.drawImage(document.getElementById('red.png'), 10, 10, 0, 0, 0, 0, 100, 50);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.drawImage(document.getElementById('red.png'), 10, 10, 0, 0, 0, 0, 100, 50)"); }
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.basic.html
new file mode 100644 (file)
index 0000000..48470a4
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillRect.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillRect.html">fillRect</a>.basic</h1>
+<p class="desc">fillRect works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.fillRect">2d.fillRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.clip.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.clip.html
new file mode 100644 (file)
index 0000000..85eb8be
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillRect.clip</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillRect.html">fillRect</a>.clip</h1>
+<p class="desc">fillRect is affected by clipping regions</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.fillRect">2d.fillRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.rect(0, 0, 16, 16);
+ctx.clip();
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 16, 16);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.negative.html
new file mode 100644 (file)
index 0000000..a2ec724
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillRect.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillRect.html">fillRect</a>.negative</h1>
+<p class="desc">fillRect of negative sizes works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.fillRect">2d.fillRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 25);
+ctx.fillRect(100, 0, -50, 25);
+ctx.fillRect(0, 50, 50, -25);
+ctx.fillRect(100, 50, -50, -25);
+_assertPixel(canvas, 25,12, 0,255,0,255, "25,12", "0,255,0,255");
+_assertPixel(canvas, 75,12, 0,255,0,255, "75,12", "0,255,0,255");
+_assertPixel(canvas, 25,37, 0,255,0,255, "25,37", "0,255,0,255");
+_assertPixel(canvas, 75,37, 0,255,0,255, "75,37", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.nonfinite.html
new file mode 100644 (file)
index 0000000..75821b8
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillRect.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillRect.html">fillRect</a>.nonfinite</h1>
+<p class="desc">fillRect() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(Infinity, 0, 100, 50);
+ctx.fillRect(-Infinity, 0, 100, 50);
+ctx.fillRect(NaN, 0, 100, 50);
+ctx.fillRect(0, Infinity, 100, 50);
+ctx.fillRect(0, -Infinity, 100, 50);
+ctx.fillRect(0, NaN, 100, 50);
+ctx.fillRect(0, 0, Infinity, 50);
+ctx.fillRect(0, 0, -Infinity, 50);
+ctx.fillRect(0, 0, NaN, 50);
+ctx.fillRect(0, 0, 100, Infinity);
+ctx.fillRect(0, 0, 100, -Infinity);
+ctx.fillRect(0, 0, 100, NaN);
+ctx.fillRect(Infinity, Infinity, 100, 50);
+ctx.fillRect(Infinity, Infinity, Infinity, 50);
+ctx.fillRect(Infinity, Infinity, Infinity, Infinity);
+ctx.fillRect(Infinity, Infinity, 100, Infinity);
+ctx.fillRect(Infinity, 0, Infinity, 50);
+ctx.fillRect(Infinity, 0, Infinity, Infinity);
+ctx.fillRect(Infinity, 0, 100, Infinity);
+ctx.fillRect(0, Infinity, Infinity, 50);
+ctx.fillRect(0, Infinity, Infinity, Infinity);
+ctx.fillRect(0, Infinity, 100, Infinity);
+ctx.fillRect(0, 0, Infinity, Infinity);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.path.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.path.html
new file mode 100644 (file)
index 0000000..9752a2c
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillRect.path</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillRect.html">fillRect</a>.path</h1>
+<p class="desc">fillRect does not affect the current path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.fillRect">2d.fillRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.beginPath();
+ctx.rect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 16, 16);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.shadow.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.shadow.html
new file mode 100644 (file)
index 0000000..065621e
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillRect.shadow</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillRect.html">fillRect</a>.shadow</h1>
+<p class="desc">fillRect draws shadows</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.fillRect">2d.fillRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#0f0';
+ctx.shadowBlur = 0;
+ctx.shadowOffsetX = 0;
+ctx.shadowOffsetY = 50;
+ctx.fillRect(0, -50, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.transform.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.transform.html
new file mode 100644 (file)
index 0000000..7986bd6
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillRect.transform</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillRect.html">fillRect</a>.transform</h1>
+<p class="desc">fillRect is affected by transforms</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.fillRect">2d.fillRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.scale(10, 10);
+ctx.translate(0, 5);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, -5, 10, 5);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.zero.html
new file mode 100644 (file)
index 0000000..d9962f2
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillRect.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillRect.html">fillRect</a>.zero</h1>
+<p class="desc">fillRect of zero pixels has no effect</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.fillRect">2d.fillRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 0);
+ctx.fillRect(0, 0, 0, 50);
+ctx.fillRect(0, 0, 0, 0);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.default.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.default.html
new file mode 100644 (file)
index 0000000..294d7c7
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.default</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.default">2d.colours.default</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertEqual(ctx.fillStyle, '#000000', "ctx.fillStyle", "'#000000'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.semitransparent.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.semitransparent.html
new file mode 100644 (file)
index 0000000..0b36f03
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.get.semitransparent</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.get.html">get</a>.semitransparent</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.getcolour">2d.colours.getcolour</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.serializecolour.transparent">2d.serializecolour.transparent</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = 'rgba(255,255,255,0.45)';
+_assertMatch(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/, "ctx.fillStyle", "/^rgba\\(255, 255, 255, 0\\.4\\d+\\)$/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.solid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.solid.html
new file mode 100644 (file)
index 0000000..0374b5a
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.get.solid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.get.html">get</a>.solid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.getcolour">2d.colours.getcolour</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.serializecolour.solid">2d.serializecolour.solid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#fa0';
+_assertSame(ctx.fillStyle, '#ffaa00', "ctx.fillStyle", "'#ffaa00'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.transparent.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.transparent.html
new file mode 100644 (file)
index 0000000..caa26f1
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.get.transparent</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.get.html">get</a>.transparent</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.getcolour">2d.colours.getcolour</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.serializecolour.transparent">2d.serializecolour.transparent</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = 'rgba(0,0,0,0)';
+_assertEqual(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidstring.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidstring.html
new file mode 100644 (file)
index 0000000..62e2d9c
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.invalidstring</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.invalidstring</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.invalidstring">2d.colours.invalidstring</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillStyle = 'invalid';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidtype.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidtype.html
new file mode 100644 (file)
index 0000000..c4c942a
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.invalidtype</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.invalidtype</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.invalidtype">2d.colours.invalidtype</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillStyle = null;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.basic.html
new file mode 100644 (file)
index 0000000..d9296da
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.current.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.current.html">current</a>.basic</h1>
+<p class="desc">currentColor is computed from the canvas element</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.currentColor.onset">2d.currentColor.onset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('style', 'color: #0f0');
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'currentColor';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.changed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.changed.html
new file mode 100644 (file)
index 0000000..f07c369
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.current.changed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.current.html">current</a>.changed</h1>
+<p class="desc">currentColor is computed when the attribute is set, not when it is painted</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.currentColor.onset">2d.currentColor.onset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('style', 'color: #0f0');
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'currentColor';
+canvas.setAttribute('style', 'color: #f00');
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.notrendered.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.notrendered.html
new file mode 100644 (file)
index 0000000..8735906
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.current.notrendered</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.fillStyle.parse.current.basic</h1>
+<p class="desc">currentColor is computed from the canvas element</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('style', 'color: #0f0;');
+canvas.style.display = 'none';
+canvas.offsetTop;
+ctx.fillStyle = 'currentColor';
+canvas.style.display = 'inline';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.removed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.removed.html
new file mode 100644 (file)
index 0000000..d951141
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.current.removed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.current.html">current</a>.removed</h1>
+<p class="desc">currentColor is solid black when the canvas element is not in a document</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.currentColor.outofdoc">2d.currentColor.outofdoc</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.current.removed.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Try not to let it undetectably incorrectly pick up opaque-black
+// from other parts of the document:
+document.body.parentNode.setAttribute('style', 'color: #f00');
+document.body.setAttribute('style', 'color: #f00');
+canvas.setAttribute('style', 'color: #f00');
+
+var canvas2 = document.createElement('canvas');
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#f00';
+ctx2.fillStyle = 'currentColor';
+ctx2.fillRect(0, 0, 100, 50);
+ctx.drawImage(canvas2, 0, 0);
+
+document.body.parentNode.removeAttribute('style');
+document.body.removeAttribute('style');
+
+_assertPixel(canvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.removed.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.removed.png
new file mode 100644 (file)
index 0000000..13a5157
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.removed.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex3.html
new file mode 100644 (file)
index 0000000..7fa1f0f
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hex3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hex3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hex3.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex3.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex3.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex3.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex6.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex6.html
new file mode 100644 (file)
index 0000000..d5bb6de
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hex6</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hex6</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hex6.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = '#00fF00';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex6.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex6.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex6.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-1.html
new file mode 100644 (file)
index 0000000..3243fb9
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl(120, 100%, 50%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-1.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-2.html
new file mode 100644 (file)
index 0000000..bffc406
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl( -240 , 100% , 50% )';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-2.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-3.html
new file mode 100644 (file)
index 0000000..741cd09
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-3.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl(360120, 100%, 50%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-3.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-3.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-3.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-4.html
new file mode 100644 (file)
index 0000000..6d6278f
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-4.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl(-360240, 100%, 50%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-4.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-4.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-4.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-5.html
new file mode 100644 (file)
index 0000000..bde393a
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-5</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-5.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-5.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-5.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-5.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-6.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-6.html
new file mode 100644 (file)
index 0000000..eb21065
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-6</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-6</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-6.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl(+120, +100%, +50%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-6.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-6.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-6.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-1.html
new file mode 100644 (file)
index 0000000..a4bdee9
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-clamp-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-clamp-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-clamp-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl(120, 200%, 50%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-1.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-2.html
new file mode 100644 (file)
index 0000000..ce6c070
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-clamp-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-clamp-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-clamp-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl(120, -200%, 49.9%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 127,127,127,255, "50,25", "127,127,127,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-2.png
new file mode 100644 (file)
index 0000000..acf6171
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-3.html
new file mode 100644 (file)
index 0000000..61e3259
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-clamp-3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-clamp-3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-clamp-3.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl(120, 100%, 200%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 255,255,255,255, "50,25", "255,255,255,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-3.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-3.png
new file mode 100644 (file)
index 0000000..f69a743
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-3.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-4.html
new file mode 100644 (file)
index 0000000..0664e10
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsl-clamp-4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsl-clamp-4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsl-clamp-4.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsl(120, 100%, -200%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-4.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-4.png
new file mode 100644 (file)
index 0000000..13a5157
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-4.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-1.html
new file mode 100644 (file)
index 0000000..aa73cb3
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsla-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsla-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsla-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsla(120, 100%, 50%, 0.499)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,127, "50,25", "0,255,0,127");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-1.png
new file mode 100644 (file)
index 0000000..2aa6265
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-2.html
new file mode 100644 (file)
index 0000000..890fb51
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsla-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsla-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsla-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsla( 120.0 , 100.0% , 50.0% , 1 )';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-2.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-1.html
new file mode 100644 (file)
index 0000000..c74b8c6
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsla-clamp-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsla-clamp-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsla-clamp-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsla(120, 200%, 50%, 1)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-1.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-2.html
new file mode 100644 (file)
index 0000000..9cd8666
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsla-clamp-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsla-clamp-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsla-clamp-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsla(120, -200%, 49.9%, 1)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 127,127,127,255, "50,25", "127,127,127,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-2.png
new file mode 100644 (file)
index 0000000..acf6171
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-3.html
new file mode 100644 (file)
index 0000000..1ca38df
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsla-clamp-3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsla-clamp-3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsla-clamp-3.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsla(120, 100%, 200%, 1)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 255,255,255,255, "50,25", "255,255,255,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-3.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-3.png
new file mode 100644 (file)
index 0000000..f69a743
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-3.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-4.html
new file mode 100644 (file)
index 0000000..b6bec9f
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsla-clamp-4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsla-clamp-4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsla-clamp-4.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsla(120, 100%, -200%, 1)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-4.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-4.png
new file mode 100644 (file)
index 0000000..13a5157
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-4.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-5.html
new file mode 100644 (file)
index 0000000..55e39af
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsla-clamp-5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsla-clamp-5</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsla-clamp-5.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsla(120, 100%, 50%, 2)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-5.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-5.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-5.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-6.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-6.html
new file mode 100644 (file)
index 0000000..9a9c8d1
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.hsla-clamp-6</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.hsla-clamp-6</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hsla-clamp-6.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'hsla(120, 100%, 0%, -2)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-6.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-6.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-6.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.html4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.html4.html
new file mode 100644 (file)
index 0000000..81566a4
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.html4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.html4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.html4.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'limE';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.html4.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.html4.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.html4.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex1.html
new file mode 100644 (file)
index 0000000..d4da698
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hex1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '#f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex2.html
new file mode 100644 (file)
index 0000000..f2fe43f
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hex2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '#f0'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex3.html
new file mode 100644 (file)
index 0000000..779f972
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hex3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '#g00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex4.html
new file mode 100644 (file)
index 0000000..8bea385
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hex4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '#ff00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex5.html
new file mode 100644 (file)
index 0000000..f963bf0
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hex5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex5</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '#ff000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex6.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex6.html
new file mode 100644 (file)
index 0000000..1057c78
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hex6</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex6</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '#fg0000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex7.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex7.html
new file mode 100644 (file)
index 0000000..e4abee1
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hex7</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex7</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '#ff0000f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex8.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex8.html
new file mode 100644 (file)
index 0000000..a0dcd8d
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hex8</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex8</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '#ff0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-1.html
new file mode 100644 (file)
index 0000000..367a89d
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hsl-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hsl-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'hsl(0%, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-2.html
new file mode 100644 (file)
index 0000000..d39dc2a
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hsl-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hsl-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'hsl(z, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-3.html
new file mode 100644 (file)
index 0000000..6a24de5
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hsl-3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hsl-3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'hsl(0, 0, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-4.html
new file mode 100644 (file)
index 0000000..9e6a790
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hsl-4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hsl-4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'hsl(0, 100%, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-5.html
new file mode 100644 (file)
index 0000000..bbcc32f
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hsl-5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hsl-5</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'hsl(0, 100%, 100%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-6.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-6.html
new file mode 100644 (file)
index 0000000..710e300
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hsl-6</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hsl-6</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'hsl(0, 100.%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-1.html
new file mode 100644 (file)
index 0000000..a21ee3f
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hsla-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hsla-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'hsla(0%, 100%, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-2.html
new file mode 100644 (file)
index 0000000..1f5e81a
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.hsla-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hsla-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'hsla(0, 0, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-1.html
new file mode 100644 (file)
index 0000000..42c95d0
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.name-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.name-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'darkbrown'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-2.html
new file mode 100644 (file)
index 0000000..d5c10e4
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.name-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.name-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'firebrick1'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-3.html
new file mode 100644 (file)
index 0000000..faef92d
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.name-3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.name-3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'red blue'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-4.html
new file mode 100644 (file)
index 0000000..b5cc036
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.name-4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.name-4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '"red"'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-5.html
new file mode 100644 (file)
index 0000000..688e498
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.name-5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.name-5</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = '"red'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-1.html
new file mode 100644 (file)
index 0000000..6679585
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgb-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgb-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgb(255.0, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-2.html
new file mode 100644 (file)
index 0000000..26f81af
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgb-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgb-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgb(255, 0.0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-3.html
new file mode 100644 (file)
index 0000000..28d7b90
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgb-3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgb-3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgb(255.0, 0, 0,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-4.html
new file mode 100644 (file)
index 0000000..3248805
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgb-4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgb-4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgb(100%, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-5.html
new file mode 100644 (file)
index 0000000..4e57aeb
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgb-5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgb-5</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgb(255 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-6.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-6.html
new file mode 100644 (file)
index 0000000..0718460
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgb-6</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgb-6</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgb(255, - 1, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-7.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-7.html
new file mode 100644 (file)
index 0000000..78d49f0
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgb-7</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgb-7</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgb(255, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-1.html
new file mode 100644 (file)
index 0000000..ccfd015
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgba-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgba-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgba(255, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-2.html
new file mode 100644 (file)
index 0000000..0993d3e
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgba-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgba-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgba(255.0, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-3.html
new file mode 100644 (file)
index 0000000..ec14ceb
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgba-3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgba-3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgba(100%, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-4.html
new file mode 100644 (file)
index 0000000..b575678
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgba-4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgba-4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgba(255, 0, 0, 100%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-5.html
new file mode 100644 (file)
index 0000000..877f0e9
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgba-5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgba-5</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgba(255, 0, 0, 1. 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-6.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-6.html
new file mode 100644 (file)
index 0000000..b8bae7e
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgba-6</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgba-6</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgba(255, 0, 0, 1.)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-7.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-7.html
new file mode 100644 (file)
index 0000000..4c64246
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.invalid.rgba-7</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.rgba-7</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#0f0';
+try { ctx.fillStyle = 'rgba(255, 0, 0, '; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-1.html
new file mode 100644 (file)
index 0000000..9338c79
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgb-clamp-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgb-clamp-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">Assumes colours are clamped to [0,255].
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgb-clamp-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgb(-1000, 1000, -1000)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-1.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-2.html
new file mode 100644 (file)
index 0000000..a6f95d7
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgb-clamp-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgb-clamp-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">Assumes colours are clamped to [0,255].
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgb-clamp-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgb(-200%, 200%, -200%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-2.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-3.html
new file mode 100644 (file)
index 0000000..97ab511
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgb-clamp-3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgb-clamp-3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">Assumes colours are clamped to [0,255].
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgb-clamp-3.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgb(-2147483649, 4294967298, -18446744073709551619)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-3.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-3.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-3.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-4.html
new file mode 100644 (file)
index 0000000..7f3b37b
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgb-clamp-4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgb-clamp-4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">Assumes colours are clamped to [0,255].
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgb-clamp-4.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgb(-1000000000000000000000000000000000000000, 1000000000000000000000000000000000000000, -1000000000000000000000000000000000000000)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-4.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-4.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-4.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-5.html
new file mode 100644 (file)
index 0000000..6bd60a8
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgb-clamp-5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgb-clamp-5</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">Assumes colours are clamped to [0,255].
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgb-clamp-5.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgb(-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-5.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-5.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-5.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-eof.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-eof.html
new file mode 100644 (file)
index 0000000..7da7468
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgb-eof</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.fillStyle.parse.rgb-eof</h1>
+<p class="desc"></p>
+
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgb-eof.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgb(0, 255, 0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-eof.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-eof.png
new file mode 100644 (file)
index 0000000..2733836
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-eof.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-num.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-num.html
new file mode 100644 (file)
index 0000000..9db617c
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgb-num</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgb-num</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgb-num.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgb(0,255,0)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-num.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-num.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-num.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-percent.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-percent.html
new file mode 100644 (file)
index 0000000..22549f3
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgb-percent</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgb-percent</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">CSS3 Color says "The integer value 255 corresponds to 100%". (In particular, it is not 254...)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgb-percent.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgb(0% ,100% ,0%)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-percent.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-percent.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-percent.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-1.html
new file mode 100644 (file)
index 0000000..261d5c4
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-clamp-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgba-clamp-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-clamp-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba(0, 255, 0, -2)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-1.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-2.html
new file mode 100644 (file)
index 0000000..e14beef
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-clamp-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgba-clamp-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-clamp-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba(0, 255, 0, 2)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-2.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-eof.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-eof.html
new file mode 100644 (file)
index 0000000..b036e30
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-eof</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.fillStyle.parse.rgba-eof</h1>
+<p class="desc"></p>
+
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-eof.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba(0, 255, 0, 1';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-eof.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-eof.png
new file mode 100644 (file)
index 0000000..2733836
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-eof.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-1.html
new file mode 100644 (file)
index 0000000..f345487
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-num-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgba-num-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-num-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba(  0  ,  255  ,  0  ,  .499  )';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,127, "50,25", "0,255,0,127");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-1.png
new file mode 100644 (file)
index 0000000..2aa6265
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-2.html
new file mode 100644 (file)
index 0000000..daabd1d
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-num-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgba-num-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-num-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba(  0  ,  255  ,  0  ,  0.499  )';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,127, "50,25", "0,255,0,127");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-2.png
new file mode 100644 (file)
index 0000000..2aa6265
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-percent.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-percent.html
new file mode 100644 (file)
index 0000000..94eda16
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-percent</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgba-percent</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-percent.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba(0%,100%,0%,0.499)';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,127, "50,25", "0,255,0,127");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-percent.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-percent.png
new file mode 100644 (file)
index 0000000..2aa6265
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-percent.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-1.html
new file mode 100644 (file)
index 0000000..87e2b9a
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-solid-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgba-solid-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-solid-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba(  0  ,  255  ,  0  ,  1  )';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-1.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-2.html
new file mode 100644 (file)
index 0000000..4b8cf93
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-solid-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgba-solid-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-solid-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba(  0  ,  255  ,  0  ,  1.0  )';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-2.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-3.html
new file mode 100644 (file)
index 0000000..1900426
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-solid-3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgba-solid-3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-solid-3.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba(  0  ,  255  ,  0  , +1  )';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-3.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-3.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-3.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-4.html
new file mode 100644 (file)
index 0000000..7ea52a7
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.rgba-solid-4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.rgba-solid-4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.rgba-solid-4.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'rgba( -0  ,  255  , +0  ,  1  )';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-4.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-4.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-4.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-1.html
new file mode 100644 (file)
index 0000000..4115007
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.svg-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.svg-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.svg-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'gray';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 128,128,128,255, "50,25", "128,128,128,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-1.png
new file mode 100644 (file)
index 0000000..f067f39
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-2.html
new file mode 100644 (file)
index 0000000..0fc2872
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.svg-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.svg-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.svg-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'grey';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 128,128,128,255, "50,25", "128,128,128,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-2.png
new file mode 100644 (file)
index 0000000..f067f39
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.system.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.system.html
new file mode 100644 (file)
index 0000000..09ccbe2
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.system</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.system</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'ThreeDDarkShadow';
+_assertMatch(ctx.fillStyle, /^#(?!(FF0000|ff0000|f00)$)/, "ctx.fillStyle", "/^#(?!(FF0000|ff0000|f00)$)/"); // test that it's not red
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-1.html
new file mode 100644 (file)
index 0000000..1c83742
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.transparent-1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.transparent-1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.transparent-1.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'transparent';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-1.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-1.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-1.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-2.html
new file mode 100644 (file)
index 0000000..47d0572
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.fillStyle.parse.transparent-2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.transparent-2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
+</ul>
+</div>
+<p class="notes">
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.transparent-2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+
+ctx.fillStyle = '#f00';
+ctx.fillStyle = 'TrAnSpArEnT';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-2.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.exists.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.exists.html
new file mode 100644 (file)
index 0000000..3cf9c22
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.getcontext.exists</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.getcontext.html">getcontext</a>.exists</h1>
+<p class="desc">The 2D context is implemented</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.2d">context.2d</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(canvas.getContext('2d'), null, "canvas.getContext('2d')", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.extraargs.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.extraargs.html
new file mode 100644 (file)
index 0000000..694fd39
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.getcontext.extraargs</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.getcontext.html">getcontext</a>.extraargs</h1>
+<p class="desc">The 2D context ignores extra getContext arguments</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.2d.extraargs">context.2d.extraargs</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(canvas.getContext('2d', false, {}, [], 1, "2"), null, "canvas.getContext('2d', false, {}, [], 1, \"2\")", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.shared.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.shared.html
new file mode 100644 (file)
index 0000000..fa4c480
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.getcontext.shared</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.getcontext.html">getcontext</a>.shared</h1>
+<p class="desc">getContext('2d') returns objects which share canvas state</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.unique">context.unique</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var ctx2 = canvas.getContext('2d');
+ctx.fillStyle = '#f00';
+ctx2.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.unique.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.unique.html
new file mode 100644 (file)
index 0000000..dc6e040
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.getcontext.unique</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.getcontext.html">getcontext</a>.unique</h1>
+<p class="desc">getContext('2d') returns the same object</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.unique">context.unique</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.getContext('2d'), canvas.getContext('2d'), "canvas.getContext('2d')", "canvas.getContext('2d')");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.empty.html
new file mode 100644 (file)
index 0000000..54ab642
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.empty</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.empty">2d.gradient.empty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var g = ctx.createLinearGradient(0, 0, 0, 50);
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.alpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.alpha.html
new file mode 100644 (file)
index 0000000..61fc02f
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.alpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.interpolate.html">interpolate</a>.alpha</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.interpolate.linear">2d.gradient.interpolate.linear</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.gradient.interpolate.alpha.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#ff0';
+ctx.fillRect(0, 0, 100, 50);
+var g = ctx.createLinearGradient(0, 0, 100, 0);
+g.addColorStop(0, 'rgba(0,0,255, 0)');
+g.addColorStop(1, 'rgba(0,0,255, 1)');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 25,25, 191,191,63,255, "25,25", "191,191,63,255", 3);
+_assertPixelApprox(canvas, 50,25, 127,127,127,255, "50,25", "127,127,127,255", 3);
+_assertPixelApprox(canvas, 75,25, 63,63,191,255, "75,25", "63,63,191,255", 3);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.alpha.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.alpha.png
new file mode 100644 (file)
index 0000000..90c4ec5
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.alpha.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.colour.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.colour.html
new file mode 100644 (file)
index 0000000..091e069
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.colour</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.interpolate.html">interpolate</a>.colour</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.interpolate.linear">2d.gradient.interpolate.linear</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.gradient.interpolate.colour.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createLinearGradient(0, 0, 100, 0);
+g.addColorStop(0, '#ff0');
+g.addColorStop(1, '#00f');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 25,25, 191,191,63,255, "25,25", "191,191,63,255", 3);
+_assertPixelApprox(canvas, 50,25, 127,127,127,255, "50,25", "127,127,127,255", 3);
+_assertPixelApprox(canvas, 75,25, 63,63,191,255, "75,25", "63,63,191,255", 3);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.colour.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.colour.png
new file mode 100644 (file)
index 0000000..90c4ec5
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.colour.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.multiple.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.multiple.html
new file mode 100644 (file)
index 0000000..cf0fc39
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.multiple</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.interpolate.html">interpolate</a>.multiple</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.interpolate.linear">2d.gradient.interpolate.linear</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.gradient.interpolate.multiple.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 200;
+var g = ctx.createLinearGradient(0, 0, 200, 0);
+g.addColorStop(0, '#ff0');
+g.addColorStop(0.5, '#0ff');
+g.addColorStop(1, '#f0f');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 200, 50);
+_assertPixelApprox(canvas, 50,25, 127,255,127,255, "50,25", "127,255,127,255", 3);
+_assertPixelApprox(canvas, 100,25, 0,255,255,255, "100,25", "0,255,255,255", 3);
+_assertPixelApprox(canvas, 150,25, 127,127,255,255, "150,25", "127,127,255,255", 3);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.multiple.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.multiple.png
new file mode 100644 (file)
index 0000000..7af7994
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.multiple.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.outside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.outside.html
new file mode 100644 (file)
index 0000000..ff0e94b
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.outside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.interpolate.html">interpolate</a>.outside</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.outside.first">2d.gradient.outside.first</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.outside.last">2d.gradient.outside.last</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createLinearGradient(25, 0, 75, 0);
+g.addColorStop(0.4, '#0f0');
+g.addColorStop(0.6, '#0f0');
+
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 20,25, 0,255,0,255, "20,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 80,25, 0,255,0,255, "80,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap.html
new file mode 100644 (file)
index 0000000..b3d5867
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.overlap</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.interpolate.html">interpolate</a>.overlap</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.interpolate.overlap">2d.gradient.interpolate.overlap</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.gradient.interpolate.overlap.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 200;
+var g = ctx.createLinearGradient(0, 0, 200, 0);
+g.addColorStop(0, '#f00');
+g.addColorStop(0, '#ff0');
+g.addColorStop(0.25, '#00f');
+g.addColorStop(0.25, '#0f0');
+g.addColorStop(0.25, '#0f0');
+g.addColorStop(0.25, '#0f0');
+g.addColorStop(0.25, '#ff0');
+g.addColorStop(0.5, '#00f');
+g.addColorStop(0.5, '#0f0');
+g.addColorStop(0.75, '#00f');
+g.addColorStop(0.75, '#f00');
+g.addColorStop(0.75, '#ff0');
+g.addColorStop(0.5, '#0f0');
+g.addColorStop(0.5, '#0f0');
+g.addColorStop(0.5, '#ff0');
+g.addColorStop(1, '#00f');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 200, 50);
+_assertPixelApprox(canvas, 49,25, 0,0,255,255, "49,25", "0,0,255,255", 16);
+_assertPixelApprox(canvas, 51,25, 255,255,0,255, "51,25", "255,255,0,255", 16);
+_assertPixelApprox(canvas, 99,25, 0,0,255,255, "99,25", "0,0,255,255", 16);
+_assertPixelApprox(canvas, 101,25, 255,255,0,255, "101,25", "255,255,0,255", 16);
+_assertPixelApprox(canvas, 149,25, 0,0,255,255, "149,25", "0,0,255,255", 16);
+_assertPixelApprox(canvas, 151,25, 255,255,0,255, "151,25", "255,255,0,255", 16);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap.png
new file mode 100644 (file)
index 0000000..a15edde
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap2.html
new file mode 100644 (file)
index 0000000..76480f0
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.overlap2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.interpolate.html">interpolate</a>.overlap2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.interpolate.overlap">2d.gradient.interpolate.overlap</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createLinearGradient(0, 0, 100, 0);
+var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ];
+for (var p = 0; p < ps.length; ++p)
+{
+        g.addColorStop(ps[p], '#0f0');
+        for (var i = 0; i < 15; ++i)
+                g.addColorStop(ps[p], '#f00');
+        g.addColorStop(ps[p], '#0f0');
+}
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 30,25, 0,255,0,255, "30,25", "0,255,0,255");
+_assertPixel(canvas, 40,25, 0,255,0,255, "40,25", "0,255,0,255");
+_assertPixel(canvas, 60,25, 0,255,0,255, "60,25", "0,255,0,255");
+_assertPixel(canvas, 80,25, 0,255,0,255, "80,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.solid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.solid.html
new file mode 100644 (file)
index 0000000..1ef91b0
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.solid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.interpolate.html">interpolate</a>.solid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.interpolate.linear">2d.gradient.interpolate.linear</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createLinearGradient(0, 0, 100, 0);
+g.addColorStop(0, '#0f0');
+g.addColorStop(1, '#0f0');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.vertical.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.vertical.html
new file mode 100644 (file)
index 0000000..e49a442
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.vertical</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.interpolate.html">interpolate</a>.vertical</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.interpolate.linear">2d.gradient.interpolate.linear</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.gradient.interpolate.vertical.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createLinearGradient(0, 0, 0, 50);
+g.addColorStop(0, '#ff0');
+g.addColorStop(1, '#00f');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,12, 191,191,63,255, "50,12", "191,191,63,255", 10);
+_assertPixelApprox(canvas, 50,25, 127,127,127,255, "50,25", "127,127,127,255", 5);
+_assertPixelApprox(canvas, 50,37, 63,63,191,255, "50,37", "63,63,191,255", 10);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.vertical.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.vertical.png
new file mode 100644 (file)
index 0000000..06bc35f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.vertical.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fill.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fill.html
new file mode 100644 (file)
index 0000000..282a3d7
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.zerosize.fill</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.gradient.interpolate.zerosize.fill</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction)
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.rect(0, 0, 100, 50);
+ctx.fill();
+_assertPixel(canvas, 40,20, 0,255,0,255, "40,20", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillRect.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillRect.html
new file mode 100644 (file)
index 0000000..efad7b0
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.zerosize.fillRect</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.gradient.interpolate.zerosize.fillRect</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction)
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 40,20, 0,255,0,255, "40,20", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillText.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillText.html
new file mode 100644 (file)
index 0000000..f9a7fe7
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.zerosize.fillText</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.gradient.interpolate.zerosize.fillText</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction)
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.font = '100px sans-serif';
+ctx.fillText("AA", 0, 50);
+_requireManualCheck();
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.html
new file mode 100644 (file)
index 0000000..f38bb7f
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.zerosize</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.interpolate.html">interpolate</a>.zerosize</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.linear.zerosize">2d.gradient.linear.zerosize</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction)
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 40,20, 0,255,0,255, "40,20", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.stroke.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.stroke.html
new file mode 100644 (file)
index 0000000..fddae28
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.zerosize.stroke</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.gradient.interpolate.zerosize.stroke</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction)
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.strokeStyle = g;
+ctx.rect(20, 20, 60, 10);
+ctx.stroke();
+_assertPixel(canvas, 19,19, 0,255,0,255, "19,19", "0,255,0,255");
+_assertPixel(canvas, 20,19, 0,255,0,255, "20,19", "0,255,0,255");
+_assertPixel(canvas, 21,19, 0,255,0,255, "21,19", "0,255,0,255");
+_assertPixel(canvas, 19,20, 0,255,0,255, "19,20", "0,255,0,255");
+_assertPixel(canvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255");
+_assertPixel(canvas, 21,20, 0,255,0,255, "21,20", "0,255,0,255");
+_assertPixel(canvas, 19,21, 0,255,0,255, "19,21", "0,255,0,255");
+_assertPixel(canvas, 20,21, 0,255,0,255, "20,21", "0,255,0,255");
+_assertPixel(canvas, 21,21, 0,255,0,255, "21,21", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeRect.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeRect.html
new file mode 100644 (file)
index 0000000..6a99c3e
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.zerosize.strokeRect</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.gradient.interpolate.zerosize.strokeRect</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction)
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.strokeStyle = g;
+ctx.strokeRect(20, 20, 60, 10);
+_assertPixel(canvas, 19,19, 0,255,0,255, "19,19", "0,255,0,255");
+_assertPixel(canvas, 20,19, 0,255,0,255, "20,19", "0,255,0,255");
+_assertPixel(canvas, 21,19, 0,255,0,255, "21,19", "0,255,0,255");
+_assertPixel(canvas, 19,20, 0,255,0,255, "19,20", "0,255,0,255");
+_assertPixel(canvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255");
+_assertPixel(canvas, 21,20, 0,255,0,255, "21,20", "0,255,0,255");
+_assertPixel(canvas, 19,21, 0,255,0,255, "19,21", "0,255,0,255");
+_assertPixel(canvas, 20,21, 0,255,0,255, "20,21", "0,255,0,255");
+_assertPixel(canvas, 21,21, 0,255,0,255, "21,21", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeText.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeText.html
new file mode 100644 (file)
index 0000000..67a67d4
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.interpolate.zerosize.strokeText</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.gradient.interpolate.zerosize.strokeText</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction)
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.strokeStyle = g;
+ctx.font = '100px sans-serif';
+ctx.strokeText("AA", 0, 50);
+_requireManualCheck();
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.nonfinite.html
new file mode 100644 (file)
index 0000000..c35e694
--- /dev/null
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.linear.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.linear.html">linear</a>.nonfinite</h1>
+<p class="desc">createLinearGradient() throws NOT_SUPPORTED_ERR if arguments are not finite</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.linear.nonfinite">2d.gradient.linear.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createLinearGradient(Infinity, 0, 1, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, 0, 1, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(-Infinity, 0, 1, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(-Infinity, 0, 1, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(NaN, 0, 1, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(NaN, 0, 1, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, Infinity, 1, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, Infinity, 1, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, -Infinity, 1, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, -Infinity, 1, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, NaN, 1, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, NaN, 1, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, 0, Infinity, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, Infinity, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, 0, -Infinity, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, -Infinity, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, 0, NaN, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, NaN, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, 0, 1, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, 1, Infinity)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, 0, 1, -Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, 1, -Infinity)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, 0, 1, NaN);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, 1, NaN)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(Infinity, Infinity, 1, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, Infinity, 1, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(Infinity, Infinity, Infinity, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, Infinity, Infinity, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(Infinity, Infinity, 1, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, Infinity, 1, Infinity)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(Infinity, 0, Infinity, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, 0, Infinity, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(Infinity, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, 0, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(Infinity, 0, 1, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, 0, 1, Infinity)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, Infinity, Infinity, 0);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, Infinity, Infinity, 0)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, Infinity, 1, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, Infinity, 1, Infinity)"); }
+try { var _thrown = false;
+  ctx.createLinearGradient(0, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, Infinity, Infinity)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.1.html
new file mode 100644 (file)
index 0000000..360bd27
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.linear.transform.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.linear.html">linear</a>.<a href="index.2d.gradient.linear.transform.html">transform</a>.1</h1>
+<p class="desc">Linear gradient coordinates are relative to the coordinate space at the time of filling</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.linear.transform">2d.gradient.linear.transform</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createLinearGradient(0, 0, 200, 0);
+g.addColorStop(0, '#f00');
+g.addColorStop(0.25, '#0f0');
+g.addColorStop(0.75, '#0f0');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.translate(-50, 0);
+ctx.fillRect(50, 0, 100, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.2.html
new file mode 100644 (file)
index 0000000..600bfe4
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.linear.transform.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.linear.html">linear</a>.<a href="index.2d.gradient.linear.transform.html">transform</a>.2</h1>
+<p class="desc">Linear gradient coordinates are relative to the coordinate space at the time of filling</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.linear.transform">2d.gradient.linear.transform</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.translate(100, 0);
+var g = ctx.createLinearGradient(0, 0, 200, 0);
+g.addColorStop(0, '#f00');
+g.addColorStop(0.25, '#0f0');
+g.addColorStop(0.75, '#0f0');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.translate(-150, 0);
+ctx.fillRect(50, 0, 100, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.3.html
new file mode 100644 (file)
index 0000000..b86f596
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.linear.transform.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.linear.html">linear</a>.<a href="index.2d.gradient.linear.transform.html">transform</a>.3</h1>
+<p class="desc">Linear gradient transforms do not experience broken caching effects</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.linear.transform">2d.gradient.linear.transform</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createLinearGradient(0, 0, 200, 0);
+g.addColorStop(0, '#f00');
+g.addColorStop(0.25, '#0f0');
+g.addColorStop(0.75, '#0f0');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+ctx.translate(-50, 0);
+ctx.fillRect(50, 0, 100, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.compare.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.compare.html
new file mode 100644 (file)
index 0000000..15c3746
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.object.compare</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.object.html">object</a>.compare</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.object">2d.gradient.object</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g1 = ctx.createLinearGradient(0, 0, 100, 0);
+var g2 = ctx.createLinearGradient(0, 0, 100, 0);
+_assertDifferent(g1, g2, "g1", "g2");
+ctx.fillStyle = g1;
+_assertSame(ctx.fillStyle, g1, "ctx.fillStyle", "g1");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.crosscanvas.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.crosscanvas.html
new file mode 100644 (file)
index 0000000..e589d46
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.object.crosscanvas</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.object.html">object</a>.crosscanvas</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+var g = document.createElement('canvas').getContext('2d').createLinearGradient(0, 0, 100, 0);
+g.addColorStop(0, '#0f0');
+g.addColorStop(1, '#0f0');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.current.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.current.html
new file mode 100644 (file)
index 0000000..a673590
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.object.current</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.object.html">object</a>.current</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.currentColor.gradient">2d.currentColor.gradient</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.gradient.object.current.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('style', 'color: #f00');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createLinearGradient(0, 0, 100, 0);
+g.addColorStop(0, 'currentColor');
+g.addColorStop(1, 'currentColor');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.current.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.current.png
new file mode 100644 (file)
index 0000000..13a5157
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.current.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidcolour.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidcolour.html
new file mode 100644 (file)
index 0000000..1175ce1
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.object.invalidcolour</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.object.html">object</a>.invalidcolour</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.invalidcolour">2d.gradient.invalidcolour</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createLinearGradient(0, 0, 100, 0);
+try { var _thrown = false;
+  g.addColorStop(0, "");
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: g.addColorStop(0, \"\")"); }
+try { var _thrown = false;
+  g.addColorStop(0, 'null');
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: g.addColorStop(0, 'null')"); }
+try { var _thrown = false;
+  g.addColorStop(0, 'undefined');
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: g.addColorStop(0, 'undefined')"); }
+try { var _thrown = false;
+  g.addColorStop(0, null);
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: g.addColorStop(0, null)"); }
+try { var _thrown = false;
+  g.addColorStop(0, undefined);
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: g.addColorStop(0, undefined)"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidoffset.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidoffset.html
new file mode 100644 (file)
index 0000000..9dadc87
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.object.invalidoffset</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.object.html">object</a>.invalidoffset</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.invalidoffset">2d.gradient.invalidoffset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createLinearGradient(0, 0, 100, 0);
+try { var _thrown = false;
+  g.addColorStop(-1, '#000');
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(-1, '#000')"); }
+try { var _thrown = false;
+  g.addColorStop(2, '#000');
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(2, '#000')"); }
+try { var _thrown = false;
+  g.addColorStop(Infinity, '#000');
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(Infinity, '#000')"); }
+try { var _thrown = false;
+  g.addColorStop(-Infinity, '#000');
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(-Infinity, '#000')"); }
+try { var _thrown = false;
+  g.addColorStop(NaN, '#000');
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(NaN, '#000')"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.return.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.return.html
new file mode 100644 (file)
index 0000000..745722e
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.object.return</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.object.html">object</a>.return</h1>
+<p class="desc">createLinearGradient() and createRadialGradient() returns objects implementing CanvasGradient</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.linear.return">2d.gradient.linear.return</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.return">2d.gradient.radial.return</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+window.CanvasGradient.prototype.thisImplementsCanvasGradient = true;
+
+var g1 = ctx.createLinearGradient(0, 0, 100, 0);
+_assertDifferent(g1.addColorStop, undefined, "g1.addColorStop", "undefined");
+_assertSame(g1.thisImplementsCanvasGradient, true, "g1.thisImplementsCanvasGradient", "true");
+
+var g2 = ctx.createRadialGradient(0, 0, 10, 0, 0, 20);
+_assertDifferent(g2.addColorStop, undefined, "g2.addColorStop", "undefined");
+_assertSame(g2.thisImplementsCanvasGradient, true, "g2.thisImplementsCanvasGradient", "true");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.type.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.type.html
new file mode 100644 (file)
index 0000000..e824414
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.object.type</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.object.html">object</a>.type</h1>
+<p class="desc">window.CanvasGradient exists and has the right properties</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.canvasGradient.type">2d.canvasGradient.type</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(window.CanvasGradient, undefined, "window.CanvasGradient", "undefined");
+_assertDifferent(window.CanvasGradient.prototype.addColorStop, undefined, "window.CanvasGradient.prototype.addColorStop", "undefined");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.update.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.update.html
new file mode 100644 (file)
index 0000000..153d74c
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.object.update</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.object.html">object</a>.update</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.update">2d.gradient.update</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createLinearGradient(-100, 0, 200, 0);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+g.addColorStop(0.1, '#0f0');
+g.addColorStop(0.9, '#0f0');
+ctx.fillRect(0, 0, 100, 50);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.behind.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.behind.html
new file mode 100644 (file)
index 0000000..11a2597
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.cone.behind</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.cone.html">cone</a>.behind</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.beside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.beside.html
new file mode 100644 (file)
index 0000000..54e2578
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.cone.beside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.cone.html">cone</a>.beside</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.bottom.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.bottom.html
new file mode 100644 (file)
index 0000000..3694ada
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.cone.bottom</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.cone.html">cone</a>.bottom</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101);
+g.addColorStop(0, '#0f0');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.cylinder.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.cylinder.html
new file mode 100644 (file)
index 0000000..67e3e22
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.cone.cylinder</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.cone.html">cone</a>.cylinder</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100);
+g.addColorStop(0, '#0f0');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.front.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.front.html
new file mode 100644 (file)
index 0000000..c55dba1
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.cone.front</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.cone.html">cone</a>.front</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#0f0');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape1.html
new file mode 100644 (file)
index 0000000..9740736
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.cone.shape1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.cone.html">cone</a>.shape1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(30+tol, 40);
+ctx.lineTo(110, -20+tol);
+ctx.lineTo(110, 100-tol);
+ctx.fill();
+
+var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4);
+g.addColorStop(0, '#0f0');
+g.addColorStop(1, '#0f0');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape2.html
new file mode 100644 (file)
index 0000000..abc824b
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.cone.shape2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.cone.html">cone</a>.shape2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(30-tol, 40);
+ctx.lineTo(110, -20-tol);
+ctx.lineTo(110, 100+tol);
+ctx.fill();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.top.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.top.html
new file mode 100644 (file)
index 0000000..befca02
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.cone.top</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.cone.html">cone</a>.top</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#0f0');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.equal.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.equal.html
new file mode 100644 (file)
index 0000000..39162e6
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.equal</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.equal</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.equal">2d.gradient.radial.equal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside1.html
new file mode 100644 (file)
index 0000000..b041a53
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.inside1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.inside1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200);
+g.addColorStop(0, '#0f0');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside2.html
new file mode 100644 (file)
index 0000000..80d3f3c
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.inside2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.inside2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#0f0');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside3.html
new file mode 100644 (file)
index 0000000..981a6e7
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.inside3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.inside3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100);
+g.addColorStop(0, '#f00');
+g.addColorStop(0.993, '#f00');
+g.addColorStop(1, '#0f0');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.negative.html
new file mode 100644 (file)
index 0000000..983b453
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.negative</h1>
+<p class="desc">createRadialGradient() throws INDEX_SIZE_ERR if either radius is negative</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.negative">2d.gradient.radial.negative</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.nonfinite.html
new file mode 100644 (file)
index 0000000..deab89f
--- /dev/null
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.nonfinite</h1>
+<p class="desc">createRadialGradient() throws NOT_SUPPORTED_ERR if arguments are not finite</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.nonfinite">2d.gradient.radial.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, NaN, 1, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, NaN, 1, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, NaN, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, NaN, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, NaN, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, NaN, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, 0, NaN, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, NaN, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, 0, 0, NaN);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, 0, NaN)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity)"); }
+try { var _thrown = false;
+  ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside1.html
new file mode 100644 (file)
index 0000000..6667ea8
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.outside1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.outside1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#0f0');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside2.html
new file mode 100644 (file)
index 0000000..8d3627d
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.outside2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.outside2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10);
+g.addColorStop(0, '#0f0');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch1.html
new file mode 100644 (file)
index 0000000..f4096c2
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.touch1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.touch1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch2.html
new file mode 100644 (file)
index 0000000..9f7425a
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.touch2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.touch2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150);
+g.addColorStop(0, '#f00');
+g.addColorStop(0.01, '#0f0');
+g.addColorStop(0.99, '#0f0');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch3.html
new file mode 100644 (file)
index 0000000..60457a8
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.touch3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.touch3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.rendering">2d.gradient.radial.rendering</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50);
+g.addColorStop(0, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.1.html
new file mode 100644 (file)
index 0000000..346a9a5
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.transform.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.transform.html">transform</a>.1</h1>
+<p class="desc">Radial gradient coordinates are relative to the coordinate space at the time of filling</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.transform">2d.gradient.radial.transform</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2);
+g.addColorStop(0, '#0f0');
+g.addColorStop(0.5, '#0f0');
+g.addColorStop(0.51, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.translate(50, 25);
+ctx.scale(10, 10);
+ctx.fillRect(-5, -2.5, 10, 5);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.2.html
new file mode 100644 (file)
index 0000000..98bb2dd
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.transform.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.transform.html">transform</a>.2</h1>
+<p class="desc">Radial gradient coordinates are relative to the coordinate space at the time of filling</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.transform">2d.gradient.radial.transform</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.translate(100, 0);
+var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2);
+g.addColorStop(0, '#0f0');
+g.addColorStop(0.5, '#0f0');
+g.addColorStop(0.51, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.translate(-50, 25);
+ctx.scale(10, 10);
+ctx.fillRect(-5, -2.5, 10, 5);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.3.html
new file mode 100644 (file)
index 0000000..baaa97c
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.gradient.radial.transform.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.gradient.html">gradient</a>.<a href="index.2d.gradient.radial.html">radial</a>.<a href="index.2d.gradient.radial.transform.html">transform</a>.3</h1>
+<p class="desc">Radial gradient transforms do not experience broken caching effects</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.gradient.radial.transform">2d.gradient.radial.transform</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2);
+g.addColorStop(0, '#0f0');
+g.addColorStop(0.5, '#0f0');
+g.addColorStop(0.51, '#f00');
+g.addColorStop(1, '#f00');
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+ctx.translate(50, 25);
+ctx.scale(10, 10);
+ctx.fillRect(-5, -2.5, 10, 5);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.basic.html
new file mode 100644 (file)
index 0000000..ccc0a26
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create1.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create1.html">create1</a>.basic</h1>
+<p class="desc">createImageData(imgdata) exists and returns something</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create1.object">2d.imageData.create1.object</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(ctx.createImageData(ctx.createImageData(1, 1)), null, "ctx.createImageData(ctx.createImageData(1, 1))", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.initial.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.initial.html
new file mode 100644 (file)
index 0000000..39d7ae4
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create1.initial</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create1.html">create1</a>.initial</h1>
+<p class="desc">createImageData(imgdata) returns transparent black data of the right size</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create1.size">2d.imageData.create1.size</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create.initial">2d.imageData.create.initial</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.initial">2d.imageData.initial</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var imgdata1 = ctx.getImageData(0, 0, 10, 20);
+var imgdata2 = ctx.createImageData(imgdata1);
+_assertEqual(imgdata2.data.length, imgdata1.data.length, "imgdata2.data.length", "imgdata1.data.length");
+_assertEqual(imgdata2.width, imgdata1.width, "imgdata2.width", "imgdata1.width");
+_assertEqual(imgdata2.height, imgdata1.height, "imgdata2.height", "imgdata1.height");
+var isTransparentBlack = true;
+for (var i = 0; i < imgdata2.data.length; ++i)
+    if (imgdata2.data[i] !== 0)
+        isTransparentBlack = false;
+_assert(isTransparentBlack, "isTransparentBlack");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.this.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.this.html
new file mode 100644 (file)
index 0000000..a755604
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create1.this</title>
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.imageData.create1.this</h1>
+<p class="desc">createImageData(imgdata) should throw when called with the wrong |this|</p>
+
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.createImageData(1, 1);
+try { var _thrown = false;
+  CanvasRenderingContext2D.prototype.createImageData.call(null, imgdata);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: CanvasRenderingContext2D.prototype.createImageData.call(null, imgdata)"); }
+try { var _thrown = false;
+  CanvasRenderingContext2D.prototype.createImageData.call(undefined, imgdata);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: CanvasRenderingContext2D.prototype.createImageData.call(undefined, imgdata)"); }
+try { var _thrown = false;
+  CanvasRenderingContext2D.prototype.createImageData.call({}, imgdata);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: CanvasRenderingContext2D.prototype.createImageData.call({}, imgdata)"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.type.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.type.html
new file mode 100644 (file)
index 0000000..fa92a0d
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create1.type</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create1.html">create1</a>.type</h1>
+<p class="desc">createImageData(imgdata) returns an ImageData object containing a Uint8ClampedArray object</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create1.object">2d.imageData.create1.object</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+_assertDifferent(window.Uint8ClampedArray, undefined, "window.Uint8ClampedArray", "undefined");
+window.ImageData.prototype.thisImplementsImageData = true;
+window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true;
+var imgdata = ctx.createImageData(ctx.createImageData(1, 1));
+_assert(imgdata.thisImplementsImageData, "imgdata.thisImplementsImageData");
+_assert(imgdata.data.thisImplementsUint8ClampedArray, "imgdata.data.thisImplementsUint8ClampedArray");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.zero.html
new file mode 100644 (file)
index 0000000..ab7b91b
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create1.zero</title>
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.imageData.create1.zero</h1>
+<p class="desc">createImageData(null) throws TypeError</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createImageData(null);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.createImageData(null)"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.basic.html
new file mode 100644 (file)
index 0000000..26bb931
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create2.html">create2</a>.basic</h1>
+<p class="desc">createImageData(sw, sh) exists and returns something</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create2.object">2d.imageData.create2.object</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(ctx.createImageData(1, 1), null, "ctx.createImageData(1, 1)", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.initial.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.initial.html
new file mode 100644 (file)
index 0000000..5ee9520
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.initial</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create2.html">create2</a>.initial</h1>
+<p class="desc">createImageData(sw, sh) returns transparent black data of the right size</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create2.size">2d.imageData.create2.size</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create.initial">2d.imageData.create.initial</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.initial">2d.imageData.initial</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.createImageData(10, 20);
+_assertEqual(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+_assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
+_assert(imgdata.width > 0, "imgdata.width > 0");
+var isTransparentBlack = true;
+for (var i = 0; i < imgdata.data.length; ++i)
+    if (imgdata.data[i] !== 0)
+        isTransparentBlack = false;
+_assert(isTransparentBlack, "isTransparentBlack");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.large.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.large.html
new file mode 100644 (file)
index 0000000..9ca06c0
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.large</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create2.html">create2</a>.large</h1>
+<p class="desc">createImageData(sw, sh) works for sizes much larger than the canvas</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create2.size">2d.imageData.create2.size</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.createImageData(1000, 2000);
+_assertEqual(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+_assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
+_assert(imgdata.width > 0, "imgdata.width > 0");
+var isTransparentBlack = true;
+for (var i = 0; i < imgdata.data.length; i += 7813) // check ~1024 points (assuming normal scaling)
+    if (imgdata.data[i] !== 0)
+        isTransparentBlack = false;
+_assert(isTransparentBlack, "isTransparentBlack");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.negative.html
new file mode 100644 (file)
index 0000000..c2b3871
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create2.html">create2</a>.negative</h1>
+<p class="desc">createImageData(sw, sh) takes the absolute magnitude of the size arguments</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create2.size">2d.imageData.create2.size</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata1 = ctx.createImageData(10, 20);
+var imgdata2 = ctx.createImageData(-10, 20);
+var imgdata3 = ctx.createImageData(10, -20);
+var imgdata4 = ctx.createImageData(-10, -20);
+_assertEqual(imgdata1.data.length, imgdata2.data.length, "imgdata1.data.length", "imgdata2.data.length");
+_assertEqual(imgdata2.data.length, imgdata3.data.length, "imgdata2.data.length", "imgdata3.data.length");
+_assertEqual(imgdata3.data.length, imgdata4.data.length, "imgdata3.data.length", "imgdata4.data.length");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.nonfinite.html
new file mode 100644 (file)
index 0000000..33db3c8
--- /dev/null
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create2.html">create2</a>.nonfinite</h1>
+<p class="desc">createImageData() throws NOT_SUPPORTED_ERR if arguments are not finite</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.getcreate.nonfinite">2d.imageData.getcreate.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createImageData(Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.createImageData(-Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(-Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.createImageData(NaN, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(NaN, 10)"); }
+try { var _thrown = false;
+  ctx.createImageData(10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(10, Infinity)"); }
+try { var _thrown = false;
+  ctx.createImageData(10, -Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(10, -Infinity)"); }
+try { var _thrown = false;
+  ctx.createImageData(10, NaN);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(10, NaN)"); }
+try { var _thrown = false;
+  ctx.createImageData(Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(Infinity, Infinity)"); }
+var posinfobj = { valueOf: function() { return Infinity; } },
+    neginfobj = { valueOf: function() { return -Infinity; } },
+    nanobj = { valueOf: function() { return -Infinity; } };
+try { var _thrown = false;
+  ctx.createImageData(posinfobj, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(posinfobj, 10)"); }
+try { var _thrown = false;
+  ctx.createImageData(neginfobj, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(neginfobj, 10)"); }
+try { var _thrown = false;
+  ctx.createImageData(nanobj, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(nanobj, 10)"); }
+try { var _thrown = false;
+  ctx.createImageData(10, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(10, posinfobj)"); }
+try { var _thrown = false;
+  ctx.createImageData(10, neginfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(10, neginfobj)"); }
+try { var _thrown = false;
+  ctx.createImageData(10, nanobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(10, nanobj)"); }
+try { var _thrown = false;
+  ctx.createImageData(posinfobj, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createImageData(posinfobj, posinfobj)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.round.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.round.html
new file mode 100644 (file)
index 0000000..4e62164
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.round</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create2.html">create2</a>.round</h1>
+<p class="desc">createImageData(w, h) is rounded the same as getImageData(0, 0, w, h)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.createround">2d.imageData.createround</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata1 = ctx.createImageData(10.01, 10.99);
+var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99);
+_assertEqual(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width");
+_assertEqual(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.height");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.this.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.this.html
new file mode 100644 (file)
index 0000000..21e6f46
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.this</title>
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.imageData.create2.this</h1>
+<p class="desc">createImageData(sw, sh) should throw when called with the wrong |this|</p>
+
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  CanvasRenderingContext2D.prototype.createImageData.call(null, 1, 1);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: CanvasRenderingContext2D.prototype.createImageData.call(null, 1, 1)"); }
+try { var _thrown = false;
+  CanvasRenderingContext2D.prototype.createImageData.call(undefined, 1, 1);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: CanvasRenderingContext2D.prototype.createImageData.call(undefined, 1, 1)"); }
+try { var _thrown = false;
+  CanvasRenderingContext2D.prototype.createImageData.call({}, 1, 1);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: CanvasRenderingContext2D.prototype.createImageData.call({}, 1, 1)"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.tiny.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.tiny.html
new file mode 100644 (file)
index 0000000..fd2ec85
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.tiny</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create2.html">create2</a>.tiny</h1>
+<p class="desc">createImageData(sw, sh) works for sizes smaller than one pixel</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create2.size">2d.imageData.create2.size</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.one">2d.imageData.one</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.createImageData(0.0001, 0.0001);
+_assertEqual(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+_assertEqual(imgdata.width, 1, "imgdata.width", "1");
+_assertEqual(imgdata.height, 1, "imgdata.height", "1");
+var isTransparentBlack = true;
+for (var i = 0; i < imgdata.data.length; ++i)
+    if (imgdata.data[i] !== 0)
+        isTransparentBlack = false;
+_assert(isTransparentBlack, "isTransparentBlack");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.type.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.type.html
new file mode 100644 (file)
index 0000000..dcad02d
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.type</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create2.html">create2</a>.type</h1>
+<p class="desc">createImageData(sw, sh) returns an ImageData object containing a Uint8ClampedArray object</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.create2.object">2d.imageData.create2.object</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+_assertDifferent(window.Uint8ClampedArray, undefined, "window.Uint8ClampedArray", "undefined");
+window.ImageData.prototype.thisImplementsImageData = true;
+window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true;
+var imgdata = ctx.createImageData(1, 1);
+_assert(imgdata.thisImplementsImageData, "imgdata.thisImplementsImageData");
+_assert(imgdata.data.thisImplementsUint8ClampedArray, "imgdata.data.thisImplementsUint8ClampedArray");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.zero.html
new file mode 100644 (file)
index 0000000..8d48c8e
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.create2.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.create2.html">create2</a>.zero</h1>
+<p class="desc">createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.getcreate.zero">2d.imageData.getcreate.zero</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createImageData(10, 0);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.createImageData(10, 0)"); }
+try { var _thrown = false;
+  ctx.createImageData(0, 10);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.createImageData(0, 10)"); }
+try { var _thrown = false;
+  ctx.createImageData(0, 0);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.createImageData(0, 0)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.basic.html
new file mode 100644 (file)
index 0000000..f17fe17
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.basic</h1>
+<p class="desc">getImageData() exists and returns something</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.get.basic">2d.imageData.get.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(ctx.getImageData(0, 0, 100, 50), null, "ctx.getImageData(0, 0, 100, 50)", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.clamp.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.clamp.html
new file mode 100644 (file)
index 0000000..907a20e
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.clamp</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.clamp</h1>
+<p class="desc">getImageData() clamps colours to the range [0, 255]</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.range">2d.pixelarray.range</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = 'rgb(-100, -200, -300)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = 'rgb(256, 300, 400)';
+ctx.fillRect(20, 10, 60, 10);
+var imgdata1 = ctx.getImageData(10, 5, 1, 1);
+_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
+_assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
+var imgdata2 = ctx.getImageData(30, 15, 1, 1);
+_assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
+_assertSame(imgdata2.data[1], 255, "imgdata2.data[\""+(1)+"\"]", "255");
+_assertSame(imgdata2.data[2], 255, "imgdata2.data[\""+(2)+"\"]", "255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.length.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.length.html
new file mode 100644 (file)
index 0000000..979e4d5
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.length</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.length</h1>
+<p class="desc">getImageData() returns a correctly-sized Uint8ClampedArray</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.length">2d.pixelarray.length</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+_assertEqual(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonfinite.html
new file mode 100644 (file)
index 0000000..4406f90
--- /dev/null
@@ -0,0 +1,169 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.nonfinite</h1>
+<p class="desc">getImageData() throws NOT_SUPPORTED_ERR if arguments are not finite</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.getcreate.nonfinite">2d.imageData.getcreate.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.getImageData(Infinity, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(Infinity, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(-Infinity, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(-Infinity, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(NaN, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(NaN, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, -Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, -Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, NaN, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, NaN, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, -Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, -Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, NaN, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, NaN, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, 10, -Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, 10, -Infinity)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, 10, NaN);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, 10, NaN)"); }
+try { var _thrown = false;
+  ctx.getImageData(Infinity, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(Infinity, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(Infinity, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(Infinity, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.getImageData(Infinity, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(Infinity, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.getImageData(Infinity, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(Infinity, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(Infinity, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(Infinity, 10, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.getImageData(Infinity, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(Infinity, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, Infinity, Infinity)"); }
+var posinfobj = { valueOf: function() { return Infinity; } },
+    neginfobj = { valueOf: function() { return -Infinity; } },
+    nanobj = { valueOf: function() { return -Infinity; } };
+try { var _thrown = false;
+  ctx.getImageData(posinfobj, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(posinfobj, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(neginfobj, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(neginfobj, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(nanobj, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(nanobj, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, posinfobj, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, posinfobj, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, neginfobj, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, neginfobj, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, nanobj, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, nanobj, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, posinfobj, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, posinfobj, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, neginfobj, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, neginfobj, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, nanobj, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, nanobj, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, 10, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, 10, posinfobj)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, 10, neginfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, 10, neginfobj)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, 10, nanobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, 10, nanobj)"); }
+try { var _thrown = false;
+  ctx.getImageData(posinfobj, posinfobj, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(posinfobj, posinfobj, 10, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(posinfobj, posinfobj, posinfobj, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(posinfobj, posinfobj, posinfobj, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(posinfobj, posinfobj, posinfobj, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(posinfobj, posinfobj, posinfobj, posinfobj)"); }
+try { var _thrown = false;
+  ctx.getImageData(posinfobj, posinfobj, 10, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(posinfobj, posinfobj, 10, posinfobj)"); }
+try { var _thrown = false;
+  ctx.getImageData(posinfobj, 10, posinfobj, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(posinfobj, 10, posinfobj, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(posinfobj, 10, posinfobj, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(posinfobj, 10, posinfobj, posinfobj)"); }
+try { var _thrown = false;
+  ctx.getImageData(posinfobj, 10, 10, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(posinfobj, 10, 10, posinfobj)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, posinfobj, posinfobj, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, posinfobj, posinfobj, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, posinfobj, posinfobj, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, posinfobj, posinfobj, posinfobj)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, posinfobj, 10, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, posinfobj, 10, posinfobj)"); }
+try { var _thrown = false;
+  ctx.getImageData(10, 10, posinfobj, posinfobj);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.getImageData(10, 10, posinfobj, posinfobj)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonpremul.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonpremul.html
new file mode 100644 (file)
index 0000000..892e21f
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.nonpremul</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.nonpremul</h1>
+<p class="desc">getImageData() returns non-premultiplied colours</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.get.premul">2d.imageData.get.premul</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+var imgdata = ctx.getImageData(10, 10, 10, 10);
+_assert(imgdata.data[0] > 200, "imgdata.data[\""+(0)+"\"] > 200");
+_assert(imgdata.data[1] > 200, "imgdata.data[\""+(1)+"\"] > 200");
+_assert(imgdata.data[2] > 200, "imgdata.data[\""+(2)+"\"] > 200");
+_assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
+_assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.alpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.alpha.html
new file mode 100644 (file)
index 0000000..72a18be
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.order.alpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.<a href="index.2d.imageData.get.order.html">order</a>.alpha</h1>
+<p class="desc">getImageData() returns A in the fourth component</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.order">2d.pixelarray.order</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+_assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
+_assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.cols.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.cols.html
new file mode 100644 (file)
index 0000000..34aec4f
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.order.cols</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.<a href="index.2d.imageData.get.order.html">order</a>.cols</h1>
+<p class="desc">getImageData() returns leftmost columns first</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.order">2d.pixelarray.order</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#fff';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 2, 50);
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata.data[Math.round(imgdata.width/2*4)], 255, "imgdata.data[Math.round(imgdata.width/2*4)]", "255");
+_assertSame(imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)], 0, "imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)]", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rgb.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rgb.html
new file mode 100644 (file)
index 0000000..b32dfde
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.order.rgb</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.<a href="index.2d.imageData.get.order.html">order</a>.rgb</h1>
+<p class="desc">getImageData() returns R then G then B</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.order">2d.pixelarray.order</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.indexes">2d.pixelarray.indexes</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#48c';
+ctx.fillRect(0, 0, 100, 50);
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+_assertSame(imgdata.data[0], 0x44, "imgdata.data[\""+(0)+"\"]", "0x44");
+_assertSame(imgdata.data[1], 0x88, "imgdata.data[\""+(1)+"\"]", "0x88");
+_assertSame(imgdata.data[2], 0xCC, "imgdata.data[\""+(2)+"\"]", "0xCC");
+_assertSame(imgdata.data[3], 255, "imgdata.data[\""+(3)+"\"]", "255");
+_assertSame(imgdata.data[4], 0x44, "imgdata.data[\""+(4)+"\"]", "0x44");
+_assertSame(imgdata.data[5], 0x88, "imgdata.data[\""+(5)+"\"]", "0x88");
+_assertSame(imgdata.data[6], 0xCC, "imgdata.data[\""+(6)+"\"]", "0xCC");
+_assertSame(imgdata.data[7], 255, "imgdata.data[\""+(7)+"\"]", "255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rows.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rows.html
new file mode 100644 (file)
index 0000000..939843a
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.order.rows</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.<a href="index.2d.imageData.get.order.html">order</a>.rows</h1>
+<p class="desc">getImageData() returns topmost rows first</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.order">2d.pixelarray.order</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#fff';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 2);
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata.data[Math.floor(imgdata.width/2*4)], 0, "imgdata.data[Math.floor(imgdata.width/2*4)]", "0");
+_assertSame(imgdata.data[(imgdata.height/2)*imgdata.width*4], 255, "imgdata.data[(imgdata.height/2)*imgdata.width*4]", "255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.range.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.range.html
new file mode 100644 (file)
index 0000000..150fd53
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.range</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.range</h1>
+<p class="desc">getImageData() returns values in the range [0, 255]</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.range">2d.pixelarray.range</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.retrieve">2d.pixelarray.retrieve</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#fff';
+ctx.fillRect(20, 10, 60, 10);
+var imgdata1 = ctx.getImageData(10, 5, 1, 1);
+_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+var imgdata2 = ctx.getImageData(30, 15, 1, 1);
+_assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.negative.html
new file mode 100644 (file)
index 0000000..7a58be6
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.source.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.<a href="index.2d.imageData.get.source.html">source</a>.negative</h1>
+<p class="desc">getImageData() works with negative width and height, and returns top-to-bottom left-to-right</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.get.basic">2d.imageData.get.basic</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.order">2d.pixelarray.order</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#fff';
+ctx.fillRect(20, 10, 60, 10);
+
+var imgdata1 = ctx.getImageData(85, 25, -10, -10);
+_assertSame(imgdata1.data[0], 255, "imgdata1.data[\""+(0)+"\"]", "255");
+_assertSame(imgdata1.data[1], 255, "imgdata1.data[\""+(1)+"\"]", "255");
+_assertSame(imgdata1.data[2], 255, "imgdata1.data[\""+(2)+"\"]", "255");
+_assertSame(imgdata1.data[3], 255, "imgdata1.data[\""+(3)+"\"]", "255");
+_assertSame(imgdata1.data[imgdata1.data.length-4+0], 0, "imgdata1.data[imgdata1.data.length-4+0]", "0");
+_assertSame(imgdata1.data[imgdata1.data.length-4+1], 0, "imgdata1.data[imgdata1.data.length-4+1]", "0");
+_assertSame(imgdata1.data[imgdata1.data.length-4+2], 0, "imgdata1.data[imgdata1.data.length-4+2]", "0");
+_assertSame(imgdata1.data[imgdata1.data.length-4+3], 255, "imgdata1.data[imgdata1.data.length-4+3]", "255");
+
+var imgdata2 = ctx.getImageData(0, 0, -1, -1);
+_assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
+_assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
+_assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.outside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.outside.html
new file mode 100644 (file)
index 0000000..410c8ba
--- /dev/null
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.source.outside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.<a href="index.2d.imageData.get.source.html">source</a>.outside</h1>
+<p class="desc">getImageData() returns transparent black outside the canvas</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.get.basic">2d.imageData.get.basic</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.get.outside">2d.imageData.get.outside</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#08f';
+ctx.fillRect(0, 0, 100, 50);
+
+var imgdata1 = ctx.getImageData(-10, 5, 1, 1);
+_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
+_assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
+_assertSame(imgdata1.data[3], 0, "imgdata1.data[\""+(3)+"\"]", "0");
+
+var imgdata2 = ctx.getImageData(10, -5, 1, 1);
+_assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
+_assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
+_assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
+
+var imgdata3 = ctx.getImageData(200, 5, 1, 1);
+_assertSame(imgdata3.data[0], 0, "imgdata3.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata3.data[1], 0, "imgdata3.data[\""+(1)+"\"]", "0");
+_assertSame(imgdata3.data[2], 0, "imgdata3.data[\""+(2)+"\"]", "0");
+_assertSame(imgdata3.data[3], 0, "imgdata3.data[\""+(3)+"\"]", "0");
+
+var imgdata4 = ctx.getImageData(10, 60, 1, 1);
+_assertSame(imgdata4.data[0], 0, "imgdata4.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata4.data[1], 0, "imgdata4.data[\""+(1)+"\"]", "0");
+_assertSame(imgdata4.data[2], 0, "imgdata4.data[\""+(2)+"\"]", "0");
+_assertSame(imgdata4.data[3], 0, "imgdata4.data[\""+(3)+"\"]", "0");
+
+var imgdata5 = ctx.getImageData(100, 10, 1, 1);
+_assertSame(imgdata5.data[0], 0, "imgdata5.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata5.data[1], 0, "imgdata5.data[\""+(1)+"\"]", "0");
+_assertSame(imgdata5.data[2], 0, "imgdata5.data[\""+(2)+"\"]", "0");
+_assertSame(imgdata5.data[3], 0, "imgdata5.data[\""+(3)+"\"]", "0");
+
+var imgdata6 = ctx.getImageData(0, 10, 1, 1);
+_assertSame(imgdata6.data[0], 0, "imgdata6.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata6.data[1], 136, "imgdata6.data[\""+(1)+"\"]", "136");
+_assertSame(imgdata6.data[2], 255, "imgdata6.data[\""+(2)+"\"]", "255");
+_assertSame(imgdata6.data[3], 255, "imgdata6.data[\""+(3)+"\"]", "255");
+
+var imgdata7 = ctx.getImageData(-10, 10, 20, 20);
+_assertSame(imgdata7.data[ 0*4+0], 0, "imgdata7.data[ 0*4+0]", "0");
+_assertSame(imgdata7.data[ 0*4+1], 0, "imgdata7.data[ 0*4+1]", "0");
+_assertSame(imgdata7.data[ 0*4+2], 0, "imgdata7.data[ 0*4+2]", "0");
+_assertSame(imgdata7.data[ 0*4+3], 0, "imgdata7.data[ 0*4+3]", "0");
+_assertSame(imgdata7.data[ 9*4+0], 0, "imgdata7.data[ 9*4+0]", "0");
+_assertSame(imgdata7.data[ 9*4+1], 0, "imgdata7.data[ 9*4+1]", "0");
+_assertSame(imgdata7.data[ 9*4+2], 0, "imgdata7.data[ 9*4+2]", "0");
+_assertSame(imgdata7.data[ 9*4+3], 0, "imgdata7.data[ 9*4+3]", "0");
+_assertSame(imgdata7.data[10*4+0], 0, "imgdata7.data[10*4+0]", "0");
+_assertSame(imgdata7.data[10*4+1], 136, "imgdata7.data[10*4+1]", "136");
+_assertSame(imgdata7.data[10*4+2], 255, "imgdata7.data[10*4+2]", "255");
+_assertSame(imgdata7.data[10*4+3], 255, "imgdata7.data[10*4+3]", "255");
+_assertSame(imgdata7.data[19*4+0], 0, "imgdata7.data[19*4+0]", "0");
+_assertSame(imgdata7.data[19*4+1], 136, "imgdata7.data[19*4+1]", "136");
+_assertSame(imgdata7.data[19*4+2], 255, "imgdata7.data[19*4+2]", "255");
+_assertSame(imgdata7.data[19*4+3], 255, "imgdata7.data[19*4+3]", "255");
+_assertSame(imgdata7.data[20*4+0], 0, "imgdata7.data[20*4+0]", "0");
+_assertSame(imgdata7.data[20*4+1], 0, "imgdata7.data[20*4+1]", "0");
+_assertSame(imgdata7.data[20*4+2], 0, "imgdata7.data[20*4+2]", "0");
+_assertSame(imgdata7.data[20*4+3], 0, "imgdata7.data[20*4+3]", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.size.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.size.html
new file mode 100644 (file)
index 0000000..d990079
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.source.size</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.<a href="index.2d.imageData.get.source.html">source</a>.size</h1>
+<p class="desc">getImageData() returns bigger ImageData for bigger source rectangle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.get.basic">2d.imageData.get.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata1 = ctx.getImageData(0, 0, 10, 10);
+var imgdata2 = ctx.getImageData(0, 0, 20, 20);
+_assert(imgdata2.width > imgdata1.width, "imgdata2.width > imgdata1.width");
+_assert(imgdata2.height > imgdata1.height, "imgdata2.height > imgdata1.height");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.tiny.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.tiny.html
new file mode 100644 (file)
index 0000000..7d996e8
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.tiny</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.tiny</h1>
+<p class="desc">getImageData() works for sizes smaller than one pixel</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.one">2d.imageData.one</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 0.0001, 0.0001);
+_assertEqual(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+_assertEqual(imgdata.width, 1, "imgdata.width", "1");
+_assertEqual(imgdata.height, 1, "imgdata.height", "1");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.type.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.type.html
new file mode 100644 (file)
index 0000000..9e783c9
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.type</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.type</h1>
+<p class="desc">getImageData() returns an ImageData object containing a Uint8ClampedArray object</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.get.object">2d.imageData.get.object</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+_assertDifferent(window.Uint8ClampedArray, undefined, "window.Uint8ClampedArray", "undefined");
+window.ImageData.prototype.thisImplementsImageData = true;
+window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true;
+var imgdata = ctx.getImageData(0, 0, 1, 1);
+_assert(imgdata.thisImplementsImageData, "imgdata.thisImplementsImageData");
+_assert(imgdata.data.thisImplementsUint8ClampedArray, "imgdata.data.thisImplementsUint8ClampedArray");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.unaffected.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.unaffected.html
new file mode 100644 (file)
index 0000000..31186a1
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.unaffected</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.unaffected</h1>
+<p class="desc">getImageData() is not affected by context state</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.unaffected">2d.imageData.unaffected</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 50)
+ctx.fillStyle = '#f00';
+ctx.fillRect(50, 0, 50, 50)
+ctx.save();
+ctx.translate(50, 0);
+ctx.globalAlpha = 0.1;
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.shadowColor = '#f00';
+ctx.rect(0, 0, 5, 5);
+ctx.clip();
+var imgdata = ctx.getImageData(0, 0, 50, 50);
+ctx.restore();
+ctx.putImageData(imgdata, 50, 0);
+_assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.zero.html
new file mode 100644 (file)
index 0000000..0bba0dc
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.get.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.get.html">get</a>.zero</h1>
+<p class="desc">getImageData() throws INDEX_SIZE_ERR if size is zero</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.getcreate.zero">2d.imageData.getcreate.zero</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.getImageData(1, 1, 10, 0);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.getImageData(1, 1, 10, 0)"); }
+try { var _thrown = false;
+  ctx.getImageData(1, 1, 0, 10);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.getImageData(1, 1, 0, 10)"); }
+try { var _thrown = false;
+  ctx.getImageData(1, 1, 0, 0);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.getImageData(1, 1, 0, 0)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.clamp.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.clamp.html
new file mode 100644 (file)
index 0000000..c2b9b6f
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.object.clamp</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.clamp</h1>
+<p class="desc">ImageData.data clamps numbers to [0, 255]</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.modify">2d.pixelarray.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+
+imgdata.data[0] = 100;
+imgdata.data[0] = 300;
+_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+imgdata.data[0] = 100;
+imgdata.data[0] = -100;
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+imgdata.data[0] = 100;
+imgdata.data[0] = 200+Math.pow(2, 32);
+_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+imgdata.data[0] = 100;
+imgdata.data[0] = -200-Math.pow(2, 32);
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+imgdata.data[0] = 100;
+imgdata.data[0] = Math.pow(10, 39);
+_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+imgdata.data[0] = 100;
+imgdata.data[0] = -Math.pow(10, 39);
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+imgdata.data[0] = 100;
+imgdata.data[0] = -Infinity;
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+imgdata.data[0] = 100;
+imgdata.data[0] = Infinity;
+_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.ctor.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.ctor.html
new file mode 100644 (file)
index 0000000..77881ff
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.object.ctor</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.ctor</h1>
+<p class="desc">ImageData does not have a usable constructor</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.type">2d.imageData.type</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+try { var _thrown = false; new window.ImageData(1,1); } catch (e) { _thrown = true; } finally { _assert(_thrown, "should throw exception: new window.ImageData(1,1)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.nan.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.nan.html
new file mode 100644 (file)
index 0000000..69ccc71
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.object.nan</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.nan</h1>
+<p class="desc">ImageData.data converts NaN to 0</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.modify">2d.pixelarray.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+imgdata.data[0] = 100;
+imgdata.data[0] = NaN;
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+imgdata.data[0] = 100;
+imgdata.data[0] = "cheese";
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.properties.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.properties.html
new file mode 100644 (file)
index 0000000..eca7a49
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.object.properties</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.properties</h1>
+<p class="desc">ImageData objects have the right properties</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.type">2d.imageData.type</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+_assertEqual(typeof(imgdata.width), 'number', "typeof(imgdata.width)", "'number'");
+_assertEqual(typeof(imgdata.height), 'number', "typeof(imgdata.height)", "'number'");
+_assertEqual(typeof(imgdata.data), 'object', "typeof(imgdata.data)", "'object'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.readonly.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.readonly.html
new file mode 100644 (file)
index 0000000..be1e8c6
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.object.readonly</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.readonly</h1>
+<p class="desc">ImageData objects properties are read-only</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.type">2d.imageData.type</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+var w = imgdata.width;
+var h = imgdata.height;
+var d = imgdata.data;
+imgdata.width = 123;
+imgdata.height = 123;
+imgdata.data = [100,100,100,100];
+_assertSame(imgdata.width, w, "imgdata.width", "w");
+_assertSame(imgdata.height, h, "imgdata.height", "h");
+_assertSame(imgdata.data, d, "imgdata.data", "d");
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+_assertSame(imgdata.data[1], 0, "imgdata.data[\""+(1)+"\"]", "0");
+_assertSame(imgdata.data[2], 0, "imgdata.data[\""+(2)+"\"]", "0");
+_assertSame(imgdata.data[3], 0, "imgdata.data[\""+(3)+"\"]", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.round.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.round.html
new file mode 100644 (file)
index 0000000..3a97ad7
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.object.round</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.round</h1>
+<p class="desc">ImageData.data rounds numbers with round-to-zero</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.modify">2d.pixelarray.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+imgdata.data[0] = 0.499;
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+imgdata.data[0] = 0.5;
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+imgdata.data[0] = 0.501;
+_assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
+imgdata.data[0] = 1.499;
+_assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
+imgdata.data[0] = 1.5;
+_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+imgdata.data[0] = 1.501;
+_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+imgdata.data[0] = 2.5;
+_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+imgdata.data[0] = 3.5;
+_assertSame(imgdata.data[0], 4, "imgdata.data[\""+(0)+"\"]", "4");
+imgdata.data[0] = 252.5;
+_assertSame(imgdata.data[0], 252, "imgdata.data[\""+(0)+"\"]", "252");
+imgdata.data[0] = 253.5;
+_assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
+imgdata.data[0] = 254.5;
+_assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
+imgdata.data[0] = 256.5;
+_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+imgdata.data[0] = -0.5;
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+imgdata.data[0] = -1.5;
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.set.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.set.html
new file mode 100644 (file)
index 0000000..a935451
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.object.set</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.set</h1>
+<p class="desc">ImageData.data can be modified</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.modify">2d.pixelarray.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+imgdata.data[0] = 100;
+_assertSame(imgdata.data[0], 100, "imgdata.data[\""+(0)+"\"]", "100");
+imgdata.data[0] = 200;
+_assertSame(imgdata.data[0], 200, "imgdata.data[\""+(0)+"\"]", "200");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.string.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.string.html
new file mode 100644 (file)
index 0000000..eb09a9f
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.object.string</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.string</h1>
+<p class="desc">ImageData.data converts strings to numbers with ToNumber</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.modify">2d.pixelarray.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+imgdata.data[0] = 100;
+imgdata.data[0] = "110";
+_assertSame(imgdata.data[0], 110, "imgdata.data[\""+(0)+"\"]", "110");
+imgdata.data[0] = 100;
+imgdata.data[0] = "0x78";
+_assertSame(imgdata.data[0], 120, "imgdata.data[\""+(0)+"\"]", "120");
+imgdata.data[0] = 100;
+imgdata.data[0] = " +130e0 ";
+_assertSame(imgdata.data[0], 130, "imgdata.data[\""+(0)+"\"]", "130");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.undefined.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.undefined.html
new file mode 100644 (file)
index 0000000..1fcec18
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.object.undefined</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.undefined</h1>
+<p class="desc">ImageData.data converts undefined to 0</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pixelarray.modify">2d.pixelarray.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+imgdata.data[0] = 100;
+imgdata.data[0] = undefined;
+_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.alpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.alpha.html
new file mode 100644 (file)
index 0000000..4ed2a27
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.alpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.alpha</h1>
+<p class="desc">putImageData() puts non-solid image data correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.imageData.put.alpha.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.25)';
+ctx.fillRect(0, 0, 100, 50)
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.putImageData(imgdata, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,64, "50,25", "0,255,0,64", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.alpha.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.alpha.png
new file mode 100644 (file)
index 0000000..5428c65
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.alpha.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.basic.html
new file mode 100644 (file)
index 0000000..9077c7d
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.basic</h1>
+<p class="desc">putImageData() puts image data from getImageData() onto the canvas</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.3arg">2d.imageData.put.3arg</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50)
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.putImageData(imgdata, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.clip.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.clip.html
new file mode 100644 (file)
index 0000000..de8fcdd
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.clip</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.clip</h1>
+<p class="desc">putImageData() is not affected by clipping regions</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.unaffected">2d.imageData.unaffected</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50)
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.beginPath();
+ctx.rect(0, 0, 50, 50);
+ctx.clip();
+ctx.putImageData(imgdata, 0, 0);
+_assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.created.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.created.html
new file mode 100644 (file)
index 0000000..b4d53b7
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.created</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.created</h1>
+<p class="desc">putImageData() puts image data from createImageData() onto the canvas</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.createImageData(100, 50);
+for (var i = 0; i < imgdata.data.length; i += 4) {
+    imgdata.data[i] = 0;
+    imgdata.data[i+1] = 255;
+    imgdata.data[i+2] = 0;
+    imgdata.data[i+3] = 255;
+}
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.putImageData(imgdata, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.cross.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.cross.html
new file mode 100644 (file)
index 0000000..935043a
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.cross</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.cross</h1>
+<p class="desc">putImageData() accepts image data got from a different canvas</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#0f0';
+ctx2.fillRect(0, 0, 100, 50)
+var imgdata = ctx2.getImageData(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.putImageData(imgdata, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.negative.html
new file mode 100644 (file)
index 0000000..e4dec10
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.dirty.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.<a href="index.2d.imageData.put.dirty.html">dirty</a>.negative</h1>
+<p class="desc">putImageData() handles negative-sized dirty rectangles correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 20, 20)
+
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50)
+ctx.fillStyle = '#f00';
+ctx.fillRect(40, 20, 20, 20)
+ctx.putImageData(imgdata, 40, 20, 20, 20, -20, -20);
+
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 35,25, 0,255,0,255, "35,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 65,25, 0,255,0,255, "65,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,15, 0,255,0,255, "50,15", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,45, 0,255,0,255, "50,45", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.outside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.outside.html
new file mode 100644 (file)
index 0000000..7dfc68b
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.dirty.outside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.<a href="index.2d.imageData.put.dirty.html">dirty</a>.outside</h1>
+<p class="desc">putImageData() handles dirty rectangles outside the canvas correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50)
+
+ctx.putImageData(imgdata, 100, 20, 20, 20, -20, -20);
+ctx.putImageData(imgdata, 200, 200, 0, 0, 100, 50);
+ctx.putImageData(imgdata, 40, 20, -30, -20, 30, 20);
+ctx.putImageData(imgdata, -30, 20, 0, 0, 30, 20);
+
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 98,15, 0,255,0,255, "98,15", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 98,45, 0,255,0,255, "98,45", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 1,5, 0,255,0,255, "1,5", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 1,45, 0,255,0,255, "1,45", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect1.html
new file mode 100644 (file)
index 0000000..b7efae2
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.dirty.rect1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.<a href="index.2d.imageData.put.dirty.html">dirty</a>.rect1</h1>
+<p class="desc">putImageData() only modifies areas inside the dirty rectangle, using width and height</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 20, 20)
+
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50)
+ctx.fillStyle = '#f00';
+ctx.fillRect(40, 20, 20, 20)
+ctx.putImageData(imgdata, 40, 20, 0, 0, 20, 20);
+
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 35,25, 0,255,0,255, "35,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 65,25, 0,255,0,255, "65,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,15, 0,255,0,255, "50,15", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,45, 0,255,0,255, "50,45", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect2.html
new file mode 100644 (file)
index 0000000..2e5734e
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.dirty.rect2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.<a href="index.2d.imageData.put.dirty.html">dirty</a>.rect2</h1>
+<p class="desc">putImageData() only modifies areas inside the dirty rectangle, using x and y</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.fillStyle = '#0f0';
+ctx.fillRect(60, 30, 20, 20)
+
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50)
+ctx.fillStyle = '#f00';
+ctx.fillRect(40, 20, 20, 20)
+ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20);
+
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 35,25, 0,255,0,255, "35,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 65,25, 0,255,0,255, "65,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,15, 0,255,0,255, "50,15", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,45, 0,255,0,255, "50,45", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.zero.html
new file mode 100644 (file)
index 0000000..2b04971
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.dirty.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.<a href="index.2d.imageData.put.dirty.html">dirty</a>.zero</h1>
+<p class="desc">putImageData() with zero-sized dirty rectangle puts nothing</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50)
+ctx.putImageData(imgdata, 0, 0, 0, 0, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.modified.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.modified.html
new file mode 100644 (file)
index 0000000..418c0b6
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.modified</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.modified</h1>
+<p class="desc">putImageData() puts modified image data correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50)
+ctx.fillStyle = '#f00';
+ctx.fillRect(45, 20, 10, 10)
+var imgdata = ctx.getImageData(45, 20, 10, 10);
+for (var i = 0, len = imgdata.width*imgdata.height*4; i < len; i += 4)
+{
+    imgdata.data[i] = 0;
+    imgdata.data[i+1] = 255;
+}
+ctx.putImageData(imgdata, 45, 20);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.nonfinite.html
new file mode 100644 (file)
index 0000000..eb5d5d1
--- /dev/null
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.nonfinite</h1>
+<p class="desc">putImageData() throws NOT_SUPPORTED_ERR if arguments are not finite</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.nonfinite">2d.imageData.put.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = ctx.getImageData(0, 0, 10, 10);
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, -Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, -Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, NaN, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, NaN, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, -Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, -Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, NaN);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, NaN)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, -Infinity, 10, 10, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, -Infinity, 10, 10, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, NaN, 10, 10, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, NaN, 10, 10, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, -Infinity, 10, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, -Infinity, 10, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, NaN, 10, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, NaN, 10, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, -Infinity, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, -Infinity, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, NaN, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, NaN, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, -Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, -Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, NaN, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, NaN, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, 10, -Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, 10, -Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, 10, NaN, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, 10, NaN, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, 10, 10, -Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, 10, 10, -Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, 10, 10, NaN);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, 10, 10, NaN)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, 10);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, 10)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, Infinity)"); }
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, Infinity);
+} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, Infinity)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.null.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.null.html
new file mode 100644 (file)
index 0000000..5de258c
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.null</title>
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.imageData.put.null</h1>
+<p class="desc">putImageData() with null imagedata throws TypeError</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.putImageData(null, 0, 0);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.putImageData(null, 0, 0)"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.path.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.path.html
new file mode 100644 (file)
index 0000000..b41fc60
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.path</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.path</h1>
+<p class="desc">putImageData() does not affect the current path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.put.normal">2d.imageData.put.normal</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.rect(0, 0, 100, 50);
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+ctx.putImageData(imgdata, 0, 0);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unaffected.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unaffected.html
new file mode 100644 (file)
index 0000000..b72bd4f
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.unaffected</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.unaffected</h1>
+<p class="desc">putImageData() is not affected by context state</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.unaffected">2d.imageData.unaffected</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50)
+var imgdata = ctx.getImageData(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50)
+ctx.globalAlpha = 0.1;
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.shadowColor = '#f00';
+ctx.shadowBlur = 1;
+ctx.translate(100, 50);
+ctx.scale(0.1, 0.1);
+ctx.putImageData(imgdata, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unchanged.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unchanged.html
new file mode 100644 (file)
index 0000000..e85724e
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.unchanged</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.put.html">put</a>.unchanged</h1>
+<p class="desc">putImageData(getImageData(...), ...) has no effect</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.unchanged">2d.imageData.unchanged</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var i = 0;
+for (var y = 0; y < 16; ++y) {
+    for (var x = 0; x < 16; ++x, ++i) {
+        ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (Math.floor(i*23.3) % 256) + ',' + (i/256) + ')';
+        ctx.fillRect(x, y, 1, 1);
+    }
+}
+var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
+var olddata = [];
+for (var i = 0; i < imgdata1.data.length; ++i)
+    olddata[i] = imgdata1.data[i];
+
+ctx.putImageData(imgdata1, 0.1, 0.2);
+
+var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
+for (var i = 0; i < imgdata2.data.length; ++i) {
+    _assertSame(olddata[i], imgdata2.data[i], "olddata[\""+(i)+"\"]", "imgdata2.data[\""+(i)+"\"]");
+}
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.wrongtype.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.wrongtype.html
new file mode 100644 (file)
index 0000000..0f10cbf
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.imageData.put.wrongtype</title>
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.imageData.put.wrongtype</h1>
+<p class="desc">putImageData() does not accept non-ImageData objects</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
+try { var _thrown = false;
+  ctx.putImageData(imgdata, 0, 0);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.putImageData(imgdata, 0, 0)"); }
+try { var _thrown = false;
+  ctx.putImageData("cheese", 0, 0);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.putImageData('cheese', 0, 0)"); }
+try { var _thrown = false;
+  ctx.putImageData(42, 0, 0);
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.putImageData(42, 0, 0)"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.butt.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.butt.html
new file mode 100644 (file)
index 0000000..a00d8a3
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.cap.butt</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.cap.html">cap</a>.butt</h1>
+<p class="desc">lineCap 'butt' is rendered correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineCap.butt">2d.lineCap.butt</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineCap = 'butt';
+ctx.lineWidth = 20;
+
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.fillRect(15, 15, 20, 20);
+ctx.beginPath();
+ctx.moveTo(25, 15);
+ctx.lineTo(25, 35);
+ctx.stroke();
+
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(75, 15);
+ctx.lineTo(75, 35);
+ctx.stroke();
+ctx.fillRect(65, 15, 20, 20);
+
+_assertPixel(canvas, 25,14, 0,255,0,255, "25,14", "0,255,0,255");
+_assertPixel(canvas, 25,15, 0,255,0,255, "25,15", "0,255,0,255");
+_assertPixel(canvas, 25,16, 0,255,0,255, "25,16", "0,255,0,255");
+_assertPixel(canvas, 25,34, 0,255,0,255, "25,34", "0,255,0,255");
+_assertPixel(canvas, 25,35, 0,255,0,255, "25,35", "0,255,0,255");
+_assertPixel(canvas, 25,36, 0,255,0,255, "25,36", "0,255,0,255");
+
+_assertPixel(canvas, 75,14, 0,255,0,255, "75,14", "0,255,0,255");
+_assertPixel(canvas, 75,15, 0,255,0,255, "75,15", "0,255,0,255");
+_assertPixel(canvas, 75,16, 0,255,0,255, "75,16", "0,255,0,255");
+_assertPixel(canvas, 75,34, 0,255,0,255, "75,34", "0,255,0,255");
+_assertPixel(canvas, 75,35, 0,255,0,255, "75,35", "0,255,0,255");
+_assertPixel(canvas, 75,36, 0,255,0,255, "75,36", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.closed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.closed.html
new file mode 100644 (file)
index 0000000..77de8fa
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.cap.closed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.cap.html">cap</a>.closed</h1>
+<p class="desc">Line caps are not drawn at the corners of an unclosed rectangle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineCap.end">2d.lineCap.end</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineJoin = 'bevel';
+ctx.lineCap = 'square';
+ctx.lineWidth = 400;
+
+ctx.beginPath();
+ctx.moveTo(200, 200);
+ctx.lineTo(200, 1000);
+ctx.lineTo(1000, 1000);
+ctx.lineTo(1000, 200);
+ctx.closePath();
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.invalid.html
new file mode 100644 (file)
index 0000000..ab6795f
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.cap.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.cap.html">cap</a>.invalid</h1>
+<p class="desc">Setting lineCap to invalid values is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineCap.invalid">2d.lineCap.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.lineCap = 'butt'
+_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+
+ctx.lineCap = 'butt';
+ctx.lineCap = 'invalid';
+_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+
+ctx.lineCap = 'butt';
+ctx.lineCap = 'ROUND';
+_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+
+ctx.lineCap = 'butt';
+ctx.lineCap = 'round\0';
+_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+
+ctx.lineCap = 'butt';
+ctx.lineCap = 'round ';
+_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+
+ctx.lineCap = 'butt';
+ctx.lineCap = "";
+_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+
+ctx.lineCap = 'butt';
+ctx.lineCap = 'bevel';
+_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.open.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.open.html
new file mode 100644 (file)
index 0000000..94299a3
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.cap.open</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.cap.html">cap</a>.open</h1>
+<p class="desc">Line caps are drawn at the corners of an unclosed rectangle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineCap.end">2d.lineCap.end</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineJoin = 'bevel';
+ctx.lineCap = 'square';
+ctx.lineWidth = 400;
+
+ctx.beginPath();
+ctx.moveTo(200, 200);
+ctx.lineTo(200, 1000);
+ctx.lineTo(1000, 1000);
+ctx.lineTo(1000, 200);
+ctx.lineTo(200, 200);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.round.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.round.html
new file mode 100644 (file)
index 0000000..16ce63a
--- /dev/null
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.cap.round</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.cap.html">cap</a>.round</h1>
+<p class="desc">lineCap 'round' is rendered correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineCap.round">2d.lineCap.round</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ctx.lineCap = 'round';
+ctx.lineWidth = 20;
+
+
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+
+ctx.beginPath();
+ctx.moveTo(35-tol, 15);
+ctx.arc(25, 15, 10-tol, 0, Math.PI, true);
+ctx.arc(25, 35, 10-tol, Math.PI, 0, true);
+ctx.fill();
+
+ctx.beginPath();
+ctx.moveTo(25, 15);
+ctx.lineTo(25, 35);
+ctx.stroke();
+
+
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+
+ctx.beginPath();
+ctx.moveTo(75, 15);
+ctx.lineTo(75, 35);
+ctx.stroke();
+
+ctx.beginPath();
+ctx.moveTo(85+tol, 15);
+ctx.arc(75, 15, 10+tol, 0, Math.PI, true);
+ctx.arc(75, 35, 10+tol, Math.PI, 0, true);
+ctx.fill();
+
+_assertPixel(canvas, 17,6, 0,255,0,255, "17,6", "0,255,0,255");
+_assertPixel(canvas, 25,6, 0,255,0,255, "25,6", "0,255,0,255");
+_assertPixel(canvas, 32,6, 0,255,0,255, "32,6", "0,255,0,255");
+_assertPixel(canvas, 17,43, 0,255,0,255, "17,43", "0,255,0,255");
+_assertPixel(canvas, 25,43, 0,255,0,255, "25,43", "0,255,0,255");
+_assertPixel(canvas, 32,43, 0,255,0,255, "32,43", "0,255,0,255");
+
+_assertPixel(canvas, 67,6, 0,255,0,255, "67,6", "0,255,0,255");
+_assertPixel(canvas, 75,6, 0,255,0,255, "75,6", "0,255,0,255");
+_assertPixel(canvas, 82,6, 0,255,0,255, "82,6", "0,255,0,255");
+_assertPixel(canvas, 67,43, 0,255,0,255, "67,43", "0,255,0,255");
+_assertPixel(canvas, 75,43, 0,255,0,255, "75,43", "0,255,0,255");
+_assertPixel(canvas, 82,43, 0,255,0,255, "82,43", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.square.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.square.html
new file mode 100644 (file)
index 0000000..fbb9ceb
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.cap.square</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.cap.html">cap</a>.square</h1>
+<p class="desc">lineCap 'square' is rendered correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineCap.square">2d.lineCap.square</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineCap = 'square';
+ctx.lineWidth = 20;
+
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.fillRect(15, 5, 20, 40);
+ctx.beginPath();
+ctx.moveTo(25, 15);
+ctx.lineTo(25, 35);
+ctx.stroke();
+
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(75, 15);
+ctx.lineTo(75, 35);
+ctx.stroke();
+ctx.fillRect(65, 5, 20, 40);
+
+_assertPixel(canvas, 25,4, 0,255,0,255, "25,4", "0,255,0,255");
+_assertPixel(canvas, 25,5, 0,255,0,255, "25,5", "0,255,0,255");
+_assertPixel(canvas, 25,6, 0,255,0,255, "25,6", "0,255,0,255");
+_assertPixel(canvas, 25,44, 0,255,0,255, "25,44", "0,255,0,255");
+_assertPixel(canvas, 25,45, 0,255,0,255, "25,45", "0,255,0,255");
+_assertPixel(canvas, 25,46, 0,255,0,255, "25,46", "0,255,0,255");
+
+_assertPixel(canvas, 75,4, 0,255,0,255, "75,4", "0,255,0,255");
+_assertPixel(canvas, 75,5, 0,255,0,255, "75,5", "0,255,0,255");
+_assertPixel(canvas, 75,6, 0,255,0,255, "75,6", "0,255,0,255");
+_assertPixel(canvas, 75,44, 0,255,0,255, "75,44", "0,255,0,255");
+_assertPixel(canvas, 75,45, 0,255,0,255, "75,45", "0,255,0,255");
+_assertPixel(canvas, 75,46, 0,255,0,255, "75,46", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.valid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.valid.html
new file mode 100644 (file)
index 0000000..4f786bf
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.cap.valid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.cap.html">cap</a>.valid</h1>
+<p class="desc">Setting lineCap to valid values works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineCap.set">2d.lineCap.set</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineCap.get">2d.lineCap.get</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.lineCap = 'butt'
+_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+
+ctx.lineCap = 'round';
+_assertSame(ctx.lineCap, 'round', "ctx.lineCap", "'round'");
+
+ctx.lineCap = 'square';
+_assertSame(ctx.lineCap, 'square', "ctx.lineCap", "'square'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cross.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.cross.html
new file mode 100644 (file)
index 0000000..a3a130d
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.cross</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.cross</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 200;
+ctx.lineJoin = 'bevel';
+
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(110, 50);
+ctx.lineTo(110, 60);
+ctx.lineTo(100, 60);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.defaults.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.defaults.html
new file mode 100644 (file)
index 0000000..c1cb69e
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.defaults</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.defaults</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineWidth.default">2d.lineWidth.default</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineCap.default">2d.lineCap.default</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.default">2d.lineJoin.default</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.miterLimit.default">2d.miterLimit.default</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
+_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+_assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
+_assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.bevel.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.bevel.html
new file mode 100644 (file)
index 0000000..5c9145d
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.join.bevel</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.join.html">join</a>.bevel</h1>
+<p class="desc">lineJoin 'bevel' is rendered correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.common">2d.lineJoin.common</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.bevel">2d.lineJoin.bevel</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ctx.lineJoin = 'bevel';
+ctx.lineWidth = 20;
+
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+
+ctx.fillRect(10, 10, 20, 20);
+ctx.fillRect(20, 20, 20, 20);
+ctx.beginPath();
+ctx.moveTo(30, 20);
+ctx.lineTo(40-tol, 20);
+ctx.lineTo(30, 10+tol);
+ctx.fill();
+
+ctx.beginPath();
+ctx.moveTo(10, 20);
+ctx.lineTo(30, 20);
+ctx.lineTo(30, 40);
+ctx.stroke();
+
+
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+
+ctx.beginPath();
+ctx.moveTo(60, 20);
+ctx.lineTo(80, 20);
+ctx.lineTo(80, 40);
+ctx.stroke();
+
+ctx.fillRect(60, 10, 20, 20);
+ctx.fillRect(70, 20, 20, 20);
+ctx.beginPath();
+ctx.moveTo(80, 20);
+ctx.lineTo(90+tol, 20);
+ctx.lineTo(80, 10-tol);
+ctx.fill();
+
+_assertPixel(canvas, 34,16, 0,255,0,255, "34,16", "0,255,0,255");
+_assertPixel(canvas, 34,15, 0,255,0,255, "34,15", "0,255,0,255");
+_assertPixel(canvas, 35,15, 0,255,0,255, "35,15", "0,255,0,255");
+_assertPixel(canvas, 36,15, 0,255,0,255, "36,15", "0,255,0,255");
+_assertPixel(canvas, 36,14, 0,255,0,255, "36,14", "0,255,0,255");
+
+_assertPixel(canvas, 84,16, 0,255,0,255, "84,16", "0,255,0,255");
+_assertPixel(canvas, 84,15, 0,255,0,255, "84,15", "0,255,0,255");
+_assertPixel(canvas, 85,15, 0,255,0,255, "85,15", "0,255,0,255");
+_assertPixel(canvas, 86,15, 0,255,0,255, "86,15", "0,255,0,255");
+_assertPixel(canvas, 86,14, 0,255,0,255, "86,14", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.closed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.closed.html
new file mode 100644 (file)
index 0000000..6ca0346
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.join.closed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.join.html">join</a>.closed</h1>
+<p class="desc">Line joins are drawn at the corner of a closed rectangle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.joinclosed">2d.lineJoin.joinclosed</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineJoin = 'miter';
+ctx.lineWidth = 200;
+
+ctx.beginPath();
+ctx.moveTo(100, 50);
+ctx.lineTo(100, 1000);
+ctx.lineTo(1000, 1000);
+ctx.lineTo(1000, 50);
+ctx.closePath();
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.invalid.html
new file mode 100644 (file)
index 0000000..fc14bb7
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.join.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.join.html">join</a>.invalid</h1>
+<p class="desc">Setting lineJoin to invalid values is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.invalid">2d.lineJoin.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.lineJoin = 'bevel'
+_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+
+ctx.lineJoin = 'bevel';
+ctx.lineJoin = 'invalid';
+_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+
+ctx.lineJoin = 'bevel';
+ctx.lineJoin = 'ROUND';
+_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+
+ctx.lineJoin = 'bevel';
+ctx.lineJoin = 'round\0';
+_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+
+ctx.lineJoin = 'bevel';
+ctx.lineJoin = 'round ';
+_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+
+ctx.lineJoin = 'bevel';
+ctx.lineJoin = "";
+_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+
+ctx.lineJoin = 'bevel';
+ctx.lineJoin = 'butt';
+_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.miter.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.miter.html
new file mode 100644 (file)
index 0000000..494feb1
--- /dev/null
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.join.miter</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.join.html">join</a>.miter</h1>
+<p class="desc">lineJoin 'miter' is rendered correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miter">2d.lineJoin.miter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineJoin = 'miter';
+ctx.lineWidth = 20;
+
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+
+ctx.fillRect(10, 10, 30, 20);
+ctx.fillRect(20, 10, 20, 30);
+
+ctx.beginPath();
+ctx.moveTo(10, 20);
+ctx.lineTo(30, 20);
+ctx.lineTo(30, 40);
+ctx.stroke();
+
+
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+
+ctx.beginPath();
+ctx.moveTo(60, 20);
+ctx.lineTo(80, 20);
+ctx.lineTo(80, 40);
+ctx.stroke();
+
+ctx.fillRect(60, 10, 30, 20);
+ctx.fillRect(70, 10, 20, 30);
+
+_assertPixel(canvas, 38,12, 0,255,0,255, "38,12", "0,255,0,255");
+_assertPixel(canvas, 39,11, 0,255,0,255, "39,11", "0,255,0,255");
+_assertPixel(canvas, 40,10, 0,255,0,255, "40,10", "0,255,0,255");
+_assertPixel(canvas, 41,9, 0,255,0,255, "41,9", "0,255,0,255");
+_assertPixel(canvas, 42,8, 0,255,0,255, "42,8", "0,255,0,255");
+
+_assertPixel(canvas, 88,12, 0,255,0,255, "88,12", "0,255,0,255");
+_assertPixel(canvas, 89,11, 0,255,0,255, "89,11", "0,255,0,255");
+_assertPixel(canvas, 90,10, 0,255,0,255, "90,10", "0,255,0,255");
+_assertPixel(canvas, 91,9, 0,255,0,255, "91,9", "0,255,0,255");
+_assertPixel(canvas, 92,8, 0,255,0,255, "92,8", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.open.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.open.html
new file mode 100644 (file)
index 0000000..2927913
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.join.open</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.join.html">join</a>.open</h1>
+<p class="desc">Line joins are not drawn at the corner of an unclosed rectangle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.joins">2d.lineJoin.joins</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineJoin = 'miter';
+ctx.lineWidth = 200;
+
+ctx.beginPath();
+ctx.moveTo(100, 50);
+ctx.lineTo(100, 1000);
+ctx.lineTo(1000, 1000);
+ctx.lineTo(1000, 50);
+ctx.lineTo(100, 50);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.parallel.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.parallel.html
new file mode 100644 (file)
index 0000000..9ab173e
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.join.parallel</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.join.html">join</a>.parallel</h1>
+<p class="desc">Line joins are drawn at 180-degree joins</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.joins">2d.lineJoin.joins</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 300;
+ctx.lineJoin = 'round';
+ctx.beginPath();
+ctx.moveTo(-100, 25);
+ctx.lineTo(0, 25);
+ctx.lineTo(-100, 25);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.round.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.round.html
new file mode 100644 (file)
index 0000000..81f3216
--- /dev/null
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.join.round</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.join.html">join</a>.round</h1>
+<p class="desc">lineJoin 'round' is rendered correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.round">2d.lineJoin.round</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ctx.lineJoin = 'round';
+ctx.lineWidth = 20;
+
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+
+ctx.fillRect(10, 10, 20, 20);
+ctx.fillRect(20, 20, 20, 20);
+ctx.beginPath();
+ctx.moveTo(30, 20);
+ctx.arc(30, 20, 10-tol, 0, 2*Math.PI, true);
+ctx.fill();
+
+ctx.beginPath();
+ctx.moveTo(10, 20);
+ctx.lineTo(30, 20);
+ctx.lineTo(30, 40);
+ctx.stroke();
+
+
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+
+ctx.beginPath();
+ctx.moveTo(60, 20);
+ctx.lineTo(80, 20);
+ctx.lineTo(80, 40);
+ctx.stroke();
+
+ctx.fillRect(60, 10, 20, 20);
+ctx.fillRect(70, 20, 20, 20);
+ctx.beginPath();
+ctx.moveTo(80, 20);
+ctx.arc(80, 20, 10+tol, 0, 2*Math.PI, true);
+ctx.fill();
+
+_assertPixel(canvas, 36,14, 0,255,0,255, "36,14", "0,255,0,255");
+_assertPixel(canvas, 36,13, 0,255,0,255, "36,13", "0,255,0,255");
+_assertPixel(canvas, 37,13, 0,255,0,255, "37,13", "0,255,0,255");
+_assertPixel(canvas, 38,13, 0,255,0,255, "38,13", "0,255,0,255");
+_assertPixel(canvas, 38,12, 0,255,0,255, "38,12", "0,255,0,255");
+
+_assertPixel(canvas, 86,14, 0,255,0,255, "86,14", "0,255,0,255");
+_assertPixel(canvas, 86,13, 0,255,0,255, "86,13", "0,255,0,255");
+_assertPixel(canvas, 87,13, 0,255,0,255, "87,13", "0,255,0,255");
+_assertPixel(canvas, 88,13, 0,255,0,255, "88,13", "0,255,0,255");
+_assertPixel(canvas, 88,12, 0,255,0,255, "88,12", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.valid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.join.valid.html
new file mode 100644 (file)
index 0000000..c2657e7
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.join.valid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.join.html">join</a>.valid</h1>
+<p class="desc">Setting lineJoin to valid values works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.set">2d.lineJoin.set</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.get">2d.lineJoin.get</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.lineJoin = 'bevel'
+_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+
+ctx.lineJoin = 'round';
+_assertSame(ctx.lineJoin, 'round', "ctx.lineJoin", "'round'");
+
+ctx.lineJoin = 'miter';
+_assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.acute.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.acute.html
new file mode 100644 (file)
index 0000000..b505cef
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.miter.acute</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.miter.html">miter</a>.acute</h1>
+<p class="desc">Miter joins are drawn correctly with acute angles</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miterLimit">2d.lineJoin.miterLimit</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miter">2d.lineJoin.miter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 200;
+ctx.lineJoin = 'miter';
+
+ctx.strokeStyle = '#0f0';
+ctx.miterLimit = 2.614;
+ctx.beginPath();
+ctx.moveTo(100, 1000);
+ctx.lineTo(100, 100);
+ctx.lineTo(1000, 1000);
+ctx.stroke();
+
+ctx.strokeStyle = '#f00';
+ctx.miterLimit = 2.613;
+ctx.beginPath();
+ctx.moveTo(100, 1000);
+ctx.lineTo(100, 100);
+ctx.lineTo(1000, 1000);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.exceeded.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.exceeded.html
new file mode 100644 (file)
index 0000000..81a1477
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.miter.exceeded</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.miter.html">miter</a>.exceeded</h1>
+<p class="desc">Miter joins are not drawn when the miter limit is exceeded</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miterLimit">2d.lineJoin.miterLimit</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miter">2d.lineJoin.miter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 400;
+ctx.lineJoin = 'miter';
+
+ctx.strokeStyle = '#f00';
+ctx.miterLimit = 1.414;
+ctx.beginPath();
+ctx.moveTo(200, 1000);
+ctx.lineTo(200, 200);
+ctx.lineTo(1000, 201); // slightly non-right-angle to avoid being a special case
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.invalid.html
new file mode 100644 (file)
index 0000000..c6f2697
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.miter.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.miter.html">miter</a>.invalid</h1>
+<p class="desc">Setting miterLimit to invalid values is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.miterLimit.invalid">2d.miterLimit.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.miterLimit = 1.5;
+_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+
+ctx.miterLimit = 1.5;
+ctx.miterLimit = 0;
+_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+
+ctx.miterLimit = 1.5;
+ctx.miterLimit = -1;
+_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+
+ctx.miterLimit = 1.5;
+ctx.miterLimit = Infinity;
+_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+
+ctx.miterLimit = 1.5;
+ctx.miterLimit = -Infinity;
+_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+
+ctx.miterLimit = 1.5;
+ctx.miterLimit = NaN;
+_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.lineedge.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.lineedge.html
new file mode 100644 (file)
index 0000000..03bf5e8
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.miter.lineedge</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.miter.html">miter</a>.lineedge</h1>
+<p class="desc">Miter joins are not drawn when the miter limit is exceeded at the corners of a zero-height rectangle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miter">2d.lineJoin.miter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 200;
+ctx.lineJoin = 'miter';
+
+ctx.strokeStyle = '#f00';
+ctx.miterLimit = 1.414;
+ctx.beginPath();
+ctx.strokeRect(100, 25, 200, 0);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.obtuse.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.obtuse.html
new file mode 100644 (file)
index 0000000..ee7a62b
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.miter.obtuse</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.miter.html">miter</a>.obtuse</h1>
+<p class="desc">Miter joins are drawn correctly with obtuse angles</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miterLimit">2d.lineJoin.miterLimit</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miter">2d.lineJoin.miter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 1600;
+ctx.lineJoin = 'miter';
+
+ctx.strokeStyle = '#0f0';
+ctx.miterLimit = 1.083;
+ctx.beginPath();
+ctx.moveTo(800, 10000);
+ctx.lineTo(800, 300);
+ctx.lineTo(10000, -8900);
+ctx.stroke();
+
+ctx.strokeStyle = '#f00';
+ctx.miterLimit = 1.082;
+ctx.beginPath();
+ctx.moveTo(800, 10000);
+ctx.lineTo(800, 300);
+ctx.lineTo(10000, -8900);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.rightangle.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.rightangle.html
new file mode 100644 (file)
index 0000000..bf92f0d
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.miter.rightangle</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.miter.html">miter</a>.rightangle</h1>
+<p class="desc">Miter joins are not drawn when the miter limit is exceeded, on exact right angles</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miter">2d.lineJoin.miter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 400;
+ctx.lineJoin = 'miter';
+
+ctx.strokeStyle = '#f00';
+ctx.miterLimit = 1.414;
+ctx.beginPath();
+ctx.moveTo(200, 1000);
+ctx.lineTo(200, 200);
+ctx.lineTo(1000, 200);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.valid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.valid.html
new file mode 100644 (file)
index 0000000..62249b5
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.miter.valid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.miter.html">miter</a>.valid</h1>
+<p class="desc">Setting miterLimit to valid values works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.miterLimit.set">2d.miterLimit.set</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.miterLimit.get">2d.miterLimit.get</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.miterLimit = 1.5;
+_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+
+ctx.miterLimit = "1e1";
+_assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
+
+ctx.miterLimit = 1/1024;
+_assertSame(ctx.miterLimit, 1/1024, "ctx.miterLimit", "1/1024");
+
+ctx.miterLimit = 1000;
+_assertSame(ctx.miterLimit, 1000, "ctx.miterLimit", "1000");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.within.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.within.html
new file mode 100644 (file)
index 0000000..9bcdf0c
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.miter.within</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.miter.html">miter</a>.within</h1>
+<p class="desc">Miter joins are drawn when the miter limit is not quite exceeded</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineJoin.miter">2d.lineJoin.miter</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 400;
+ctx.lineJoin = 'miter';
+
+ctx.strokeStyle = '#0f0';
+ctx.miterLimit = 1.416;
+ctx.beginPath();
+ctx.moveTo(200, 1000);
+ctx.lineTo(200, 200);
+ctx.lineTo(1000, 201);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.union.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.union.html
new file mode 100644 (file)
index 0000000..dac9650
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.union</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.union</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 100;
+ctx.lineCap = 'round';
+
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 24);
+ctx.lineTo(100, 25);
+ctx.lineTo(0, 26);
+ctx.closePath();
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 25,1, 0,255,0,255, "25,1", "0,255,0,255");
+_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 25,1, 0,255,0,255, "25,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.basic.html
new file mode 100644 (file)
index 0000000..efc29bc
--- /dev/null
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.width.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.width.html">width</a>.basic</h1>
+<p class="desc">lineWidth determines the width of line strokes</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineWidth">2d.lineWidth</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<div id="log"></div>
+<script>
+var t = async_test(document.title, {timeout: 3000});
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 20;
+// Draw a green line over a red box, to check the line is not too small
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.fillRect(15, 15, 20, 20);
+ctx.beginPath();
+ctx.moveTo(25, 15);
+ctx.lineTo(25, 35);
+ctx.stroke();
+
+// Draw a green box over a red line, to check the line is not too large
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(75, 15);
+ctx.lineTo(75, 35);
+ctx.stroke();
+ctx.fillRect(65, 15, 20, 20);
+
+_assertPixel(canvas, 14,25, 0,255,0,255, "14,25", "0,255,0,255");
+_assertPixel(canvas, 15,25, 0,255,0,255, "15,25", "0,255,0,255");
+_assertPixel(canvas, 16,25, 0,255,0,255, "16,25", "0,255,0,255");
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 34,25, 0,255,0,255, "34,25", "0,255,0,255");
+_assertPixel(canvas, 35,25, 0,255,0,255, "35,25", "0,255,0,255");
+_assertPixel(canvas, 36,25, 0,255,0,255, "36,25", "0,255,0,255");
+
+_assertPixel(canvas, 64,25, 0,255,0,255, "64,25", "0,255,0,255");
+_assertPixel(canvas, 65,25, 0,255,0,255, "65,25", "0,255,0,255");
+_assertPixel(canvas, 66,25, 0,255,0,255, "66,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+_assertPixel(canvas, 84,25, 0,255,0,255, "84,25", "0,255,0,255");
+_assertPixel(canvas, 85,25, 0,255,0,255, "85,25", "0,255,0,255");
+_assertPixel(canvas, 86,25, 0,255,0,255, "86,25", "0,255,0,255");
+
+
+});
+setTimeout(function(){
+    t.step(function() {
+        assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+    });
+    t.done();
+}, 1500);
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.invalid.html
new file mode 100644 (file)
index 0000000..65b7bd7
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.width.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.width.html">width</a>.invalid</h1>
+<p class="desc">Setting lineWidth to invalid values is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineWidth.invalid">2d.lineWidth.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.lineWidth = 1.5;
+_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+
+ctx.lineWidth = 1.5;
+ctx.lineWidth = 0;
+_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+
+ctx.lineWidth = 1.5;
+ctx.lineWidth = -1;
+_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+
+ctx.lineWidth = 1.5;
+ctx.lineWidth = Infinity;
+_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+
+ctx.lineWidth = 1.5;
+ctx.lineWidth = -Infinity;
+_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+
+ctx.lineWidth = 1.5;
+ctx.lineWidth = NaN;
+_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.scaledefault.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.scaledefault.html
new file mode 100644 (file)
index 0000000..7a0fe39
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.width.scaledefault</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.width.html">width</a>.scaledefault</h1>
+<p class="desc">Default lineWidth strokes are affected by scale transformations</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineWidth">2d.lineWidth</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.scale(50, 50);
+ctx.strokeStyle = '#0f0';
+ctx.moveTo(0, 0.5);
+ctx.lineTo(2, 0.5);
+ctx.stroke();
+
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+_assertPixel(canvas, 50,5, 0,255,0,255, "50,5", "0,255,0,255");
+_assertPixel(canvas, 50,45, 0,255,0,255, "50,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.transformed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.transformed.html
new file mode 100644 (file)
index 0000000..0315cb8
--- /dev/null
@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.width.transformed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.width.html">width</a>.transformed</h1>
+<p class="desc">Line stroke widths are affected by scale transformations</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineWidth">2d.lineWidth</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<div id="log"></div>
+<script>
+var t = async_test(document.title, {timeout: 3000});
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 4;
+// Draw a green line over a red box, to check the line is not too small
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.fillRect(15, 15, 20, 20);
+ctx.save();
+ ctx.scale(5, 1);
+ ctx.beginPath();
+ ctx.moveTo(5, 15);
+ ctx.lineTo(5, 35);
+ ctx.stroke();
+ctx.restore();
+
+// Draw a green box over a red line, to check the line is not too large
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.save();
+ ctx.scale(-5, 1);
+ ctx.beginPath();
+ ctx.moveTo(-15, 15);
+ ctx.lineTo(-15, 35);
+ ctx.stroke();
+ctx.restore();
+ctx.fillRect(65, 15, 20, 20);
+
+_assertPixel(canvas, 14,25, 0,255,0,255, "14,25", "0,255,0,255");
+_assertPixel(canvas, 15,25, 0,255,0,255, "15,25", "0,255,0,255");
+_assertPixel(canvas, 16,25, 0,255,0,255, "16,25", "0,255,0,255");
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 34,25, 0,255,0,255, "34,25", "0,255,0,255");
+_assertPixel(canvas, 35,25, 0,255,0,255, "35,25", "0,255,0,255");
+_assertPixel(canvas, 36,25, 0,255,0,255, "36,25", "0,255,0,255");
+
+_assertPixel(canvas, 64,25, 0,255,0,255, "64,25", "0,255,0,255");
+_assertPixel(canvas, 65,25, 0,255,0,255, "65,25", "0,255,0,255");
+_assertPixel(canvas, 66,25, 0,255,0,255, "66,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+_assertPixel(canvas, 84,25, 0,255,0,255, "84,25", "0,255,0,255");
+_assertPixel(canvas, 85,25, 0,255,0,255, "85,25", "0,255,0,255");
+_assertPixel(canvas, 86,25, 0,255,0,255, "86,25", "0,255,0,255");
+
+
+});
+setTimeout(function(){
+    t.step(function() {
+        assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+    });
+    t.done();
+}, 1500);
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.valid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.line.width.valid.html
new file mode 100644 (file)
index 0000000..fb21d6b
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.line.width.valid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.line.html">line</a>.<a href="index.2d.line.width.html">width</a>.valid</h1>
+<p class="desc">Setting lineWidth to valid values works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineWidth.set">2d.lineWidth.set</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.lineWidth.get">2d.lineWidth.get</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.lineWidth = 1.5;
+_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+
+ctx.lineWidth = "1e1";
+_assertSame(ctx.lineWidth, 10, "ctx.lineWidth", "10");
+
+ctx.lineWidth = 1/1024;
+_assertSame(ctx.lineWidth, 1/1024, "ctx.lineWidth", "1/1024");
+
+ctx.lineWidth = 1000;
+_assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.1.html
new file mode 100644 (file)
index 0000000..1158e5a
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.angle.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.arc.angle.1</h1>
+<p class="desc">arc() draws pi/2 .. -pi anticlockwise correctly</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(100, 0);
+ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true);
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.2.html
new file mode 100644 (file)
index 0000000..35cd417
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.angle.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.arc.angle.2</h1>
+<p class="desc">arc() draws -3pi/2 .. -pi anticlockwise correctly</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(100, 0);
+ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true);
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.3.html
new file mode 100644 (file)
index 0000000..e56aa4b
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.angle.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.angle.html">angle</a>.3</h1>
+<p class="desc">arc() wraps angles mod 2pi when anticlockwise and end > start+2pi</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(100, 0);
+ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true);
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.4.html
new file mode 100644 (file)
index 0000000..b6c7524
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.angle.4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.arc.angle.4</h1>
+<p class="desc">arc() draws a full circle when clockwise and end > start+2pi</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(50, 25);
+ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false);
+ctx.fill();
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.5.html
new file mode 100644 (file)
index 0000000..76c35cf
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.angle.5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.angle.html">angle</a>.5</h1>
+<p class="desc">arc() wraps angles mod 2pi when clockwise and start > end+2pi</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(100, 0);
+ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false);
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.6.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.6.html
new file mode 100644 (file)
index 0000000..aff7f52
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.angle.6</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.arc.angle.6</h1>
+<p class="desc">arc() draws a full circle when anticlockwise and start > end+2pi</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(50, 25);
+ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true);
+ctx.fill();
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.default.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.default.html
new file mode 100644 (file)
index 0000000..7d3aa1b
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.default</h1>
+<p class="desc">arc() with missing last argument defaults to clockwise</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.omitted">2d.path.arc.omitted</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(100, 0);
+ctx.arc(100, 0, 150, -Math.PI, Math.PI/2);
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.empty.html
new file mode 100644 (file)
index 0000000..9602ec9
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.arc.empty</h1>
+<p class="desc">arc() with an empty path does not draw a straight line to the start point</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.end.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.end.html
new file mode 100644 (file)
index 0000000..60ed089
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.end</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.end</h1>
+<p class="desc">arc() adds the end point of the arc to the subpath</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(-100, 0);
+ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true);
+ctx.lineTo(100, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.negative.html
new file mode 100644 (file)
index 0000000..f52b12c
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.negative</h1>
+<p class="desc">arc() with negative radius throws INDEX_SIZE_ERR</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.negative">2d.path.arc.negative</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.arc(0, 0, -1, 0, 0, true);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.arc(0, 0, -1, 0, 0, true)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonempty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonempty.html
new file mode 100644 (file)
index 0000000..298c3ae
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.nonempty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.nonempty</h1>
+<p class="desc">arc() with a non-empty path does draw a straight line to the start point</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.nonempty">2d.path.arc.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonfinite.html
new file mode 100644 (file)
index 0000000..320836a
--- /dev/null
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.nonfinite</h1>
+<p class="desc">arc() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.arc(Infinity, 0, 50, 0, 2*Math.PI, true);
+ctx.arc(-Infinity, 0, 50, 0, 2*Math.PI, true);
+ctx.arc(NaN, 0, 50, 0, 2*Math.PI, true);
+ctx.arc(0, Infinity, 50, 0, 2*Math.PI, true);
+ctx.arc(0, -Infinity, 50, 0, 2*Math.PI, true);
+ctx.arc(0, NaN, 50, 0, 2*Math.PI, true);
+ctx.arc(0, 0, Infinity, 0, 2*Math.PI, true);
+ctx.arc(0, 0, -Infinity, 0, 2*Math.PI, true);
+ctx.arc(0, 0, NaN, 0, 2*Math.PI, true);
+ctx.arc(0, 0, 50, Infinity, 2*Math.PI, true);
+ctx.arc(0, 0, 50, -Infinity, 2*Math.PI, true);
+ctx.arc(0, 0, 50, NaN, 2*Math.PI, true);
+ctx.arc(0, 0, 50, 0, Infinity, true);
+ctx.arc(0, 0, 50, 0, -Infinity, true);
+ctx.arc(0, 0, 50, 0, NaN, true);
+ctx.arc(Infinity, Infinity, 50, 0, 2*Math.PI, true);
+ctx.arc(Infinity, Infinity, Infinity, 0, 2*Math.PI, true);
+ctx.arc(Infinity, Infinity, Infinity, Infinity, 2*Math.PI, true);
+ctx.arc(Infinity, Infinity, Infinity, Infinity, Infinity, true);
+ctx.arc(Infinity, Infinity, Infinity, 0, Infinity, true);
+ctx.arc(Infinity, Infinity, 50, Infinity, 2*Math.PI, true);
+ctx.arc(Infinity, Infinity, 50, Infinity, Infinity, true);
+ctx.arc(Infinity, Infinity, 50, 0, Infinity, true);
+ctx.arc(Infinity, 0, Infinity, 0, 2*Math.PI, true);
+ctx.arc(Infinity, 0, Infinity, Infinity, 2*Math.PI, true);
+ctx.arc(Infinity, 0, Infinity, Infinity, Infinity, true);
+ctx.arc(Infinity, 0, Infinity, 0, Infinity, true);
+ctx.arc(Infinity, 0, 50, Infinity, 2*Math.PI, true);
+ctx.arc(Infinity, 0, 50, Infinity, Infinity, true);
+ctx.arc(Infinity, 0, 50, 0, Infinity, true);
+ctx.arc(0, Infinity, Infinity, 0, 2*Math.PI, true);
+ctx.arc(0, Infinity, Infinity, Infinity, 2*Math.PI, true);
+ctx.arc(0, Infinity, Infinity, Infinity, Infinity, true);
+ctx.arc(0, Infinity, Infinity, 0, Infinity, true);
+ctx.arc(0, Infinity, 50, Infinity, 2*Math.PI, true);
+ctx.arc(0, Infinity, 50, Infinity, Infinity, true);
+ctx.arc(0, Infinity, 50, 0, Infinity, true);
+ctx.arc(0, 0, Infinity, Infinity, 2*Math.PI, true);
+ctx.arc(0, 0, Infinity, Infinity, Infinity, true);
+ctx.arc(0, 0, Infinity, 0, Infinity, true);
+ctx.arc(0, 0, 50, Infinity, Infinity, true);
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.1.html
new file mode 100644 (file)
index 0000000..bad2e5a
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.scale.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.arc.scale.1</h1>
+<p class="desc">Non-uniformly scaled arcs are the right shape</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.scale(2, 0.5);
+ctx.fillStyle = '#0f0';
+ctx.beginPath();
+ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
+ctx.fill();
+ctx.fillStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(-25, 50);
+ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
+ctx.moveTo(75, 50);
+ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
+ctx.moveTo(25, -25);
+ctx.arc(25, -25, 24, 0, 2*Math.PI, false);
+ctx.moveTo(25, 125);
+ctx.arc(25, 125, 24, 0, 2*Math.PI, false);
+ctx.fill();
+
+_assertPixel(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255");
+_assertPixel(canvas, 50,0, 0,255,0,255, "50,0", "0,255,0,255");
+_assertPixel(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255");
+_assertPixel(canvas, 0,25, 0,255,0,255, "0,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 99,25, 0,255,0,255, "99,25", "0,255,0,255");
+_assertPixel(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255");
+_assertPixel(canvas, 50,49, 0,255,0,255, "50,49", "0,255,0,255");
+_assertPixel(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.2.html
new file mode 100644 (file)
index 0000000..98f3d63
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.scale.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.scale.html">scale</a>.2</h1>
+<p class="desc">Highly scaled arcs are the right shape</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.scale(100, 100);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 1.2;
+ctx.beginPath();
+ctx.arc(0, 0, 0.6, 0, Math.PI/2, false);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.1.html
new file mode 100644 (file)
index 0000000..23f89a8
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.selfintersect.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.selfintersect.html">selfintersect</a>.1</h1>
+<p class="desc">arc() with lineWidth > 2*radius is drawn sensibly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 200;
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.arc(100, 50, 25, 0, -Math.PI/2, true);
+ctx.stroke();
+ctx.beginPath();
+ctx.arc(0, 0, 25, 0, -Math.PI/2, true);
+ctx.stroke();
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.2.html
new file mode 100644 (file)
index 0000000..ca1cc63
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.selfintersect.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.selfintersect.html">selfintersect</a>.2</h1>
+<p class="desc">arc() with lineWidth > 2*radius is drawn sensibly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 180;
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.arc(-50, 50, 25, 0, -Math.PI/2, true);
+ctx.stroke();
+ctx.beginPath();
+ctx.arc(100, 0, 25, 0, -Math.PI/2, true);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 90,10, 0,255,0,255, "90,10", "0,255,0,255");
+_assertPixel(canvas, 97,1, 0,255,0,255, "97,1", "0,255,0,255");
+_assertPixel(canvas, 97,2, 0,255,0,255, "97,2", "0,255,0,255");
+_assertPixel(canvas, 97,3, 0,255,0,255, "97,3", "0,255,0,255");
+_assertPixel(canvas, 2,48, 0,255,0,255, "2,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.1.html
new file mode 100644 (file)
index 0000000..a9a3099
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.shape.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.shape.html">shape</a>.1</h1>
+<p class="desc">arc() from 0 to pi does not draw anything in the wrong half</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.arc(50, 50, 50, 0, Math.PI, false);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 20,48, 0,255,0,255, "20,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.2.html
new file mode 100644 (file)
index 0000000..ab7c76c
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.shape.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.shape.html">shape</a>.2</h1>
+<p class="desc">arc() from 0 to pi draws stuff in the right half</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 100;
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.arc(50, 50, 50, 0, Math.PI, true);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 20,48, 0,255,0,255, "20,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.3.html
new file mode 100644 (file)
index 0000000..c66c7c2
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.shape.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.shape.html">shape</a>.3</h1>
+<p class="desc">arc() from 0 to -pi/2 does not draw anything in the wrong quadrant</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 100;
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.arc(0, 50, 50, 0, -Math.PI/2, false);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.4.html
new file mode 100644 (file)
index 0000000..8a55f2b
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.shape.4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.shape.html">shape</a>.4</h1>
+<p class="desc">arc() from 0 to -pi/2 draws stuff in the right quadrant</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 150;
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.arc(-50, 50, 100, 0, -Math.PI/2, true);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.5.html
new file mode 100644 (file)
index 0000000..a16a050
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.shape.5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.arc.shape.5</h1>
+<p class="desc">arc() from 0 to 5pi does not draw crazy things</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 200;
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.arc(300, 0, 100, 0, 5*Math.PI, false);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.1.html
new file mode 100644 (file)
index 0000000..f82fdca
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.twopie.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.twopie.html">twopie</a>.1</h1>
+<p class="desc">arc() draws nothing when end = start + 2pi-e and anticlockwise</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.beginPath();
+ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true);
+ctx.stroke();
+_assertPixel(canvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.2.html
new file mode 100644 (file)
index 0000000..700e3f9
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.twopie.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.twopie.html">twopie</a>.2</h1>
+<p class="desc">arc() draws a full circle when end = start + 2pi-e and clockwise</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 100;
+ctx.beginPath();
+ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false);
+ctx.stroke();
+_assertPixel(canvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.3.html
new file mode 100644 (file)
index 0000000..ef749b6
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.twopie.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.twopie.html">twopie</a>.3</h1>
+<p class="desc">arc() draws a full circle when end = start + 2pi+e and anticlockwise</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 100;
+ctx.beginPath();
+ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true);
+ctx.stroke();
+_assertPixel(canvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.4.html
new file mode 100644 (file)
index 0000000..516edfb
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.twopie.4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.twopie.html">twopie</a>.4</h1>
+<p class="desc">arc() draws nothing when end = start + 2pi+e and clockwise</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 100;
+ctx.beginPath();
+ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false);
+ctx.stroke();
+_assertPixel(canvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.1.html
new file mode 100644 (file)
index 0000000..01b0e7a
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.zero.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.zero.html">zero</a>.1</h1>
+<p class="desc">arc() draws nothing when startAngle = endAngle and anticlockwise</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.beginPath();
+ctx.arc(50, 25, 50, 0, 0, true);
+ctx.stroke();
+_assertPixel(canvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.2.html
new file mode 100644 (file)
index 0000000..0b0bcde
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.zero.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.<a href="index.2d.path.arc.zero.html">zero</a>.2</h1>
+<p class="desc">arc() draws nothing when startAngle = endAngle and clockwise</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.draw">2d.path.arc.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.beginPath();
+ctx.arc(50, 25, 50, 0, 0, false);
+ctx.stroke();
+_assertPixel(canvas, 50,20, 0,255,0,255, "50,20", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zeroradius.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zeroradius.html
new file mode 100644 (file)
index 0000000..36beae2
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arc.zeroradius</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arc.html">arc</a>.zeroradius</h1>
+<p class="desc">arc() with zero radius draws a line to the start point</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arc.zero">2d.path.arc.zero</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00'
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arc(200, 25, 0, 0, Math.PI, true);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.1.html
new file mode 100644 (file)
index 0000000..940f1b6
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.coincide.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.coincide.html">coincide</a>.1</h1>
+<p class="desc">arcTo() has no effect if P0 = P1</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.coincide.01">2d.path.arcTo.coincide.01</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arcTo(0, 25, 50, 1000, 1);
+ctx.lineTo(100, 25);
+ctx.stroke();
+
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(50, 25);
+ctx.arcTo(50, 25, 100, 25, 1);
+ctx.stroke();
+
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.2.html
new file mode 100644 (file)
index 0000000..c6821d9
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.coincide.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.coincide.html">coincide</a>.2</h1>
+<p class="desc">arcTo() draws a straight line to P1 if P1 = P2</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.coincide.12">2d.path.arcTo.coincide.12</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arcTo(100, 25, 100, 25, 1);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.1.html
new file mode 100644 (file)
index 0000000..37ba46b
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.collinear.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.collinear.html">collinear</a>.1</h1>
+<p class="desc">arcTo() with all points on a line, and P1 between P0/P2, draws a straight line to P1</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.collinear">2d.path.arcTo.collinear</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arcTo(100, 25, 200, 25, 1);
+ctx.stroke();
+
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(-100, 25);
+ctx.arcTo(0, 25, 100, 25, 1);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.2.html
new file mode 100644 (file)
index 0000000..fa80d21
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.collinear.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.collinear.html">collinear</a>.2</h1>
+<p class="desc">arcTo() with all points on a line, and P2 between P0/P1, draws a straight line to P1</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.collinear">2d.path.arcTo.collinear</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arcTo(100, 25, 10, 25, 1);
+ctx.stroke();
+
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(100, 25);
+ctx.arcTo(200, 25, 110, 25, 1);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.3.html
new file mode 100644 (file)
index 0000000..09778af
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.collinear.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.collinear.html">collinear</a>.3</h1>
+<p class="desc">arcTo() with all points on a line, and P0 between P1/P2, draws a straight line to P1</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.collinear">2d.path.arcTo.collinear</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arcTo(100, 25, -100, 25, 1);
+ctx.stroke();
+
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(100, 25);
+ctx.arcTo(200, 25, 0, 25, 1);
+ctx.stroke();
+
+ctx.beginPath();
+ctx.moveTo(-100, 25);
+ctx.arcTo(0, 25, -200, 25, 1);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.1.html
new file mode 100644 (file)
index 0000000..b6dc580
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.ensuresubpath.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.ensuresubpath.html">ensuresubpath</a>.1</h1>
+<p class="desc">If there is no subpath, the first control point is added (and nothing is drawn up to it)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.empty">2d.path.arcTo.empty</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.ensure">2d.path.ensure</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.arcTo(100, 50, 200, 50, 0.1);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.2.html
new file mode 100644 (file)
index 0000000..e51f2d9
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.ensuresubpath.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.ensuresubpath.html">ensuresubpath</a>.2</h1>
+<p class="desc">If there is no subpath, the first control point is added</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.empty">2d.path.arcTo.empty</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.ensure">2d.path.ensure</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing
+ctx.lineTo(100, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.negative.html
new file mode 100644 (file)
index 0000000..7fbfd3d
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.negative</h1>
+<p class="desc">arcTo() with negative radius throws an exception</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.negative">2d.path.arcTo.negative</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.arcTo(0, 0, 0, 0, -1);
+} catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) _fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INDEX_SIZE_ERR: ctx.arcTo(0, 0, 0, 0, -1)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.nonfinite.html
new file mode 100644 (file)
index 0000000..9dfceb1
--- /dev/null
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.nonfinite</h1>
+<p class="desc">arcTo() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.arcTo(Infinity, 50, 0, 50, 0);
+ctx.arcTo(-Infinity, 50, 0, 50, 0);
+ctx.arcTo(NaN, 50, 0, 50, 0);
+ctx.arcTo(0, Infinity, 0, 50, 0);
+ctx.arcTo(0, -Infinity, 0, 50, 0);
+ctx.arcTo(0, NaN, 0, 50, 0);
+ctx.arcTo(0, 50, Infinity, 50, 0);
+ctx.arcTo(0, 50, -Infinity, 50, 0);
+ctx.arcTo(0, 50, NaN, 50, 0);
+ctx.arcTo(0, 50, 0, Infinity, 0);
+ctx.arcTo(0, 50, 0, -Infinity, 0);
+ctx.arcTo(0, 50, 0, NaN, 0);
+ctx.arcTo(0, 50, 0, 50, Infinity);
+ctx.arcTo(0, 50, 0, 50, -Infinity);
+ctx.arcTo(0, 50, 0, 50, NaN);
+ctx.arcTo(Infinity, Infinity, 0, 50, 0);
+ctx.arcTo(Infinity, Infinity, Infinity, 50, 0);
+ctx.arcTo(Infinity, Infinity, Infinity, Infinity, 0);
+ctx.arcTo(Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.arcTo(Infinity, Infinity, Infinity, 50, Infinity);
+ctx.arcTo(Infinity, Infinity, 0, Infinity, 0);
+ctx.arcTo(Infinity, Infinity, 0, Infinity, Infinity);
+ctx.arcTo(Infinity, Infinity, 0, 50, Infinity);
+ctx.arcTo(Infinity, 50, Infinity, 50, 0);
+ctx.arcTo(Infinity, 50, Infinity, Infinity, 0);
+ctx.arcTo(Infinity, 50, Infinity, Infinity, Infinity);
+ctx.arcTo(Infinity, 50, Infinity, 50, Infinity);
+ctx.arcTo(Infinity, 50, 0, Infinity, 0);
+ctx.arcTo(Infinity, 50, 0, Infinity, Infinity);
+ctx.arcTo(Infinity, 50, 0, 50, Infinity);
+ctx.arcTo(0, Infinity, Infinity, 50, 0);
+ctx.arcTo(0, Infinity, Infinity, Infinity, 0);
+ctx.arcTo(0, Infinity, Infinity, Infinity, Infinity);
+ctx.arcTo(0, Infinity, Infinity, 50, Infinity);
+ctx.arcTo(0, Infinity, 0, Infinity, 0);
+ctx.arcTo(0, Infinity, 0, Infinity, Infinity);
+ctx.arcTo(0, Infinity, 0, 50, Infinity);
+ctx.arcTo(0, 50, Infinity, Infinity, 0);
+ctx.arcTo(0, 50, Infinity, Infinity, Infinity);
+ctx.arcTo(0, 50, Infinity, 50, Infinity);
+ctx.arcTo(0, 50, 0, Infinity, Infinity);
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.scale.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.scale.html
new file mode 100644 (file)
index 0000000..c7e6684
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.scale</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.scale</h1>
+<p class="desc">arcTo scales the curve, not just the control points</p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 50);
+ctx.translate(100, 0);
+ctx.scale(0.1, 1);
+ctx.arcTo(50, 50, 50, 0, 50);
+ctx.lineTo(-1000, 0);
+ctx.fill();
+
+_assertPixel(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255");
+_assertPixel(canvas, 50,0, 0,255,0,255, "50,0", "0,255,0,255");
+_assertPixel(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255");
+_assertPixel(canvas, 0,25, 0,255,0,255, "0,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 99,25, 0,255,0,255, "99,25", "0,255,0,255");
+_assertPixel(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255");
+_assertPixel(canvas, 50,49, 0,255,0,255, "50,49", "0,255,0,255");
+_assertPixel(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve1.html
new file mode 100644 (file)
index 0000000..b845b68
--- /dev/null
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.shape.curve1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.arcTo.shape.curve1</h1>
+<p class="desc">arcTo() curves in the right kind of shape</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var tol = 1.5; // tolerance to avoid antialiasing artifacts
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 10;
+ctx.beginPath();
+ctx.moveTo(10, 25);
+ctx.arcTo(75, 25, 75, 60, 20);
+ctx.stroke();
+
+ctx.fillStyle = '#0f0';
+ctx.beginPath();
+ctx.rect(10, 20, 45, 10);
+ctx.moveTo(80, 45);
+ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true);
+ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false);
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 55,19, 0,255,0,255, "55,19", "0,255,0,255");
+_assertPixel(canvas, 55,20, 0,255,0,255, "55,20", "0,255,0,255");
+_assertPixel(canvas, 55,21, 0,255,0,255, "55,21", "0,255,0,255");
+_assertPixel(canvas, 64,22, 0,255,0,255, "64,22", "0,255,0,255");
+_assertPixel(canvas, 65,21, 0,255,0,255, "65,21", "0,255,0,255");
+_assertPixel(canvas, 72,28, 0,255,0,255, "72,28", "0,255,0,255");
+_assertPixel(canvas, 73,27, 0,255,0,255, "73,27", "0,255,0,255");
+_assertPixel(canvas, 78,36, 0,255,0,255, "78,36", "0,255,0,255");
+_assertPixel(canvas, 79,35, 0,255,0,255, "79,35", "0,255,0,255");
+_assertPixel(canvas, 80,44, 0,255,0,255, "80,44", "0,255,0,255");
+_assertPixel(canvas, 80,45, 0,255,0,255, "80,45", "0,255,0,255");
+_assertPixel(canvas, 80,46, 0,255,0,255, "80,46", "0,255,0,255");
+_assertPixel(canvas, 65,45, 0,255,0,255, "65,45", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve2.html
new file mode 100644 (file)
index 0000000..c634597
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.shape.curve2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.arcTo.shape.curve2</h1>
+<p class="desc">arcTo() curves in the right kind of shape</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var tol = 1.5; // tolerance to avoid antialiasing artifacts
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#f00';
+ctx.beginPath();
+ctx.rect(10, 20, 45, 10);
+ctx.moveTo(80, 45);
+ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true);
+ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false);
+ctx.fill();
+
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 10;
+ctx.beginPath();
+ctx.moveTo(10, 25);
+ctx.arcTo(75, 25, 75, 60, 20);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 55,19, 0,255,0,255, "55,19", "0,255,0,255");
+_assertPixel(canvas, 55,20, 0,255,0,255, "55,20", "0,255,0,255");
+_assertPixel(canvas, 55,21, 0,255,0,255, "55,21", "0,255,0,255");
+_assertPixel(canvas, 64,22, 0,255,0,255, "64,22", "0,255,0,255");
+_assertPixel(canvas, 65,21, 0,255,0,255, "65,21", "0,255,0,255");
+_assertPixel(canvas, 72,28, 0,255,0,255, "72,28", "0,255,0,255");
+_assertPixel(canvas, 73,27, 0,255,0,255, "73,27", "0,255,0,255");
+_assertPixel(canvas, 78,36, 0,255,0,255, "78,36", "0,255,0,255");
+_assertPixel(canvas, 79,35, 0,255,0,255, "79,35", "0,255,0,255");
+_assertPixel(canvas, 80,44, 0,255,0,255, "80,44", "0,255,0,255");
+_assertPixel(canvas, 80,45, 0,255,0,255, "80,45", "0,255,0,255");
+_assertPixel(canvas, 80,46, 0,255,0,255, "80,46", "0,255,0,255");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.end.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.end.html
new file mode 100644 (file)
index 0000000..3a8d21f
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.shape.end</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.shape.html">shape</a>.end</h1>
+<p class="desc">arcTo() does not draw anything from P1 to P2</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.shape">2d.path.arcTo.shape</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.moveTo(-100, -100);
+ctx.arcTo(-100, 25, 200, 25, 10);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.start.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.start.html
new file mode 100644 (file)
index 0000000..131c0ee
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.shape.start</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.shape.html">shape</a>.start</h1>
+<p class="desc">arcTo() draws a straight line from P0 to P1</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.shape">2d.path.arcTo.shape</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arcTo(200, 25, 200, 50, 10);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.transformation.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.transformation.html
new file mode 100644 (file)
index 0000000..d9e4470
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.transformation</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.transformation</h1>
+<p class="desc">arcTo joins up to the last subpath point correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 50);
+ctx.translate(100, 0);
+ctx.arcTo(50, 50, 50, 0, 50);
+ctx.lineTo(-100, 0);
+ctx.fill();
+
+_assertPixel(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255");
+_assertPixel(canvas, 50,0, 0,255,0,255, "50,0", "0,255,0,255");
+_assertPixel(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255");
+_assertPixel(canvas, 0,25, 0,255,0,255, "0,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 99,25, 0,255,0,255, "99,25", "0,255,0,255");
+_assertPixel(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255");
+_assertPixel(canvas, 50,49, 0,255,0,255, "50,49", "0,255,0,255");
+_assertPixel(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.1.html
new file mode 100644 (file)
index 0000000..83ea09b
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.zero.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.zero.html">zero</a>.1</h1>
+<p class="desc">arcTo() with zero radius draws a straight line from P0 to P1</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.zeroradius">2d.path.arcTo.zeroradius</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arcTo(100, 25, 100, 100, 0);
+ctx.stroke();
+
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(0, -25);
+ctx.arcTo(50, -25, 50, 50, 0);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.2.html
new file mode 100644 (file)
index 0000000..819c439
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.arcTo.zero.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.arcTo.html">arcTo</a>.<a href="index.2d.path.arcTo.zero.html">zero</a>.2</h1>
+<p class="desc">arcTo() with zero radius draws a straight line from P0 to P1, even when all points are collinear</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.arcTo.zeroradius">2d.path.arcTo.zeroradius</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.lineWidth = 50;
+
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.arcTo(100, 25, -100, 25, 0);
+ctx.stroke();
+
+ctx.strokeStyle = '#f00';
+ctx.beginPath();
+ctx.moveTo(100, 25);
+ctx.arcTo(200, 25, 50, 25, 0);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.beginPath.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.beginPath.html
new file mode 100644 (file)
index 0000000..a2b6824
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.beginPath</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.beginPath</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.beginPath">2d.path.beginPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.rect(0, 0, 100, 50);
+ctx.beginPath();
+ctx.fillStyle = '#f00';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.basic.html
new file mode 100644 (file)
index 0000000..9e243d8
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.bezierCurveTo.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.bezierCurveTo.html">bezierCurveTo</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.bezier.nonempty">2d.path.bezier.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.bezierCurveTo(100, 25, 100, 25, 100, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.1.html
new file mode 100644 (file)
index 0000000..070acce
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.bezierCurveTo.ensuresubpath.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.bezierCurveTo.html">bezierCurveTo</a>.<a href="index.2d.path.bezierCurveTo.ensuresubpath.html">ensuresubpath</a>.1</h1>
+<p class="desc">If there is no subpath, the first control point is added (and nothing is drawn up to it)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.bezier.empty">2d.path.bezier.empty</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.ensure">2d.path.ensure</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.bezierCurveTo(100, 50, 200, 50, 200, 50);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.2.html
new file mode 100644 (file)
index 0000000..9c4a451
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.bezierCurveTo.ensuresubpath.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.bezierCurveTo.html">bezierCurveTo</a>.<a href="index.2d.path.bezierCurveTo.ensuresubpath.html">ensuresubpath</a>.2</h1>
+<p class="desc">If there is no subpath, the first control point is added</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.bezier.empty">2d.path.bezier.empty</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.ensure">2d.path.ensure</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.bezierCurveTo(0, 25, 100, 25, 100, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.nonfinite.html
new file mode 100644 (file)
index 0000000..fd23a9f
--- /dev/null
@@ -0,0 +1,111 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.bezierCurveTo.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.bezierCurveTo.html">bezierCurveTo</a>.nonfinite</h1>
+<p class="desc">bezierCurveTo() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, 50);
+ctx.bezierCurveTo(-Infinity, 50, 0, 50, 0, 50);
+ctx.bezierCurveTo(NaN, 50, 0, 50, 0, 50);
+ctx.bezierCurveTo(0, Infinity, 0, 50, 0, 50);
+ctx.bezierCurveTo(0, -Infinity, 0, 50, 0, 50);
+ctx.bezierCurveTo(0, NaN, 0, 50, 0, 50);
+ctx.bezierCurveTo(0, 50, Infinity, 50, 0, 50);
+ctx.bezierCurveTo(0, 50, -Infinity, 50, 0, 50);
+ctx.bezierCurveTo(0, 50, NaN, 50, 0, 50);
+ctx.bezierCurveTo(0, 50, 0, Infinity, 0, 50);
+ctx.bezierCurveTo(0, 50, 0, -Infinity, 0, 50);
+ctx.bezierCurveTo(0, 50, 0, NaN, 0, 50);
+ctx.bezierCurveTo(0, 50, 0, 50, Infinity, 50);
+ctx.bezierCurveTo(0, 50, 0, 50, -Infinity, 50);
+ctx.bezierCurveTo(0, 50, 0, 50, NaN, 50);
+ctx.bezierCurveTo(0, 50, 0, 50, 0, Infinity);
+ctx.bezierCurveTo(0, 50, 0, 50, 0, -Infinity);
+ctx.bezierCurveTo(0, 50, 0, 50, 0, NaN);
+ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, 50);
+ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, 50);
+ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, 50);
+ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, 50);
+ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, Infinity);
+ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, Infinity);
+ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, 50);
+ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, 50);
+ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, 50);
+ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, Infinity);
+ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, Infinity);
+ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, 50);
+ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, 50);
+ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, 50);
+ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, Infinity);
+ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, 50);
+ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, Infinity);
+ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, Infinity);
+ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, 50);
+ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, 50);
+ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, Infinity);
+ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, Infinity);
+ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, 50);
+ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, Infinity);
+ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, Infinity);
+ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, 50);
+ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, 50);
+ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, 50);
+ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, Infinity);
+ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, 50);
+ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, Infinity);
+ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, Infinity);
+ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, 50);
+ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, 50);
+ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, Infinity);
+ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, 50);
+ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, Infinity);
+ctx.bezierCurveTo(0, Infinity, 0, 50, 0, Infinity);
+ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, 50);
+ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, 50);
+ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, Infinity);
+ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, Infinity);
+ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, 50);
+ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, Infinity);
+ctx.bezierCurveTo(0, 50, Infinity, 50, 0, Infinity);
+ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, 50);
+ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, Infinity);
+ctx.bezierCurveTo(0, 50, 0, Infinity, 0, Infinity);
+ctx.bezierCurveTo(0, 50, 0, 50, Infinity, Infinity);
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.scaled.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.scaled.html
new file mode 100644 (file)
index 0000000..6249543
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.bezierCurveTo.scaled</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.bezierCurveTo.html">bezierCurveTo</a>.scaled</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.bezier.nonempty">2d.path.bezier.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.scale(1000, 1000);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 0.055;
+ctx.beginPath();
+ctx.moveTo(-2, 3.1);
+ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.shape.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.shape.html
new file mode 100644 (file)
index 0000000..1ee5094
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.bezierCurveTo.shape</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.bezierCurveTo.html">bezierCurveTo</a>.shape</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.bezier.nonempty">2d.path.bezier.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 55;
+ctx.beginPath();
+ctx.moveTo(-2000, 3100);
+ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.1.html
new file mode 100644 (file)
index 0000000..5ce6fbb
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.clip.basic.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.clip.html">clip</a>.<a href="index.2d.path.clip.basic.html">basic</a>.1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.clip.basic">2d.path.clip.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.rect(0, 0, 100, 50);
+ctx.clip();
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.2.html
new file mode 100644 (file)
index 0000000..4fdc659
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.clip.basic.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.clip.html">clip</a>.<a href="index.2d.path.clip.basic.html">basic</a>.2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.clip.basic">2d.path.clip.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.rect(-100, 0, 100, 50);
+ctx.clip();
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.empty.html
new file mode 100644 (file)
index 0000000..f5e6067
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.clip.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.clip.html">clip</a>.empty</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.clip.basic">2d.path.clip.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.clip();
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.intersect.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.intersect.html
new file mode 100644 (file)
index 0000000..7be131a
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.clip.intersect</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.clip.html">clip</a>.intersect</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.clip.basic">2d.path.clip.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.rect(0, 0, 50, 50);
+ctx.clip();
+ctx.beginPath();
+ctx.rect(50, 0, 50, 50)
+ctx.clip();
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.unaffected.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.unaffected.html
new file mode 100644 (file)
index 0000000..e66cacb
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.clip.unaffected</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.clip.html">clip</a>.unaffected</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.clip.closed">2d.path.clip.closed</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+
+ctx.beginPath();
+ctx.moveTo(0, 0);
+ctx.lineTo(0, 50);
+ctx.lineTo(100, 50);
+ctx.lineTo(100, 0);
+ctx.clip();
+
+ctx.lineTo(0, 0);
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.1.html
new file mode 100644 (file)
index 0000000..7f5c682
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.clip.winding.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.clip.html">clip</a>.<a href="index.2d.path.clip.winding.html">winding</a>.1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.clip.basic">2d.path.clip.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.moveTo(-10, -10);
+ctx.lineTo(110, -10);
+ctx.lineTo(110, 60);
+ctx.lineTo(-10, 60);
+ctx.lineTo(-10, -10);
+ctx.lineTo(0, 0);
+ctx.lineTo(0, 50);
+ctx.lineTo(100, 50);
+ctx.lineTo(100, 0);
+ctx.clip();
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.2.html
new file mode 100644 (file)
index 0000000..1a66c2e
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.clip.winding.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.clip.html">clip</a>.<a href="index.2d.path.clip.winding.html">winding</a>.2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.clip.basic">2d.path.clip.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.moveTo(-10, -10);
+ctx.lineTo(110, -10);
+ctx.lineTo(110, 60);
+ctx.lineTo(-10, 60);
+ctx.lineTo(-10, -10);
+ctx.clip();
+
+ctx.beginPath();
+ctx.moveTo(0, 0);
+ctx.lineTo(0, 50);
+ctx.lineTo(100, 50);
+ctx.lineTo(100, 0);
+ctx.lineTo(0, 0);
+ctx.clip();
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.empty.html
new file mode 100644 (file)
index 0000000..905f4f2
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.closePath.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.closePath.html">closePath</a>.empty</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.closePath.empty">2d.path.closePath.empty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.closePath();
+ctx.fillStyle = '#f00';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.newline.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.newline.html
new file mode 100644 (file)
index 0000000..e86a00d
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.closePath.newline</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.closePath.html">closePath</a>.newline</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.closePath.nonempty">2d.path.closePath.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.moveTo(-100, 25);
+ctx.lineTo(-100, -100);
+ctx.lineTo(200, -100);
+ctx.lineTo(200, 25);
+ctx.closePath();
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.nextpoint.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.nextpoint.html
new file mode 100644 (file)
index 0000000..003a134
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.closePath.nextpoint</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.closePath.html">closePath</a>.nextpoint</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.closePath.nonempty">2d.path.closePath.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.moveTo(-100, 25);
+ctx.lineTo(-100, -1000);
+ctx.closePath();
+ctx.lineTo(1000, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.basic.html
new file mode 100644 (file)
index 0000000..b9810e4
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.fill.closed.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.fill.html">fill</a>.<a href="index.2d.path.fill.closed.html">closed</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.fill.closed">2d.path.fill.closed</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.unaffected.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.unaffected.html
new file mode 100644 (file)
index 0000000..b960cf3
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.fill.closed.unaffected</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.fill.html">fill</a>.<a href="index.2d.path.fill.closed.html">closed</a>.unaffected</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.fill.closed">2d.path.fill.closed</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#00f';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.lineTo(100, 50);
+ctx.fillStyle = '#f00';
+ctx.fill();
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(canvas, 90,10, 0,255,0,255, "90,10", "0,255,0,255");
+_assertPixel(canvas, 10,40, 0,255,0,255, "10,40", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.overlap.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.overlap.html
new file mode 100644 (file)
index 0000000..1478862
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.fill.overlap</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.fill.html">fill</a>.overlap</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.fill.basic">2d.path.fill.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.path.fill.overlap.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.rect(0, 0, 100, 50);
+ctx.closePath();
+ctx.rect(10, 10, 80, 30);
+ctx.fill();
+
+_assertPixelApprox(canvas, 50,25, 0,127,0,255, "50,25", "0,127,0,255", 1);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.overlap.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.overlap.png
new file mode 100644 (file)
index 0000000..0bd6828
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.overlap.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.add.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.add.html
new file mode 100644 (file)
index 0000000..6442261
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.fill.winding.add</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.fill.html">fill</a>.<a href="index.2d.path.fill.winding.html">winding</a>.add</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.fill.basic">2d.path.fill.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.moveTo(-10, -10);
+ctx.lineTo(110, -10);
+ctx.lineTo(110, 60);
+ctx.lineTo(-10, 60);
+ctx.lineTo(-10, -10);
+ctx.lineTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.1.html
new file mode 100644 (file)
index 0000000..040c3fc
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.fill.winding.subtract.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.fill.html">fill</a>.<a href="index.2d.path.fill.winding.html">winding</a>.<a href="index.2d.path.fill.winding.subtract.html">subtract</a>.1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.fill.basic">2d.path.fill.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#f00';
+ctx.moveTo(-10, -10);
+ctx.lineTo(110, -10);
+ctx.lineTo(110, 60);
+ctx.lineTo(-10, 60);
+ctx.lineTo(-10, -10);
+ctx.lineTo(0, 0);
+ctx.lineTo(0, 50);
+ctx.lineTo(100, 50);
+ctx.lineTo(100, 0);
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.2.html
new file mode 100644 (file)
index 0000000..ce97f17
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.fill.winding.subtract.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.fill.html">fill</a>.<a href="index.2d.path.fill.winding.html">winding</a>.<a href="index.2d.path.fill.winding.subtract.html">subtract</a>.2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.fill.basic">2d.path.fill.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#f00';
+ctx.moveTo(-10, -10);
+ctx.lineTo(110, -10);
+ctx.lineTo(110, 60);
+ctx.lineTo(-10, 60);
+ctx.moveTo(0, 0);
+ctx.lineTo(0, 50);
+ctx.lineTo(100, 50);
+ctx.lineTo(100, 0);
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.3.html
new file mode 100644 (file)
index 0000000..d050698
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.fill.winding.subtract.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.fill.html">fill</a>.<a href="index.2d.path.fill.winding.html">winding</a>.<a href="index.2d.path.fill.winding.subtract.html">subtract</a>.3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.fill.basic">2d.path.fill.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.moveTo(-10, -10);
+ctx.lineTo(110, -10);
+ctx.lineTo(110, 60);
+ctx.lineTo(-10, 60);
+ctx.lineTo(-10, -10);
+ctx.lineTo(-20, -20);
+ctx.lineTo(120, -20);
+ctx.lineTo(120, 70);
+ctx.lineTo(-20, 70);
+ctx.lineTo(-20, -20);
+ctx.lineTo(0, 0);
+ctx.lineTo(0, 50);
+ctx.lineTo(100, 50);
+ctx.lineTo(100, 0);
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.initial.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.initial.html
new file mode 100644 (file)
index 0000000..8ed1aad
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.initial</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.initial</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.initial">2d.path.initial</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.closePath();
+ctx.fillStyle = '#f00';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.arc.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.arc.html
new file mode 100644 (file)
index 0000000..7713dee
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.arc</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.arc</h1>
+<p class="desc">isPointInPath() works on arcs</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.arc(50, 25, 10, 0, Math.PI, false);
+_assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
+_assertSame(ctx.isPointInPath(50, 20), false, "ctx.isPointInPath(50, 20)", "false");
+_assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
+_assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
+_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+_assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.1.html
new file mode 100644 (file)
index 0000000..deece8a
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.basic.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.<a href="index.2d.path.isPointInPath.basic.html">basic</a>.1</h1>
+<p class="desc">isPointInPath() detects whether the point is inside the path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.rect(0, 0, 20, 20);
+_assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
+_assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.2.html
new file mode 100644 (file)
index 0000000..657d45f
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.basic.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.<a href="index.2d.path.isPointInPath.basic.html">basic</a>.2</h1>
+<p class="desc">isPointInPath() detects whether the point is inside the path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.rect(20, 0, 20, 20);
+_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+_assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bezier.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bezier.html
new file mode 100644 (file)
index 0000000..b45fe76
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.bezier</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.bezier</h1>
+<p class="desc">isPointInPath() works on Bezier curves</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.moveTo(25, 25);
+ctx.bezierCurveTo(50, -50, 50, 100, 75, 25);
+_assertEqual(ctx.isPointInPath(25, 20), false, "ctx.isPointInPath(25, 20)", "false");
+_assertEqual(ctx.isPointInPath(25, 30), false, "ctx.isPointInPath(25, 30)", "false");
+_assertEqual(ctx.isPointInPath(30, 20), true, "ctx.isPointInPath(30, 20)", "true");
+_assertEqual(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+_assertEqual(ctx.isPointInPath(40, 2), false, "ctx.isPointInPath(40, 2)", "false");
+_assertEqual(ctx.isPointInPath(40, 20), true, "ctx.isPointInPath(40, 20)", "true");
+_assertEqual(ctx.isPointInPath(40, 30), false, "ctx.isPointInPath(40, 30)", "false");
+_assertEqual(ctx.isPointInPath(40, 47), false, "ctx.isPointInPath(40, 47)", "false");
+_assertEqual(ctx.isPointInPath(45, 20), true, "ctx.isPointInPath(45, 20)", "true");
+_assertEqual(ctx.isPointInPath(45, 30), false, "ctx.isPointInPath(45, 30)", "false");
+_assertEqual(ctx.isPointInPath(55, 20), false, "ctx.isPointInPath(55, 20)", "false");
+_assertEqual(ctx.isPointInPath(55, 30), true, "ctx.isPointInPath(55, 30)", "true");
+_assertEqual(ctx.isPointInPath(60, 2), false, "ctx.isPointInPath(60, 2)", "false");
+_assertEqual(ctx.isPointInPath(60, 20), false, "ctx.isPointInPath(60, 20)", "false");
+_assertEqual(ctx.isPointInPath(60, 30), true, "ctx.isPointInPath(60, 30)", "true");
+_assertEqual(ctx.isPointInPath(60, 47), false, "ctx.isPointInPath(60, 47)", "false");
+_assertEqual(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+_assertEqual(ctx.isPointInPath(70, 30), true, "ctx.isPointInPath(70, 30)", "true");
+_assertEqual(ctx.isPointInPath(75, 20), false, "ctx.isPointInPath(75, 20)", "false");
+_assertEqual(ctx.isPointInPath(75, 30), false, "ctx.isPointInPath(75, 30)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bigarc.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bigarc.html
new file mode 100644 (file)
index 0000000..dcf86fe
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.bigarc</title>
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.path.isPointInPath.bigarc</h1>
+<p class="desc">isPointInPath() works on unclosed arcs larger than 2pi</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.arc(50, 25, 10, 0, 7, false);
+_assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
+_assertSame(ctx.isPointInPath(50, 20), true, "ctx.isPointInPath(50, 20)", "true");
+_assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
+_assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
+_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+_assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.edge.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.edge.html
new file mode 100644 (file)
index 0000000..4baa852
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.edge</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.edge</h1>
+<p class="desc">isPointInPath() counts points on the path as being inside</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath.edge">2d.path.isPointInPath.edge</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.rect(0, 0, 20, 20);
+_assertSame(ctx.isPointInPath(0, 0), true, "ctx.isPointInPath(0, 0)", "true");
+_assertSame(ctx.isPointInPath(10, 0), true, "ctx.isPointInPath(10, 0)", "true");
+_assertSame(ctx.isPointInPath(20, 0), true, "ctx.isPointInPath(20, 0)", "true");
+_assertSame(ctx.isPointInPath(20, 10), true, "ctx.isPointInPath(20, 10)", "true");
+_assertSame(ctx.isPointInPath(20, 20), true, "ctx.isPointInPath(20, 20)", "true");
+_assertSame(ctx.isPointInPath(10, 20), true, "ctx.isPointInPath(10, 20)", "true");
+_assertSame(ctx.isPointInPath(0, 20), true, "ctx.isPointInPath(0, 20)", "true");
+_assertSame(ctx.isPointInPath(0, 10), true, "ctx.isPointInPath(0, 10)", "true");
+_assertSame(ctx.isPointInPath(10, -0.01), false, "ctx.isPointInPath(10, -0.01)", "false");
+_assertSame(ctx.isPointInPath(10, 20.01), false, "ctx.isPointInPath(10, 20.01)", "false");
+_assertSame(ctx.isPointInPath(-0.01, 10), false, "ctx.isPointInPath(-0.01, 10)", "false");
+_assertSame(ctx.isPointInPath(20.01, 10), false, "ctx.isPointInPath(20.01, 10)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.empty.html
new file mode 100644 (file)
index 0000000..4769531
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.empty</h1>
+<p class="desc">isPointInPath() works when there is no path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.isPointInPath(0, 0), false, "ctx.isPointInPath(0, 0)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.nonfinite.html
new file mode 100644 (file)
index 0000000..d2395fc
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.nonfinite</h1>
+<p class="desc">isPointInPath() returns false for non-finite arguments</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath.nonfinite">2d.path.isPointInPath.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.rect(-100, -50, 200, 100);
+_assertSame(ctx.isPointInPath(Infinity, 0), false, "ctx.isPointInPath(Infinity, 0)", "false");
+_assertSame(ctx.isPointInPath(-Infinity, 0), false, "ctx.isPointInPath(-Infinity, 0)", "false");
+_assertSame(ctx.isPointInPath(NaN, 0), false, "ctx.isPointInPath(NaN, 0)", "false");
+_assertSame(ctx.isPointInPath(0, Infinity), false, "ctx.isPointInPath(0, Infinity)", "false");
+_assertSame(ctx.isPointInPath(0, -Infinity), false, "ctx.isPointInPath(0, -Infinity)", "false");
+_assertSame(ctx.isPointInPath(0, NaN), false, "ctx.isPointInPath(0, NaN)", "false");
+_assertSame(ctx.isPointInPath(NaN, NaN), false, "ctx.isPointInPath(NaN, NaN)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.outside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.outside.html
new file mode 100644 (file)
index 0000000..943e550
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.outside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.outside</h1>
+<p class="desc">isPointInPath() works on paths outside the canvas</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.rect(0, -100, 20, 20);
+ctx.rect(20, -10, 20, 20);
+_assertSame(ctx.isPointInPath(10, -110), false, "ctx.isPointInPath(10, -110)", "false");
+_assertSame(ctx.isPointInPath(10, -90), true, "ctx.isPointInPath(10, -90)", "true");
+_assertSame(ctx.isPointInPath(10, -70), false, "ctx.isPointInPath(10, -70)", "false");
+_assertSame(ctx.isPointInPath(30, -20), false, "ctx.isPointInPath(30, -20)", "false");
+_assertSame(ctx.isPointInPath(30, 0), true, "ctx.isPointInPath(30, 0)", "true");
+_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.subpath.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.subpath.html
new file mode 100644 (file)
index 0000000..591169d
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.subpath</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.subpath</h1>
+<p class="desc">isPointInPath() uses the current path, not just the subpath</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.rect(0, 0, 20, 20);
+ctx.beginPath();
+ctx.rect(20, 0, 20, 20);
+ctx.closePath();
+ctx.rect(40, 0, 20, 20);
+_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+_assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
+_assertSame(ctx.isPointInPath(50, 10), true, "ctx.isPointInPath(50, 10)", "true");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.1.html
new file mode 100644 (file)
index 0000000..fad0062
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.transform.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.<a href="index.2d.path.isPointInPath.transform.html">transform</a>.1</h1>
+<p class="desc">isPointInPath() handles transformations correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.translate(50, 0);
+ctx.rect(0, 0, 20, 20);
+_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.2.html
new file mode 100644 (file)
index 0000000..0ba3343
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.transform.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.<a href="index.2d.path.isPointInPath.transform.html">transform</a>.2</h1>
+<p class="desc">isPointInPath() handles transformations correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.rect(50, 0, 20, 20);
+ctx.translate(50, 0);
+_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.3.html
new file mode 100644 (file)
index 0000000..dd70075
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.transform.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.<a href="index.2d.path.isPointInPath.transform.html">transform</a>.3</h1>
+<p class="desc">isPointInPath() handles transformations correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.scale(-1, 1);
+ctx.rect(-70, 0, 20, 20);
+_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.4.html
new file mode 100644 (file)
index 0000000..a944ba5
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.transform.4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.<a href="index.2d.path.isPointInPath.transform.html">transform</a>.4</h1>
+<p class="desc">isPointInPath() handles transformations correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.translate(50, 0);
+ctx.rect(50, 0, 20, 20);
+ctx.translate(0, 50);
+_assertSame(ctx.isPointInPath(60, 10), false, "ctx.isPointInPath(60, 10)", "false");
+_assertSame(ctx.isPointInPath(110, 10), true, "ctx.isPointInPath(110, 10)", "true");
+_assertSame(ctx.isPointInPath(110, 60), false, "ctx.isPointInPath(110, 60)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.unclosed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.unclosed.html
new file mode 100644 (file)
index 0000000..3fb424a
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.unclosed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.unclosed</h1>
+<p class="desc">isPointInPath() works on unclosed subpaths</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.moveTo(0, 0);
+ctx.lineTo(20, 0);
+ctx.lineTo(20, 20);
+ctx.lineTo(0, 20);
+_assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
+_assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.winding.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.winding.html
new file mode 100644 (file)
index 0000000..3ab94aa
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.isPointInPath.winding</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.isPointInPath.html">isPointInPath</a>.winding</h1>
+<p class="desc">isPointInPath() uses the non-zero winding number rule</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.isPointInPath">2d.path.isPointInPath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Create a square ring, using opposite windings to make a hole in the centre
+ctx.moveTo(0, 0);
+ctx.lineTo(50, 0);
+ctx.lineTo(50, 50);
+ctx.lineTo(0, 50);
+ctx.lineTo(0, 0);
+ctx.lineTo(10, 10);
+ctx.lineTo(10, 40);
+ctx.lineTo(40, 40);
+ctx.lineTo(40, 10);
+ctx.lineTo(10, 10);
+
+_assertSame(ctx.isPointInPath(5, 5), true, "ctx.isPointInPath(5, 5)", "true");
+_assertSame(ctx.isPointInPath(25, 5), true, "ctx.isPointInPath(25, 5)", "true");
+_assertSame(ctx.isPointInPath(45, 5), true, "ctx.isPointInPath(45, 5)", "true");
+_assertSame(ctx.isPointInPath(5, 25), true, "ctx.isPointInPath(5, 25)", "true");
+_assertSame(ctx.isPointInPath(25, 25), false, "ctx.isPointInPath(25, 25)", "false");
+_assertSame(ctx.isPointInPath(45, 25), true, "ctx.isPointInPath(45, 25)", "true");
+_assertSame(ctx.isPointInPath(5, 45), true, "ctx.isPointInPath(5, 45)", "true");
+_assertSame(ctx.isPointInPath(25, 45), true, "ctx.isPointInPath(25, 45)", "true");
+_assertSame(ctx.isPointInPath(45, 45), true, "ctx.isPointInPath(45, 45)", "true");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.basic.html
new file mode 100644 (file)
index 0000000..572d7cb
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.lineTo.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.lineTo.html">lineTo</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.lineTo.nonempty">2d.path.lineTo.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.lineTo(100, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.1.html
new file mode 100644 (file)
index 0000000..792fab1
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.lineTo.ensuresubpath.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.lineTo.html">lineTo</a>.<a href="index.2d.path.lineTo.ensuresubpath.html">ensuresubpath</a>.1</h1>
+<p class="desc">If there is no subpath, the point is added and nothing is drawn</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.lineTo.empty">2d.path.lineTo.empty</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.ensure">2d.path.ensure</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.lineTo(100, 50);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.2.html
new file mode 100644 (file)
index 0000000..075ff5f
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.lineTo.ensuresubpath.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.lineTo.html">lineTo</a>.<a href="index.2d.path.lineTo.ensuresubpath.html">ensuresubpath</a>.2</h1>
+<p class="desc">If there is no subpath, the point is added and used for subsequent drawing</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.lineTo.empty">2d.path.lineTo.empty</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.ensure">2d.path.ensure</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.lineTo(0, 25);
+ctx.lineTo(100, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nextpoint.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nextpoint.html
new file mode 100644 (file)
index 0000000..896edb5
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.lineTo.nextpoint</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.lineTo.html">lineTo</a>.nextpoint</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.lineTo.nonempty">2d.path.lineTo.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.moveTo(-100, -100);
+ctx.lineTo(0, 25);
+ctx.lineTo(100, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nonfinite.html
new file mode 100644 (file)
index 0000000..f5aed6e
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.lineTo.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.lineTo.html">lineTo</a>.nonfinite</h1>
+<p class="desc">lineTo() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.lineTo(Infinity, 50);
+ctx.lineTo(-Infinity, 50);
+ctx.lineTo(NaN, 50);
+ctx.lineTo(0, Infinity);
+ctx.lineTo(0, -Infinity);
+ctx.lineTo(0, NaN);
+ctx.lineTo(Infinity, Infinity);
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.basic.html
new file mode 100644 (file)
index 0000000..62a1cd5
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.moveTo.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.moveTo.html">moveTo</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.moveTo">2d.path.moveTo</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.rect(0, 0, 10, 50);
+ctx.moveTo(100, 0);
+ctx.lineTo(10, 0);
+ctx.lineTo(10, 50);
+ctx.lineTo(100, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 90,25, 0,255,0,255, "90,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.multiple.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.multiple.html
new file mode 100644 (file)
index 0000000..fc0d584
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.moveTo.multiple</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.moveTo.html">moveTo</a>.multiple</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.moveTo">2d.path.moveTo</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.moveTo(0, 25);
+ctx.moveTo(100, 25);
+ctx.moveTo(0, 25);
+ctx.lineTo(100, 25);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.newsubpath.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.newsubpath.html
new file mode 100644 (file)
index 0000000..dffdcc8
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.moveTo.newsubpath</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.moveTo.html">moveTo</a>.newsubpath</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.moveTo">2d.path.moveTo</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.beginPath();
+ctx.moveTo(0, 0);
+ctx.moveTo(100, 0);
+ctx.moveTo(100, 50);
+ctx.moveTo(0, 50);
+ctx.fillStyle = '#f00';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.nonfinite.html
new file mode 100644 (file)
index 0000000..19fb74e
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.moveTo.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.moveTo.html">moveTo</a>.nonfinite</h1>
+<p class="desc">moveTo() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.moveTo(Infinity, 50);
+ctx.moveTo(-Infinity, 50);
+ctx.moveTo(NaN, 50);
+ctx.moveTo(0, Infinity);
+ctx.moveTo(0, -Infinity);
+ctx.moveTo(0, NaN);
+ctx.moveTo(Infinity, Infinity);
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.basic.html
new file mode 100644 (file)
index 0000000..f2106dc
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.quadraticCurveTo.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.quadraticCurveTo.html">quadraticCurveTo</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.quadratic.nonempty">2d.path.quadratic.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.moveTo(0, 25);
+ctx.quadraticCurveTo(100, 25, 100, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.1.html
new file mode 100644 (file)
index 0000000..8143299
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.quadraticCurveTo.ensuresubpath.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.quadraticCurveTo.html">quadraticCurveTo</a>.<a href="index.2d.path.quadraticCurveTo.ensuresubpath.html">ensuresubpath</a>.1</h1>
+<p class="desc">If there is no subpath, the first control point is added (and nothing is drawn up to it)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.quadratic.empty">2d.path.quadratic.empty</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.ensure">2d.path.ensure</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.quadraticCurveTo(100, 50, 200, 50);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.2.html
new file mode 100644 (file)
index 0000000..831a193
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.quadraticCurveTo.ensuresubpath.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.quadraticCurveTo.html">quadraticCurveTo</a>.<a href="index.2d.path.quadraticCurveTo.ensuresubpath.html">ensuresubpath</a>.2</h1>
+<p class="desc">If there is no subpath, the first control point is added</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.quadratic.empty">2d.path.quadratic.empty</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.ensure">2d.path.ensure</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.beginPath();
+ctx.quadraticCurveTo(0, 25, 100, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.nonfinite.html
new file mode 100644 (file)
index 0000000..abf1755
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.quadraticCurveTo.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.quadraticCurveTo.html">quadraticCurveTo</a>.nonfinite</h1>
+<p class="desc">quadraticCurveTo() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.quadraticCurveTo(Infinity, 50, 0, 50);
+ctx.quadraticCurveTo(-Infinity, 50, 0, 50);
+ctx.quadraticCurveTo(NaN, 50, 0, 50);
+ctx.quadraticCurveTo(0, Infinity, 0, 50);
+ctx.quadraticCurveTo(0, -Infinity, 0, 50);
+ctx.quadraticCurveTo(0, NaN, 0, 50);
+ctx.quadraticCurveTo(0, 50, Infinity, 50);
+ctx.quadraticCurveTo(0, 50, -Infinity, 50);
+ctx.quadraticCurveTo(0, 50, NaN, 50);
+ctx.quadraticCurveTo(0, 50, 0, Infinity);
+ctx.quadraticCurveTo(0, 50, 0, -Infinity);
+ctx.quadraticCurveTo(0, 50, 0, NaN);
+ctx.quadraticCurveTo(Infinity, Infinity, 0, 50);
+ctx.quadraticCurveTo(Infinity, Infinity, Infinity, 50);
+ctx.quadraticCurveTo(Infinity, Infinity, Infinity, Infinity);
+ctx.quadraticCurveTo(Infinity, Infinity, 0, Infinity);
+ctx.quadraticCurveTo(Infinity, 50, Infinity, 50);
+ctx.quadraticCurveTo(Infinity, 50, Infinity, Infinity);
+ctx.quadraticCurveTo(Infinity, 50, 0, Infinity);
+ctx.quadraticCurveTo(0, Infinity, Infinity, 50);
+ctx.quadraticCurveTo(0, Infinity, Infinity, Infinity);
+ctx.quadraticCurveTo(0, Infinity, 0, Infinity);
+ctx.quadraticCurveTo(0, 50, Infinity, Infinity);
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.scaled.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.scaled.html
new file mode 100644 (file)
index 0000000..105df2f
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.quadraticCurveTo.scaled</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.quadraticCurveTo.html">quadraticCurveTo</a>.scaled</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.quadratic.nonempty">2d.path.quadratic.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.scale(1000, 1000);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 0.055;
+ctx.beginPath();
+ctx.moveTo(-1, 1.05);
+ctx.quadraticCurveTo(0, -1, 1.2, 1.05);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.shape.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.shape.html
new file mode 100644 (file)
index 0000000..2584238
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.quadraticCurveTo.shape</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.quadraticCurveTo.html">quadraticCurveTo</a>.shape</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.quadratic.nonempty">2d.path.quadratic.nonempty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 55;
+ctx.beginPath();
+ctx.moveTo(-1000, 1050);
+ctx.quadraticCurveTo(0, -1000, 1200, 1050);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.basic.html
new file mode 100644 (file)
index 0000000..628edac
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.rect(0, 0, 100, 50);
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.closed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.closed.html
new file mode 100644 (file)
index 0000000..4a39d69
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.closed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.closed</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.closed">2d.path.rect.closed</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 200;
+ctx.lineJoin = 'miter';
+ctx.rect(100, 50, 100, 100);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.1.html
new file mode 100644 (file)
index 0000000..856a2b6
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.end.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.<a href="index.2d.path.rect.end.html">end</a>.1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.newsubpath">2d.path.rect.newsubpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 100;
+ctx.rect(200, 100, 400, 1000);
+ctx.lineTo(-2000, -1000);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.2.html
new file mode 100644 (file)
index 0000000..a1b37d2
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.end.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.<a href="index.2d.path.rect.end.html">end</a>.2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.newsubpath">2d.path.rect.newsubpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 450;
+ctx.lineCap = 'round';
+ctx.lineJoin = 'bevel';
+ctx.rect(150, 150, 2000, 2000);
+ctx.lineTo(160, 160);
+ctx.stroke();
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.negative.html
new file mode 100644 (file)
index 0000000..b09c7b5
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.negative</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.beginPath();
+ctx.fillStyle = '#0f0';
+ctx.rect(0, 0, 50, 25);
+ctx.rect(100, 0, -50, 25);
+ctx.rect(0, 50, 50, -25);
+ctx.rect(100, 50, -50, -25);
+ctx.fill();
+_assertPixel(canvas, 25,12, 0,255,0,255, "25,12", "0,255,0,255");
+_assertPixel(canvas, 75,12, 0,255,0,255, "75,12", "0,255,0,255");
+_assertPixel(canvas, 25,37, 0,255,0,255, "25,37", "0,255,0,255");
+_assertPixel(canvas, 75,37, 0,255,0,255, "75,37", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.newsubpath.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.newsubpath.html
new file mode 100644 (file)
index 0000000..e794aa4
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.newsubpath</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.newsubpath</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.beginPath();
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.moveTo(-100, 25);
+ctx.lineTo(-50, 25);
+ctx.rect(200, 25, 1, 1);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.nonfinite.html
new file mode 100644 (file)
index 0000000..1822261
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.nonfinite</h1>
+<p class="desc">rect() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+ctx.rect(Infinity, 50, 1, 1);
+ctx.rect(-Infinity, 50, 1, 1);
+ctx.rect(NaN, 50, 1, 1);
+ctx.rect(0, Infinity, 1, 1);
+ctx.rect(0, -Infinity, 1, 1);
+ctx.rect(0, NaN, 1, 1);
+ctx.rect(0, 50, Infinity, 1);
+ctx.rect(0, 50, -Infinity, 1);
+ctx.rect(0, 50, NaN, 1);
+ctx.rect(0, 50, 1, Infinity);
+ctx.rect(0, 50, 1, -Infinity);
+ctx.rect(0, 50, 1, NaN);
+ctx.rect(Infinity, Infinity, 1, 1);
+ctx.rect(Infinity, Infinity, Infinity, 1);
+ctx.rect(Infinity, Infinity, Infinity, Infinity);
+ctx.rect(Infinity, Infinity, 1, Infinity);
+ctx.rect(Infinity, 50, Infinity, 1);
+ctx.rect(Infinity, 50, Infinity, Infinity);
+ctx.rect(Infinity, 50, 1, Infinity);
+ctx.rect(0, Infinity, Infinity, 1);
+ctx.rect(0, Infinity, Infinity, Infinity);
+ctx.rect(0, Infinity, 1, Infinity);
+ctx.rect(0, 50, Infinity, Infinity);
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.selfintersect.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.selfintersect.html
new file mode 100644 (file)
index 0000000..6726d0a
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.selfintersect</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.selfintersect</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 90;
+ctx.beginPath();
+ctx.rect(45, 20, 10, 10);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.winding.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.winding.html
new file mode 100644 (file)
index 0000000..bd7cdca
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.winding</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.winding</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.beginPath();
+ctx.fillStyle = '#f00';
+ctx.rect(0, 0, 50, 50);
+ctx.rect(100, 50, -50, -50);
+ctx.rect(0, 25, 100, -25);
+ctx.rect(100, 25, -100, 25);
+ctx.fill();
+_assertPixel(canvas, 25,12, 0,255,0,255, "25,12", "0,255,0,255");
+_assertPixel(canvas, 75,12, 0,255,0,255, "75,12", "0,255,0,255");
+_assertPixel(canvas, 25,37, 0,255,0,255, "25,37", "0,255,0,255");
+_assertPixel(canvas, 75,37, 0,255,0,255, "75,37", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.1.html
new file mode 100644 (file)
index 0000000..22041bb
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.zero.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.<a href="index.2d.path.rect.zero.html">zero</a>.1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 100;
+ctx.beginPath();
+ctx.rect(0, 50, 100, 0);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.2.html
new file mode 100644 (file)
index 0000000..570bcf8
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.zero.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.<a href="index.2d.path.rect.zero.html">zero</a>.2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 100;
+ctx.beginPath();
+ctx.rect(50, -100, 0, 250);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.3.html
new file mode 100644 (file)
index 0000000..e0bce1d
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.zero.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.<a href="index.2d.path.rect.zero.html">zero</a>.3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.beginPath();
+ctx.rect(50, 25, 0, 0);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.4.html
new file mode 100644 (file)
index 0000000..0da4c18
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.zero.4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.<a href="index.2d.path.rect.zero.html">zero</a>.4</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.rect(100, 25, 0, 0);
+ctx.lineTo(0, 25);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.5.html
new file mode 100644 (file)
index 0000000..9d13030
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.zero.5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.<a href="index.2d.path.rect.zero.html">zero</a>.5</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.moveTo(0, 0);
+ctx.rect(100, 25, 0, 0);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.6.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.6.html
new file mode 100644 (file)
index 0000000..52433f4
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.rect.zero.6</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.rect.html">rect</a>.<a href="index.2d.path.rect.zero.html">zero</a>.6</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.rect.subpath">2d.path.rect.subpath</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineJoin = 'miter';
+ctx.miterLimit = 1.5;
+ctx.lineWidth = 200;
+ctx.beginPath();
+ctx.rect(100, 25, 1000, 0);
+ctx.stroke();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.empty.html
new file mode 100644 (file)
index 0000000..8227bcd
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.empty</h1>
+<p class="desc">Empty subpaths are not stroked</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.empty">2d.path.stroke.empty</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.lineCap = 'round';
+ctx.lineJoin = 'round';
+
+ctx.beginPath();
+ctx.moveTo(40, 25);
+ctx.moveTo(60, 25);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.overlap.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.overlap.html
new file mode 100644 (file)
index 0000000..1493a05
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.overlap</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.overlap</h1>
+<p class="desc">Stroked subpaths are combined before being drawn</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.basic">2d.path.stroke.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.path.stroke.overlap.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.lineWidth = 50;
+ctx.moveTo(0, 20);
+ctx.lineTo(100, 20);
+ctx.moveTo(0, 30);
+ctx.lineTo(100, 30);
+ctx.stroke();
+
+_assertPixelApprox(canvas, 50,25, 0,127,0,255, "50,25", "0,127,0,255", 1);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.overlap.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.overlap.png
new file mode 100644 (file)
index 0000000..0bd6828
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.overlap.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.arc.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.arc.html
new file mode 100644 (file)
index 0000000..e03c260
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.prune.arc</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.<a href="index.2d.path.stroke.prune.html">prune</a>.arc</h1>
+<p class="desc">Zero-length line segments from arcTo and arc are removed before stroking</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.prune">2d.path.stroke.prune</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.lineCap = 'round';
+ctx.lineJoin = 'round';
+
+ctx.beginPath();
+ctx.moveTo(50, 25);
+ctx.arcTo(50, 25, 150, 25, 10);
+ctx.stroke();
+
+ctx.beginPath();
+ctx.moveTo(60, 25);
+ctx.arc(50, 25, 10, 0, 0, false);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.closed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.closed.html
new file mode 100644 (file)
index 0000000..5e7f6c1
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.prune.closed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.<a href="index.2d.path.stroke.prune.html">prune</a>.closed</h1>
+<p class="desc">Zero-length line segments from closed paths are removed before stroking</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.prune">2d.path.stroke.prune</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.lineCap = 'round';
+ctx.lineJoin = 'round';
+
+ctx.beginPath();
+ctx.moveTo(50, 25);
+ctx.lineTo(50, 25);
+ctx.closePath();
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.corner.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.corner.html
new file mode 100644 (file)
index 0000000..e1b6454
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.prune.corner</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.<a href="index.2d.path.stroke.prune.html">prune</a>.corner</h1>
+<p class="desc">Zero-length line segments are removed before stroking with miters</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.prune">2d.path.stroke.prune</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 400;
+ctx.lineJoin = 'miter';
+ctx.miterLimit = 1.4;
+
+ctx.beginPath();
+ctx.moveTo(-1000, 200);
+ctx.lineTo(-100, 200);
+ctx.lineTo(-100, 200);
+ctx.lineTo(-100, 200);
+ctx.lineTo(-100, 1000);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.curve.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.curve.html
new file mode 100644 (file)
index 0000000..3e7b901
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.prune.curve</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.<a href="index.2d.path.stroke.prune.html">prune</a>.curve</h1>
+<p class="desc">Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed before stroking</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.prune">2d.path.stroke.prune</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.lineCap = 'round';
+ctx.lineJoin = 'round';
+
+ctx.beginPath();
+ctx.moveTo(50, 25);
+ctx.quadraticCurveTo(50, 25, 50, 25);
+ctx.stroke();
+
+ctx.beginPath();
+ctx.moveTo(50, 25);
+ctx.bezierCurveTo(50, 25, 50, 25, 50, 25);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.line.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.line.html
new file mode 100644 (file)
index 0000000..7f06419
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.prune.line</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.<a href="index.2d.path.stroke.prune.html">prune</a>.line</h1>
+<p class="desc">Zero-length line segments from lineTo are removed before stroking</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.prune">2d.path.stroke.prune</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.lineCap = 'round';
+ctx.lineJoin = 'round';
+
+ctx.beginPath();
+ctx.moveTo(50, 25);
+ctx.lineTo(50, 25);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.rect.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.rect.html
new file mode 100644 (file)
index 0000000..2c1f2bd
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.prune.rect</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.<a href="index.2d.path.stroke.prune.html">prune</a>.rect</h1>
+<p class="desc">Zero-length line segments from rect and strokeRect are removed before stroking</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.prune">2d.path.stroke.prune</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 100;
+ctx.lineCap = 'round';
+ctx.lineJoin = 'round';
+
+ctx.beginPath();
+ctx.rect(50, 25, 0, 0);
+ctx.stroke();
+
+ctx.strokeRect(50, 25, 0, 0);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale1.html
new file mode 100644 (file)
index 0000000..5d0b521
--- /dev/null
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.scale1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.scale1</h1>
+<p class="desc">Stroke line widths are scaled by the current transformation matrix</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.transformation">2d.path.transformation</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.rect(25, 12.5, 50, 25);
+ctx.save();
+ctx.scale(50, 25);
+ctx.strokeStyle = '#0f0';
+ctx.stroke();
+ctx.restore();
+
+ctx.beginPath();
+ctx.rect(-25, -12.5, 150, 75);
+ctx.save();
+ctx.scale(50, 25);
+ctx.strokeStyle = '#f00';
+ctx.stroke();
+ctx.restore();
+
+_assertPixel(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255");
+_assertPixel(canvas, 50,0, 0,255,0,255, "50,0", "0,255,0,255");
+_assertPixel(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255");
+_assertPixel(canvas, 0,25, 0,255,0,255, "0,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 99,25, 0,255,0,255, "99,25", "0,255,0,255");
+_assertPixel(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255");
+_assertPixel(canvas, 50,49, 0,255,0,255, "50,49", "0,255,0,255");
+_assertPixel(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale2.html
new file mode 100644 (file)
index 0000000..1ff589e
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.scale2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.scale2</h1>
+<p class="desc">Stroke line widths are scaled by the current transformation matrix</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.transformation">2d.path.transformation</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.rect(25, 12.5, 50, 25);
+ctx.save();
+ctx.rotate(Math.PI/2);
+ctx.scale(25, 50);
+ctx.strokeStyle = '#0f0';
+ctx.stroke();
+ctx.restore();
+
+ctx.beginPath();
+ctx.rect(-25, -12.5, 150, 75);
+ctx.save();
+ctx.rotate(Math.PI/2);
+ctx.scale(25, 50);
+ctx.strokeStyle = '#f00';
+ctx.stroke();
+ctx.restore();
+
+_assertPixel(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255");
+_assertPixel(canvas, 50,0, 0,255,0,255, "50,0", "0,255,0,255");
+_assertPixel(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255");
+_assertPixel(canvas, 0,25, 0,255,0,255, "0,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 99,25, 0,255,0,255, "99,25", "0,255,0,255");
+_assertPixel(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255");
+_assertPixel(canvas, 50,49, 0,255,0,255, "50,49", "0,255,0,255");
+_assertPixel(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.skew.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.skew.html
new file mode 100644 (file)
index 0000000..f783f40
--- /dev/null
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.skew</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.skew</h1>
+<p class="desc">Strokes lines are skewed by the current transformation matrix</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.transformation">2d.path.transformation</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.save();
+ctx.beginPath();
+ctx.moveTo(49, -50);
+ctx.lineTo(201, -50);
+ctx.rotate(Math.PI/4);
+ctx.scale(1, 283);
+ctx.strokeStyle = '#0f0';
+ctx.stroke();
+ctx.restore();
+
+ctx.save();
+ctx.beginPath();
+ctx.translate(-150, 0);
+ctx.moveTo(49, -50);
+ctx.lineTo(199, -50);
+ctx.rotate(Math.PI/4);
+ctx.scale(1, 142);
+ctx.strokeStyle = '#f00';
+ctx.stroke();
+ctx.restore();
+
+ctx.save();
+ctx.beginPath();
+ctx.translate(-150, 0);
+ctx.moveTo(49, -50);
+ctx.lineTo(199, -50);
+ctx.rotate(Math.PI/4);
+ctx.scale(1, 142);
+ctx.strokeStyle = '#f00';
+ctx.stroke();
+ctx.restore();
+
+_assertPixel(canvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255");
+_assertPixel(canvas, 50,0, 0,255,0,255, "50,0", "0,255,0,255");
+_assertPixel(canvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255");
+_assertPixel(canvas, 0,25, 0,255,0,255, "0,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 99,25, 0,255,0,255, "99,25", "0,255,0,255");
+_assertPixel(canvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255");
+_assertPixel(canvas, 50,49, 0,255,0,255, "50,49", "0,255,0,255");
+_assertPixel(canvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.unaffected.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.unaffected.html
new file mode 100644 (file)
index 0000000..38dc813
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.unaffected</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.unaffected</h1>
+<p class="desc">Stroking does not start a new path or subpath</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.basic">2d.path.stroke.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.lineWidth = 50;
+ctx.moveTo(-100, 25);
+ctx.lineTo(-100, -100);
+ctx.lineTo(200, -100);
+ctx.lineTo(200, 25);
+ctx.strokeStyle = '#f00';
+ctx.stroke();
+
+ctx.closePath();
+ctx.strokeStyle = '#0f0';
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.union.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.union.html
new file mode 100644 (file)
index 0000000..7f17ffa
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.stroke.union</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.stroke.html">stroke</a>.union</h1>
+<p class="desc">Strokes in opposite directions are unioned, not subtracted</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.stroke.basic">2d.path.stroke.basic</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 40;
+ctx.moveTo(0, 10);
+ctx.lineTo(100, 10);
+ctx.moveTo(100, 40);
+ctx.lineTo(0, 40);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.basic.html
new file mode 100644 (file)
index 0000000..617bc19
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.transformation.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.transformation.html">transformation</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.transformation">2d.path.transformation</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.translate(-100, 0);
+ctx.rect(100, 0, 100, 50);
+ctx.translate(0, -100);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.changing.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.changing.html
new file mode 100644 (file)
index 0000000..7cf0cfe
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.transformation.changing</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.transformation.html">transformation</a>.changing</h1>
+<p class="desc">Transformations are applied while building paths, not when drawing</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.transformation">2d.path.transformation</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.moveTo(0, 0);
+ctx.translate(100, 0);
+ctx.lineTo(0, 0);
+ctx.translate(0, 50);
+ctx.lineTo(0, 0);
+ctx.translate(-100, 0);
+ctx.lineTo(0, 0);
+ctx.translate(1000, 1000);
+ctx.rotate(Math.PI/2);
+ctx.scale(0.1, 0.1);
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.multiple.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.multiple.html
new file mode 100644 (file)
index 0000000..a62da75
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.path.transformation.multiple</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.path.html">path</a>.<a href="index.2d.path.transformation.html">transformation</a>.multiple</h1>
+<p class="desc">Transformations are applied while building paths, not when drawing</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.path.transformation">2d.path.transformation</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#f00';    
+ctx.translate(-100, 0);
+ctx.rect(0, 0, 100, 50);
+ctx.fill();
+ctx.translate(100, 0);
+ctx.fill();
+
+ctx.beginPath();
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.translate(0, -50);
+ctx.moveTo(0, 25);
+ctx.lineTo(100, 25);
+ctx.stroke();
+ctx.translate(0, 50);
+ctx.stroke();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.animated.gif.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.animated.gif.html
new file mode 100644 (file)
index 0000000..c50fe3e
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.animated.gif</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.animated.html">animated</a>.gif</h1>
+<p class="desc">createPattern() of an animated GIF draws the first frame</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.animated.image">2d.pattern.animated.image</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+deferTest();
+setTimeout(function () {
+    var pattern = ctx.createPattern(document.getElementById('anim-gr.gif'), 'repeat');
+    ctx.fillStyle = pattern;
+    ctx.fillRect(0, 0, 50, 50);
+    setTimeout(wrapFunction(function () {
+        ctx.fillRect(50, 0, 50, 50);
+        _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+        _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    }), 250);
+}, 250);
+
+
+});
+</script>
+<img src="../images/anim-gr.gif" id="anim-gr.gif" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.canvas.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.canvas.html
new file mode 100644 (file)
index 0000000..4f39c7e
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.basic.canvas</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.basic.html">basic</a>.canvas</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#0f0';
+ctx2.fillRect(0, 0, 100, 50);
+
+var pattern = ctx.createPattern(canvas2, 'no-repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.image.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.image.html
new file mode 100644 (file)
index 0000000..cb41996
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.basic.image</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.basic.html">basic</a>.image</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('green.png');
+var pattern = ctx.createPattern(img, 'no-repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.nocontext.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.nocontext.html
new file mode 100644 (file)
index 0000000..6f08934
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.basic.nocontext</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.basic.html">basic</a>.nocontext</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var pattern = ctx.createPattern(canvas2, 'no-repeat');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.type.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.type.html
new file mode 100644 (file)
index 0000000..e483373
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.basic.type</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.basic.html">basic</a>.type</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.return">2d.pattern.return</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(window.CanvasPattern, undefined, "window.CanvasPattern", "undefined");
+
+window.CanvasPattern.prototype.thisImplementsCanvasPattern = true;
+
+var img = document.getElementById('green.png');
+var pattern = ctx.createPattern(img, 'no-repeat');
+_assert(pattern.thisImplementsCanvasPattern, "pattern.thisImplementsCanvasPattern");
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.zerocanvas.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.zerocanvas.html
new file mode 100644 (file)
index 0000000..ef4afc7
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.basic.zerocanvas</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.basic.html">basic</a>.zerocanvas</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.zerocanvas">2d.pattern.zerocanvas</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 0;
+canvas.height = 10;
+_assertSame(canvas.width, 0, "canvas.width", "0");
+_assertSame(canvas.height, 10, "canvas.height", "10");
+try { var _thrown = false;
+  ctx.createPattern(canvas, 'repeat');
+} catch (e) { if (e.code != DOMException.INVALID_STATE_ERR) _fail("Failed assertion: expected exception of type INVALID_STATE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INVALID_STATE_ERR: ctx.createPattern(canvas, 'repeat')"); }
+
+canvas.width = 10;
+canvas.height = 0;
+_assertSame(canvas.width, 10, "canvas.width", "10");
+_assertSame(canvas.height, 0, "canvas.height", "0");
+try { var _thrown = false;
+  ctx.createPattern(canvas, 'repeat');
+} catch (e) { if (e.code != DOMException.INVALID_STATE_ERR) _fail("Failed assertion: expected exception of type INVALID_STATE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INVALID_STATE_ERR: ctx.createPattern(canvas, 'repeat')"); }
+
+canvas.width = 0;
+canvas.height = 0;
+_assertSame(canvas.width, 0, "canvas.width", "0");
+_assertSame(canvas.height, 0, "canvas.height", "0");
+try { var _thrown = false;
+  ctx.createPattern(canvas, 'repeat');
+} catch (e) { if (e.code != DOMException.INVALID_STATE_ERR) _fail("Failed assertion: expected exception of type INVALID_STATE_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type INVALID_STATE_ERR: ctx.createPattern(canvas, 'repeat')"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.crosscanvas.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.crosscanvas.html
new file mode 100644 (file)
index 0000000..3d100f5
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.crosscanvas</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.crosscanvas</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('green.png');
+
+var pattern = document.createElement('canvas').getContext('2d').createPattern(img, 'no-repeat');
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.emptysrc.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.emptysrc.html
new file mode 100644 (file)
index 0000000..5bfa9e4
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.image.incomplete.emptysrc</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.pattern.image.incomplete.emptysrc</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('red.png');
+img.src = "";
+_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null");
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.immediate.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.immediate.html
new file mode 100644 (file)
index 0000000..e76eab6
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.image.incomplete.immediate</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.pattern.image.incomplete.immediate</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = new Image();
+img.src = '/images/red.png';
+// This triggers the "update the image data" algorithm.
+// The image will not go to the "completely available" state
+// until a fetch task in the networking task source is processed,
+// so the image must not be fully decodable yet:
+_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null");
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.nosrc.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.nosrc.html
new file mode 100644 (file)
index 0000000..0d622ea
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.image.incomplete.nosrc</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.pattern.image.incomplete.nosrc</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = new Image();
+_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.reload.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.reload.html
new file mode 100644 (file)
index 0000000..f96d2de
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.image.incomplete.reload</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.pattern.image.incomplete.reload</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('yellow.png');
+img.src = 'images/red.png';
+// This triggers the "update the image data" algorithm,
+// and resets the image to the "unavailable" state.
+// The image will not go to the "completely available" state
+// until a fetch task in the networking task source is processed,
+// so the image must not be fully decodable yet:
+_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null");
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+<img src="../images/red.png" id="red.png" class="resource">
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.removedsrc.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.removedsrc.html
new file mode 100644 (file)
index 0000000..99832b4
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.image.incomplete.removedsrc</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.pattern.image.incomplete.removedsrc</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('red.png');
+img.removeAttribute('src');
+_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null");
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.null.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.null.html
new file mode 100644 (file)
index 0000000..0a84b72
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.image.null</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.pattern.image.null</h1>
+<p class="desc"></p>
+
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createPattern(null, 'repeat');
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.createPattern(null, 'repeat')"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.string.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.string.html
new file mode 100644 (file)
index 0000000..2c2218c
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.image.string</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.image.html">image</a>.string</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.IDL">2d.pattern.IDL</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createPattern('../images/red.png', 'repeat');
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.createPattern('../images/red.png', 'repeat')"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.undefined.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.undefined.html
new file mode 100644 (file)
index 0000000..f66c428
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.image.undefined</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.image.html">image</a>.undefined</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.IDL">2d.pattern.IDL</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createPattern(undefined, 'repeat');
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.createPattern(undefined, 'repeat')"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas1.html
new file mode 100644 (file)
index 0000000..5c8929d
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.modify.canvas1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.modify.html">modify</a>.canvas1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.modify">2d.pattern.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#0f0';
+ctx2.fillRect(0, 0, 100, 50);
+
+var pattern = ctx.createPattern(canvas2, 'no-repeat');
+
+ctx2.fillStyle = '#f00';
+ctx2.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas2.html
new file mode 100644 (file)
index 0000000..7755b0a
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.modify.canvas2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.modify.html">modify</a>.canvas2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.modify">2d.pattern.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#0f0';
+ctx2.fillRect(0, 0, 100, 50);
+
+var pattern = ctx.createPattern(canvas2, 'no-repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx2.fillStyle = '#f00';
+ctx2.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image1.html
new file mode 100644 (file)
index 0000000..b147aca
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.modify.image1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.modify.html">modify</a>.image1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.modify">2d.pattern.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('green.png');
+var pattern = ctx.createPattern(img, 'no-repeat');
+deferTest();
+img.onload = wrapFunction(function ()
+{
+    ctx.fillStyle = pattern;
+    ctx.fillRect(0, 0, 100, 50);
+
+    _assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+    _assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+    _assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+    _assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+});
+img.src = '../images/red.png';
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image2.html
new file mode 100644 (file)
index 0000000..36a5e31
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.modify.image2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.modify.html">modify</a>.image2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.modify">2d.pattern.modify</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('green.png');
+var pattern = ctx.createPattern(img, 'no-repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#00f';
+ctx.fillRect(0, 0, 100, 50);
+deferTest();
+img.onload = wrapFunction(function ()
+{
+    ctx.fillStyle = pattern;
+    ctx.fillRect(0, 0, 100, 50);
+
+    _assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+    _assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+    _assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+    _assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+});
+img.src = '../images/red.png';
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.basic.html
new file mode 100644 (file)
index 0000000..6de3564
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.norepeat.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.norepeat.html">norepeat</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var img = document.getElementById('green.png');
+var pattern = ctx.createPattern(img, 'no-repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord1.html
new file mode 100644 (file)
index 0000000..9defc83
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.norepeat.coord1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.norepeat.html">norepeat</a>.coord1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(50, 0, 50, 50);
+
+var img = document.getElementById('green.png');
+var pattern = ctx.createPattern(img, 'no-repeat');
+ctx.fillStyle = pattern;
+ctx.translate(50, 0);
+ctx.fillRect(-50, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord2.html
new file mode 100644 (file)
index 0000000..5d5a6b1
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.norepeat.coord2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.norepeat.html">norepeat</a>.coord2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('green.png');
+var pattern = ctx.createPattern(img, 'no-repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 50, 50);
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(50, 0, 50, 50);
+
+ctx.fillStyle = pattern;
+ctx.translate(50, 0);
+ctx.fillRect(-50, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green.png" id="green.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.outside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.outside.html
new file mode 100644 (file)
index 0000000..2d73627
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.norepeat.outside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.norepeat.html">norepeat</a>.outside</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var img = document.getElementById('red.png');
+var pattern = ctx.createPattern(img, 'no-repeat');
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = pattern;
+ctx.fillRect(0, -50, 100, 50);
+ctx.fillRect(-100, 0, 100, 50);
+ctx.fillRect(0, 50, 100, 50);
+ctx.fillRect(100, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.canvas.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.canvas.html
new file mode 100644 (file)
index 0000000..6251ee5
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.orientation.canvas</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.orientation.html">orientation</a>.canvas</h1>
+<p class="desc">Canvas patterns do not get flipped when painted</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#f00';
+ctx2.fillRect(0, 0, 100, 25);
+ctx2.fillStyle = '#0f0';
+ctx2.fillRect(0, 25, 100, 25);
+
+var pattern = ctx.createPattern(canvas2, 'no-repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 25);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.image.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.image.html
new file mode 100644 (file)
index 0000000..5e78740
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.orientation.image</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.orientation.html">orientation</a>.image</h1>
+<p class="desc">Image patterns do not get flipped when painted</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var img = document.getElementById('rrgg-256x256.png');
+var pattern = ctx.createPattern(img, 'no-repeat');
+ctx.fillStyle = pattern;
+ctx.save();
+ctx.translate(0, -103);
+ctx.fillRect(0, 103, 100, 50);
+ctx.restore();
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 25);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/rrgg-256x256.png" id="rrgg-256x256.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.basic.html
new file mode 100644 (file)
index 0000000..5f001b1
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.repeat.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.repeat.html">repeat</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var img = document.getElementById('green-16x16.png');
+var pattern = ctx.createPattern(img, 'repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green-16x16.png" id="green-16x16.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord1.html
new file mode 100644 (file)
index 0000000..ccde39d
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.repeat.coord1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.repeat.html">repeat</a>.coord1</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var img = document.getElementById('rgrg-256x256.png');
+var pattern = ctx.createPattern(img, 'repeat');
+ctx.fillStyle = pattern;
+ctx.translate(-128, -78);
+ctx.fillRect(128, 78, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/rgrg-256x256.png" id="rgrg-256x256.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord2.html
new file mode 100644 (file)
index 0000000..03018c0
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.repeat.coord2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.repeat.html">repeat</a>.coord2</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('ggrr-256x256.png');
+var pattern = ctx.createPattern(img, 'repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/ggrr-256x256.png" id="ggrr-256x256.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord3.html
new file mode 100644 (file)
index 0000000..1aa419d
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.repeat.coord3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.repeat.html">repeat</a>.coord3</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('rgrg-256x256.png');
+var pattern = ctx.createPattern(img, 'repeat');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.translate(-128, -78);
+ctx.fillRect(128, 78, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/rgrg-256x256.png" id="rgrg-256x256.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.outside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.outside.html
new file mode 100644 (file)
index 0000000..eb70c68
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.repeat.outside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.repeat.html">repeat</a>.outside</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+var img = document.getElementById('green-16x16.png');
+var pattern = ctx.createPattern(img, 'repeat');
+ctx.fillStyle = pattern;
+ctx.translate(50, 25);
+ctx.fillRect(-50, -25, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green-16x16.png" id="green-16x16.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.basic.html
new file mode 100644 (file)
index 0000000..b759a4b
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.repeatx.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.repeatx.html">repeatx</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 16);
+
+var img = document.getElementById('green-16x16.png');
+var pattern = ctx.createPattern(img, 'repeat-x');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green-16x16.png" id="green-16x16.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.outside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.outside.html
new file mode 100644 (file)
index 0000000..9dc8ed5
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.repeatx.outside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.repeatx.html">repeatx</a>.outside</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var img = document.getElementById('red-16x16.png');
+var pattern = ctx.createPattern(img, 'repeat-x');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 16);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/red-16x16.png" id="red-16x16.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.basic.html
new file mode 100644 (file)
index 0000000..26d8307
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.repeaty.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.repeaty.html">repeaty</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 16, 50);
+
+var img = document.getElementById('green-16x16.png');
+var pattern = ctx.createPattern(img, 'repeat-y');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green-16x16.png" id="green-16x16.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.outside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.outside.html
new file mode 100644 (file)
index 0000000..ac33f78
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.paint.repeaty.outside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.paint.html">paint</a>.<a href="index.2d.pattern.paint.repeaty.html">repeaty</a>.outside</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.painting">2d.pattern.painting</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+var img = document.getElementById('red-16x16.png');
+var pattern = ctx.createPattern(img, 'repeat-y');
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 16, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/red-16x16.png" id="red-16x16.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.case.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.case.html
new file mode 100644 (file)
index 0000000..9430ca1
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.repeat.case</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.repeat.html">repeat</a>.case</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.exact">2d.pattern.exact</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createPattern(canvas, "Repeat");
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: ctx.createPattern(canvas, \"Repeat\")"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.empty.html
new file mode 100644 (file)
index 0000000..1c58c79
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.repeat.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.repeat.html">repeat</a>.empty</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.missing">2d.pattern.missing</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('green-1x1.png');
+var pattern = ctx.createPattern(img, "");
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 200, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green-1x1.png" id="green-1x1.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.null.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.null.html
new file mode 100644 (file)
index 0000000..990f7ef
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.repeat.null</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.repeat.html">repeat</a>.null</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.missing">2d.pattern.missing</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('green-1x1.png');
+var pattern = ctx.createPattern(img, null);
+ctx.fillStyle = pattern;
+ctx.fillRect(0, 0, 100, 50);
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
+_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/green-1x1.png" id="green-1x1.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.nullsuffix.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.nullsuffix.html
new file mode 100644 (file)
index 0000000..d141b15
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.repeat.nullsuffix</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.pattern.repeat.nullsuffix</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createPattern(canvas, "repeat\0");
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: ctx.createPattern(canvas, 'repeat\0')"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.undefined.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.undefined.html
new file mode 100644 (file)
index 0000000..f8df737
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.repeat.undefined</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.repeat.html">repeat</a>.undefined</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.unrecognised">2d.pattern.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createPattern(canvas, undefined);
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: ctx.createPattern(canvas, undefined)"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognised.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognised.html
new file mode 100644 (file)
index 0000000..a6a0869
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.repeat.unrecognised</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.repeat.html">repeat</a>.unrecognised</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.pattern.unrecognised">2d.pattern.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createPattern(canvas, "invalid");
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: ctx.createPattern(canvas, \"invalid\")"); }
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognisednull.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognisednull.html
new file mode 100644 (file)
index 0000000..a2e36f9
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.pattern.repeat.unrecognisednull</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.pattern.repeat.unrecognisednull</h1>
+<p class="desc"></p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+try { var _thrown = false;
+  ctx.createPattern(canvas, "null");
+} catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: ctx.createPattern(canvas, 'null')"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.scaled.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.scaled.html
new file mode 100644 (file)
index 0000000..75757e9
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.scaled</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.scaled</h1>
+<p class="desc">CSS-scaled canvases get drawn correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="25" style="width: 100px; height: 50px"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.scaled.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#00f';
+ctx.fillRect(0, 0, 50, 25);
+ctx.fillStyle = '#0ff';
+ctx.fillRect(0, 0, 25, 10);
+_requireManualCheck();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.scaled.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.scaled.png
new file mode 100644 (file)
index 0000000..85ccb32
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.scaled.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.1.html
new file mode 100644 (file)
index 0000000..29c5485
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.alpha.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.alpha.html">alpha</a>.1</h1>
+<p class="desc">Shadow colour alpha components are used</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = 'rgba(255, 0, 0, 0.01)';
+ctx.shadowOffsetY = 50;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 4);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.2.html
new file mode 100644 (file)
index 0000000..3d7212b
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.alpha.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.alpha.html">alpha</a>.2</h1>
+<p class="desc">Shadow colour alpha components are used</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.shadow.alpha.2.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = 'rgba(0, 0, 255, 0.5)';
+ctx.shadowOffsetY = 50;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixelApprox(canvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.2.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.2.png
new file mode 100644 (file)
index 0000000..d723a2c
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.2.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.3.html
new file mode 100644 (file)
index 0000000..5c17ff8
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.alpha.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.alpha.html">alpha</a>.3</h1>
+<p class="desc">Shadows are affected by globalAlpha</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.shadow.alpha.3.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching)
+ctx.shadowColor = '#00f';
+ctx.shadowOffsetY = 50;
+ctx.globalAlpha = 0.5;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixelApprox(canvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.3.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.3.png
new file mode 100644 (file)
index 0000000..d723a2c
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.3.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.4.html
new file mode 100644 (file)
index 0000000..a0251a5
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.alpha.4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.alpha.html">alpha</a>.4</h1>
+<p class="desc">Shadows with alpha components are correctly affected by globalAlpha</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.shadow.alpha.4.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching)
+ctx.shadowColor = 'rgba(0, 0, 255, 0.707)';
+ctx.shadowOffsetY = 50;
+ctx.globalAlpha = 0.707;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixelApprox(canvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.4.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.4.png
new file mode 100644 (file)
index 0000000..d723a2c
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.4.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.5.html
new file mode 100644 (file)
index 0000000..b642e77
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.alpha.5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.alpha.html">alpha</a>.5</h1>
+<p class="desc">Shadows of shapes with alpha components are drawn correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.shadow.alpha.5.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = 'rgba(64, 0, 0, 0.5)';
+ctx.shadowColor = '#00f';
+ctx.shadowOffsetY = 50;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixelApprox(canvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.5.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.5.png
new file mode 100644 (file)
index 0000000..d723a2c
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.5.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.initial.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.initial.html
new file mode 100644 (file)
index 0000000..ce442b9
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.attributes.shadowBlur.initial</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowBlur.html">shadowBlur</a>.initial</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.blur.get">2d.shadow.blur.get</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.blur.initial">2d.shadow.blur.initial</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.invalid.html
new file mode 100644 (file)
index 0000000..a0d93e0
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.attributes.shadowBlur.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowBlur.html">shadowBlur</a>.invalid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.blur.invalid">2d.shadow.blur.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.shadowBlur = 1;
+ctx.shadowBlur = -2;
+_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1");
+
+ctx.shadowBlur = 1;
+ctx.shadowBlur = Infinity;
+_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1");
+
+ctx.shadowBlur = 1;
+ctx.shadowBlur = -Infinity;
+_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1");
+
+ctx.shadowBlur = 1;
+ctx.shadowBlur = NaN;
+_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.valid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.valid.html
new file mode 100644 (file)
index 0000000..a1e2638
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.attributes.shadowBlur.valid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowBlur.html">shadowBlur</a>.valid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.blur.get">2d.shadow.blur.get</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.blur.set">2d.shadow.blur.set</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.shadowBlur = 1;
+_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1");
+
+ctx.shadowBlur = 0.5;
+_assertSame(ctx.shadowBlur, 0.5, "ctx.shadowBlur", "0.5");
+
+ctx.shadowBlur = 1e6;
+_assertSame(ctx.shadowBlur, 1e6, "ctx.shadowBlur", "1e6");
+
+ctx.shadowBlur = 0;
+_assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.initial.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.initial.html
new file mode 100644 (file)
index 0000000..1adbbcf
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.attributes.shadowColor.initial</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowColor.html">shadowColor</a>.initial</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.color.initial">2d.shadow.color.initial</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.shadowColor, 'rgba(0, 0, 0, 0)', "ctx.shadowColor", "'rgba(0, 0, 0, 0)'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.invalid.html
new file mode 100644 (file)
index 0000000..cdb4f44
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.attributes.shadowColor.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowColor.html">shadowColor</a>.invalid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.color.invalid">2d.shadow.color.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.shadowColor = '#00ff00';
+ctx.shadowColor = 'bogus';
+_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'");
+
+ctx.shadowColor = '#00ff00';
+ctx.shadowColor = 'red bogus';
+_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'");
+
+ctx.shadowColor = '#00ff00';
+ctx.shadowColor = ctx;
+_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'");
+
+ctx.shadowColor = '#00ff00';
+ctx.shadowColor = undefined;
+_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.valid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.valid.html
new file mode 100644 (file)
index 0000000..892cb72
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.attributes.shadowColor.valid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowColor.html">shadowColor</a>.valid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.color.get">2d.shadow.color.get</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.color.set">2d.shadow.color.set</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.shadowColor = 'lime';
+_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'");
+
+ctx.shadowColor = 'RGBA(0,255, 0,0)';
+_assertSame(ctx.shadowColor, 'rgba(0, 255, 0, 0)', "ctx.shadowColor", "'rgba(0, 255, 0, 0)'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.initial.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.initial.html
new file mode 100644 (file)
index 0000000..3ef17f9
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.attributes.shadowOffset.initial</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowOffset.html">shadowOffset</a>.initial</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.offset.initial">2d.shadow.offset.initial</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0");
+_assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.invalid.html
new file mode 100644 (file)
index 0000000..80a0938
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.attributes.shadowOffset.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowOffset.html">shadowOffset</a>.invalid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.offset.invalid">2d.shadow.offset.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.shadowOffsetX = 1;
+ctx.shadowOffsetY = 2;
+ctx.shadowOffsetX = Infinity;
+ctx.shadowOffsetY = Infinity;
+_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1");
+_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2");
+
+ctx.shadowOffsetX = 1;
+ctx.shadowOffsetY = 2;
+ctx.shadowOffsetX = -Infinity;
+ctx.shadowOffsetY = -Infinity;
+_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1");
+_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2");
+
+ctx.shadowOffsetX = 1;
+ctx.shadowOffsetY = 2;
+ctx.shadowOffsetX = NaN;
+ctx.shadowOffsetY = NaN;
+_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1");
+_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.valid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.valid.html
new file mode 100644 (file)
index 0000000..396c710
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.attributes.shadowOffset.valid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowOffset.html">shadowOffset</a>.valid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.offset.get">2d.shadow.offset.get</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.offset.set">2d.shadow.offset.set</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.shadowOffsetX = 1;
+ctx.shadowOffsetY = 2;
+_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1");
+_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2");
+
+ctx.shadowOffsetX = 0.5;
+ctx.shadowOffsetY = 0.25;
+_assertSame(ctx.shadowOffsetX, 0.5, "ctx.shadowOffsetX", "0.5");
+_assertSame(ctx.shadowOffsetY, 0.25, "ctx.shadowOffsetY", "0.25");
+
+ctx.shadowOffsetX = -0.5;
+ctx.shadowOffsetY = -0.25;
+_assertSame(ctx.shadowOffsetX, -0.5, "ctx.shadowOffsetX", "-0.5");
+_assertSame(ctx.shadowOffsetY, -0.25, "ctx.shadowOffsetY", "-0.25");
+
+ctx.shadowOffsetX = 0;
+ctx.shadowOffsetY = 0;
+_assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0");
+_assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0");
+
+ctx.shadowOffsetX = 1e6;
+ctx.shadowOffsetY = 1e6;
+_assertSame(ctx.shadowOffsetX, 1e6, "ctx.shadowOffsetX", "1e6");
+_assertSame(ctx.shadowOffsetY, 1e6, "ctx.shadowOffsetY", "1e6");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.blur.high.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.blur.high.html
new file mode 100644 (file)
index 0000000..8e2d7f3
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.blur.high</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.blur.html">blur</a>.high</h1>
+<p class="desc">Shadows look correct for large blurs</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.shadow.blur.high.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#ff0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#00f';
+ctx.shadowOffsetY = 0;
+ctx.shadowBlur = 100;
+ctx.fillRect(-200, -200, 200, 400);
+_requireManualCheck();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.blur.high.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.blur.high.png
new file mode 100644 (file)
index 0000000..9b4ec67
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.blur.high.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.alpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.alpha.html
new file mode 100644 (file)
index 0000000..d015093
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.canvas.alpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.canvas.html">canvas</a>.alpha</h1>
+<p class="desc">Shadows are drawn correctly for partially-transparent canvases</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.shadow.canvas.alpha.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = 'rgba(255, 0, 0, 0.5)';
+ctx2.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#00f';
+ctx.drawImage(canvas2, 0, -50);
+
+_assertPixelApprox(canvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2);
+
+
+});
+</script>
+<img src="../images/transparent50.png" id="transparent50.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.alpha.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.alpha.png
new file mode 100644 (file)
index 0000000..d723a2c
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.alpha.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.basic.html
new file mode 100644 (file)
index 0000000..d9011c3
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.canvas.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.canvas.html">canvas</a>.basic</h1>
+<p class="desc">Shadows are drawn for canvases</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#f00';
+ctx2.fillRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetY = 50;
+ctx.drawImage(canvas2, 0, -50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.1.html
new file mode 100644 (file)
index 0000000..6a80a9a
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.canvas.transparent.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.canvas.html">canvas</a>.<a href="index.2d.shadow.canvas.transparent.html">transparent</a>.1</h1>
+<p class="desc">Shadows are not drawn for transparent canvases</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#f00';
+ctx.shadowOffsetY = 50;
+ctx.drawImage(canvas2, 0, -50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.2.html
new file mode 100644 (file)
index 0000000..65ea492
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.canvas.transparent.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.canvas.html">canvas</a>.<a href="index.2d.shadow.canvas.transparent.html">transparent</a>.2</h1>
+<p class="desc">Shadows are not drawn for transparent parts of canvases</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#f00';
+ctx2.fillRect(0, 0, 50, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(50, 0, 50, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#0f0';
+ctx.drawImage(canvas2, 50, -50);
+ctx.shadowColor = '#f00';
+ctx.drawImage(canvas2, -50, -50);
+
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.1.html
new file mode 100644 (file)
index 0000000..3a2665e
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.clip.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.clip.html">clip</a>.1</h1>
+<p class="desc">Shadows of clipped shapes are still drawn within the clipping region</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(50, 0, 50, 50);
+
+ctx.save();
+ctx.beginPath();
+ctx.rect(50, 0, 50, 50);
+ctx.clip();
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetX = 50;
+ctx.fillRect(0, 0, 50, 50);
+ctx.restore();
+
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.2.html
new file mode 100644 (file)
index 0000000..fe2e205
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.clip.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.clip.html">clip</a>.2</h1>
+<p class="desc">Shadows are not drawn outside the clipping region</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(50, 0, 50, 50);
+
+ctx.save();
+ctx.beginPath();
+ctx.rect(0, 0, 50, 50);
+ctx.clip();
+ctx.shadowColor = '#f00';
+ctx.shadowOffsetX = 50;
+ctx.fillRect(0, 0, 50, 50);
+ctx.restore();
+
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.3.html
new file mode 100644 (file)
index 0000000..e3f2cd6
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.clip.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.clip.html">clip</a>.3</h1>
+<p class="desc">Shadows of clipped shapes are still drawn within the clipping region</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(50, 0, 50, 50);
+
+ctx.save();
+ctx.beginPath();
+ctx.rect(0, 0, 50, 50);
+ctx.clip();
+ctx.fillStyle = '#f00';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetX = 50;
+ctx.fillRect(-50, 0, 50, 50);
+ctx.restore();
+
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.1.html
new file mode 100644 (file)
index 0000000..7010064
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.composite.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.composite.html">composite</a>.1</h1>
+<p class="desc">Shadows are drawn using globalCompositeOperation</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.shadowColor = '#f00';
+ctx.shadowOffsetX = 100;
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, 0, 200, 50);
+
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.2.html
new file mode 100644 (file)
index 0000000..dd73f76
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.composite.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.composite.html">composite</a>.2</h1>
+<p class="desc">Shadows are drawn using globalCompositeOperation</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.shadowColor = '#f00';
+ctx.shadowBlur = 1;
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-10, -10, 120, 70);
+
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.3.html
new file mode 100644 (file)
index 0000000..7f89965
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.composite.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.composite.html">composite</a>.3</h1>
+<p class="desc">Areas outside shadows are drawn correctly with destination-out</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.shadowColor = '#f00';
+ctx.shadowBlur = 10;
+ctx.fillStyle = '#f00';
+ctx.fillRect(200, 0, 100, 50);
+
+_assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.blur.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.blur.html
new file mode 100644 (file)
index 0000000..188f4fa
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.enable.blur</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.enable.html">enable</a>.blur</h1>
+<p class="desc">Shadows are drawn if shadowBlur is set</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.enable">2d.shadow.enable</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.shadowColor = '#0f0';
+ctx.shadowBlur = 0.1;
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.1.html
new file mode 100644 (file)
index 0000000..3539ec5
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.enable.off.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.enable.html">enable</a>.<a href="index.2d.shadow.enable.off.html">off</a>.1</h1>
+<p class="desc">Shadows are not drawn when only shadowColor is set</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.enable">2d.shadow.enable</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.shadowColor = '#f00';
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.2.html
new file mode 100644 (file)
index 0000000..c125b97
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.enable.off.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.enable.html">enable</a>.<a href="index.2d.shadow.enable.off.html">off</a>.2</h1>
+<p class="desc">Shadows are not drawn when only shadowColor is set</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.enable">2d.shadow.enable</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.shadowColor = '#f00';
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.x.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.x.html
new file mode 100644 (file)
index 0000000..ffb336b
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.enable.x</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.enable.html">enable</a>.x</h1>
+<p class="desc">Shadows are drawn if shadowOffsetX is set</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.enable">2d.shadow.enable</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetX = 0.1;
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.y.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.y.html
new file mode 100644 (file)
index 0000000..ce5a18d
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.enable.y</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.enable.html">enable</a>.y</h1>
+<p class="desc">Shadows are drawn if shadowOffsetY is set</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.enable">2d.shadow.enable</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetY = 0.1;
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.alpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.alpha.html
new file mode 100644 (file)
index 0000000..6864d3e
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.gradient.alpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.gradient.html">gradient</a>.alpha</h1>
+<p class="desc">Shadows are drawn correctly for partially-transparent gradient fills</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.shadow.gradient.alpha.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var gradient = ctx.createLinearGradient(0, 0, 100, 0);
+gradient.addColorStop(0, 'rgba(255,0,0,0.5)');
+gradient.addColorStop(1, 'rgba(255,0,0,0.5)');
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#00f';
+ctx.fillStyle = gradient;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixelApprox(canvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.alpha.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.alpha.png
new file mode 100644 (file)
index 0000000..d723a2c
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.alpha.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.basic.html
new file mode 100644 (file)
index 0000000..fb2547c
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.gradient.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.gradient.html">gradient</a>.basic</h1>
+<p class="desc">Shadows are drawn for gradient fills</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var gradient = ctx.createLinearGradient(0, 0, 100, 0);
+gradient.addColorStop(0, '#f00');
+gradient.addColorStop(1, '#f00');
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetY = 50;
+ctx.fillStyle = gradient;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.1.html
new file mode 100644 (file)
index 0000000..35897db
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.gradient.transparent.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.gradient.html">gradient</a>.<a href="index.2d.shadow.gradient.transparent.html">transparent</a>.1</h1>
+<p class="desc">Shadows are not drawn for transparent gradient fills</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var gradient = ctx.createLinearGradient(0, 0, 100, 0);
+gradient.addColorStop(0, 'rgba(0,0,0,0)');
+gradient.addColorStop(1, 'rgba(0,0,0,0)');
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#f00';
+ctx.shadowOffsetY = 50;
+ctx.fillStyle = gradient;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.2.html
new file mode 100644 (file)
index 0000000..8d4ac42
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.gradient.transparent.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.gradient.html">gradient</a>.<a href="index.2d.shadow.gradient.transparent.html">transparent</a>.2</h1>
+<p class="desc">Shadows are not drawn for transparent parts of gradient fills</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var gradient = ctx.createLinearGradient(0, 0, 100, 0);
+gradient.addColorStop(0, '#f00');
+gradient.addColorStop(0.499, '#f00');
+gradient.addColorStop(0.5, 'rgba(0,0,0,0)');
+gradient.addColorStop(1, 'rgba(0,0,0,0)');
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(50, 0, 50, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#0f0';
+ctx.fillStyle = gradient;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.alpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.alpha.html
new file mode 100644 (file)
index 0000000..c9be70e
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.image.alpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.image.html">image</a>.alpha</h1>
+<p class="desc">Shadows are drawn correctly for partially-transparent images</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.shadow.image.alpha.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#00f';
+ctx.drawImage(document.getElementById('transparent50.png'), 0, -50);
+
+_assertPixelApprox(canvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2);
+
+
+});
+</script>
+<img src="../images/transparent50.png" id="transparent50.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.alpha.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.alpha.png
new file mode 100644 (file)
index 0000000..d723a2c
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.alpha.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.basic.html
new file mode 100644 (file)
index 0000000..43fc3ba
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.image.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.image.html">image</a>.basic</h1>
+<p class="desc">Shadows are drawn for images</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetY = 50;
+ctx.drawImage(document.getElementById('red.png'), 0, -50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.scale.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.scale.html
new file mode 100644 (file)
index 0000000..cdf62a4
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.image.scale</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.image.html">image</a>.scale</h1>
+<p class="desc">Shadows are drawn correctly for scaled images</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#0f0';
+ctx.drawImage(document.getElementById('redtransparent.png'), 0, 0, 100, 50, -10, -50, 240, 50);
+
+_assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/redtransparent.png" id="redtransparent.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.section.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.section.html
new file mode 100644 (file)
index 0000000..0e78945
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.image.section</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.image.html">image</a>.section</h1>
+<p class="desc">Shadows are not drawn for areas outside image source rectangles</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#f00';
+ctx.drawImage(document.getElementById('redtransparent.png'), 50, 0, 50, 50, 0, -50, 50, 50);
+
+_assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+_assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+
+
+});
+</script>
+<img src="../images/redtransparent.png" id="redtransparent.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.1.html
new file mode 100644 (file)
index 0000000..43fd248
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.image.transparent.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.image.html">image</a>.<a href="index.2d.shadow.image.transparent.html">transparent</a>.1</h1>
+<p class="desc">Shadows are not drawn for transparent images</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#f00';
+ctx.shadowOffsetY = 50;
+ctx.drawImage(document.getElementById('transparent.png'), 0, -50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/transparent.png" id="transparent.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.2.html
new file mode 100644 (file)
index 0000000..f1a95a7
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.image.transparent.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.image.html">image</a>.<a href="index.2d.shadow.image.transparent.html">transparent</a>.2</h1>
+<p class="desc">Shadows are not drawn for transparent parts of images</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(50, 0, 50, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#0f0';
+ctx.drawImage(document.getElementById('redtransparent.png'), 50, -50);
+ctx.shadowColor = '#f00';
+ctx.drawImage(document.getElementById('redtransparent.png'), -50, -50);
+
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/redtransparent.png" id="redtransparent.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeX.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeX.html
new file mode 100644 (file)
index 0000000..573a683
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.offset.negativeX</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.offset.html">offset</a>.negativeX</h1>
+<p class="desc">Shadows can be offset with negative x</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetX = -50;
+ctx.fillRect(50, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeY.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeY.html
new file mode 100644 (file)
index 0000000..3081f63
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.offset.negativeY</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.offset.html">offset</a>.negativeY</h1>
+<p class="desc">Shadows can be offset with negative y</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetY = -25;
+ctx.fillRect(0, 25, 100, 25);
+_assertPixel(canvas, 50,12, 0,255,0,255, "50,12", "0,255,0,255");
+_assertPixel(canvas, 50,37, 0,255,0,255, "50,37", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveX.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveX.html
new file mode 100644 (file)
index 0000000..838c5dc
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.offset.positiveX</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.offset.html">offset</a>.positiveX</h1>
+<p class="desc">Shadows can be offset with positive x</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetX = 50;
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveY.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveY.html
new file mode 100644 (file)
index 0000000..074167d
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.offset.positiveY</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.offset.html">offset</a>.positiveY</h1>
+<p class="desc">Shadows can be offset with positive y</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetY = 25;
+ctx.fillRect(0, 0, 100, 25);
+_assertPixel(canvas, 50,12, 0,255,0,255, "50,12", "0,255,0,255");
+_assertPixel(canvas, 50,37, 0,255,0,255, "50,37", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.outside.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.outside.html
new file mode 100644 (file)
index 0000000..d106afe
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.outside</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.outside</h1>
+<p class="desc">Shadows of shapes outside the visible area can be offset onto the visible area</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetX = 100;
+ctx.fillRect(-100, 0, 25, 50);
+ctx.shadowOffsetX = -100;
+ctx.fillRect(175, 0, 25, 50);
+ctx.shadowOffsetX = 0;
+ctx.shadowOffsetY = 100;
+ctx.fillRect(25, -100, 50, 25);
+ctx.shadowOffsetY = -100;
+ctx.fillRect(25, 125, 50, 25);
+_assertPixel(canvas, 12,25, 0,255,0,255, "12,25", "0,255,0,255");
+_assertPixel(canvas, 87,25, 0,255,0,255, "87,25", "0,255,0,255");
+_assertPixel(canvas, 50,12, 0,255,0,255, "50,12", "0,255,0,255");
+_assertPixel(canvas, 50,37, 0,255,0,255, "50,37", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.alpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.alpha.html
new file mode 100644 (file)
index 0000000..d904236
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.pattern.alpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.pattern.html">pattern</a>.alpha</h1>
+<p class="desc">Shadows are drawn correctly for partially-transparent fill patterns</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.shadow.pattern.alpha.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var pattern = ctx.createPattern(document.getElementById('transparent50.png'), 'repeat');
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#00f';
+ctx.fillStyle = pattern;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixelApprox(canvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2);
+
+
+});
+</script>
+<img src="../images/transparent50.png" id="transparent50.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.alpha.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.alpha.png
new file mode 100644 (file)
index 0000000..d723a2c
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.alpha.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.basic.html
new file mode 100644 (file)
index 0000000..a3ca77a
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.pattern.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.pattern.html">pattern</a>.basic</h1>
+<p class="desc">Shadows are drawn for fill patterns</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var pattern = ctx.createPattern(document.getElementById('red.png'), 'repeat');
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetY = 50;
+ctx.fillStyle = pattern;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/red.png" id="red.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.1.html
new file mode 100644 (file)
index 0000000..a405ea7
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.pattern.transparent.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.pattern.html">pattern</a>.<a href="index.2d.shadow.pattern.transparent.html">transparent</a>.1</h1>
+<p class="desc">Shadows are not drawn for transparent fill patterns</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var pattern = ctx.createPattern(document.getElementById('transparent.png'), 'repeat');
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowColor = '#f00';
+ctx.shadowOffsetY = 50;
+ctx.fillStyle = pattern;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/transparent.png" id="transparent.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.2.html
new file mode 100644 (file)
index 0000000..e24e27b
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.pattern.transparent.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.pattern.html">pattern</a>.<a href="index.2d.shadow.pattern.transparent.html">transparent</a>.2</h1>
+<p class="desc">Shadows are not drawn for transparent parts of fill patterns</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var pattern = ctx.createPattern(document.getElementById('redtransparent.png'), 'repeat');
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(50, 0, 50, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#0f0';
+ctx.fillStyle = pattern;
+ctx.fillRect(0, -50, 100, 50);
+
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+<img src="../images/redtransparent.png" id="redtransparent.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.basic.html
new file mode 100644 (file)
index 0000000..a32ef4a
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.stroke.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.stroke.html">stroke</a>.basic</h1>
+<p class="desc">Shadows are drawn for strokes</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetY = 50;
+ctx.beginPath();
+ctx.lineWidth = 50;
+ctx.moveTo(0, -25);
+ctx.lineTo(100, -25);
+ctx.stroke();
+
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.1.html
new file mode 100644 (file)
index 0000000..87eca96
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.stroke.cap.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.stroke.html">stroke</a>.<a href="index.2d.shadow.stroke.cap.html">cap</a>.1</h1>
+<p class="desc">Shadows are not drawn for areas outside stroke caps</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.shadowColor = '#f00';
+ctx.shadowOffsetY = 50;
+ctx.beginPath();
+ctx.lineWidth = 50;
+ctx.lineCap = 'butt';
+ctx.moveTo(-50, -25);
+ctx.lineTo(0, -25);
+ctx.moveTo(100, -25);
+ctx.lineTo(150, -25);
+ctx.stroke();
+
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.2.html
new file mode 100644 (file)
index 0000000..d58cf74
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.stroke.cap.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.stroke.html">stroke</a>.<a href="index.2d.shadow.stroke.cap.html">cap</a>.2</h1>
+<p class="desc">Shadows are drawn for stroke caps</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetY = 50;
+ctx.beginPath();
+ctx.lineWidth = 50;
+ctx.lineCap = 'square';
+ctx.moveTo(25, -25);
+ctx.lineTo(75, -25);
+ctx.stroke();
+
+_assertPixel(canvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.1.html
new file mode 100644 (file)
index 0000000..84d1fe6
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.stroke.join.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.stroke.html">stroke</a>.<a href="index.2d.shadow.stroke.join.html">join</a>.1</h1>
+<p class="desc">Shadows are not drawn for areas outside stroke joins</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.shadowColor = '#f00';
+ctx.shadowOffsetX = 100;
+ctx.lineWidth = 200;
+ctx.lineJoin = 'bevel';
+ctx.beginPath();
+ctx.moveTo(-200, -50);
+ctx.lineTo(-150, -50);
+ctx.lineTo(-151, -100);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.2.html
new file mode 100644 (file)
index 0000000..edadeea
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.stroke.join.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.stroke.html">stroke</a>.<a href="index.2d.shadow.stroke.join.html">join</a>.2</h1>
+<p class="desc">Shadows are drawn for stroke joins</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(50, 0, 50, 50);
+ctx.strokeStyle = '#f00';
+ctx.shadowColor = '#0f0';
+ctx.shadowOffsetX = 100;
+ctx.lineWidth = 200;
+ctx.lineJoin = 'miter';
+ctx.beginPath();
+ctx.moveTo(-200, -50);
+ctx.lineTo(-150, -50);
+ctx.lineTo(-151, -100);
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.3.html
new file mode 100644 (file)
index 0000000..70988de
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.stroke.join.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.stroke.html">stroke</a>.<a href="index.2d.shadow.stroke.join.html">join</a>.3</h1>
+<p class="desc">Shadows are drawn for stroke joins respecting miter limit</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.shadowColor = '#f00';
+ctx.shadowOffsetX = 100;
+ctx.lineWidth = 200;
+ctx.lineJoin = 'miter';
+ctx.miterLimit = 0.1;
+ctx.beginPath();
+ctx.moveTo(-200, -50);
+ctx.lineTo(-150, -50);
+ctx.lineTo(-151, -100); // (not an exact right angle, to avoid some other bug in Firefox 3)
+ctx.stroke();
+
+_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
+_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.1.html
new file mode 100644 (file)
index 0000000..0942db4
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.transform.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.transform.html">transform</a>.1</h1>
+<p class="desc">Shadows take account of transformations</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#0f0';
+ctx.translate(100, 100);
+ctx.fillRect(-100, -150, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.2.html
new file mode 100644 (file)
index 0000000..6f697d1
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.shadow.transform.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.transform.html">transform</a>.2</h1>
+<p class="desc">Shadow offsets are not affected by transformations</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.shadow.render">2d.shadow.render</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.shadowOffsetY = 50;
+ctx.shadowColor = '#0f0';
+ctx.rotate(Math.PI)
+ctx.fillRect(-100, 0, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.bitmap.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.bitmap.html
new file mode 100644 (file)
index 0000000..d81157a
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.bitmap</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.bitmap</h1>
+<p class="desc">save()/restore() does not affect the current bitmap</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.bitmap">2d.state.bitmap</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.save();
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.restore();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.clip.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.clip.html
new file mode 100644 (file)
index 0000000..812c4a0
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.clip</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.clip</h1>
+<p class="desc">save()/restore() affects the clipping path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.clip">2d.state.clip</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.save();
+ctx.rect(0, 0, 1, 1);
+ctx.clip();
+ctx.restore();
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.fillStyle.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.fillStyle.html
new file mode 100644 (file)
index 0000000..1516963
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.fillStyle</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.fillStyle</h1>
+<p class="desc">save()/restore() works for fillStyle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.fillStyle">2d.state.fillStyle</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.fillStyle;
+ctx.save();
+ctx.fillStyle = "#ff0000";
+ctx.restore();
+_assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old");
+
+// Also test that save() doesn't modify the values
+ctx.fillStyle = "#ff0000";
+old = ctx.fillStyle;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against "#ff0000"
+ctx.save();
+_assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.font.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.font.html
new file mode 100644 (file)
index 0000000..1733ebc
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.font</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.font</h1>
+<p class="desc">save()/restore() works for font</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.font">2d.state.font</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.font;
+ctx.save();
+ctx.font = "25px serif";
+ctx.restore();
+_assertSame(ctx.font, old, "ctx.font", "old");
+
+// Also test that save() doesn't modify the values
+ctx.font = "25px serif";
+old = ctx.font;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against "25px serif"
+ctx.save();
+_assertSame(ctx.font, old, "ctx.font", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalAlpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalAlpha.html
new file mode 100644 (file)
index 0000000..c6bbf7d
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.globalAlpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.globalAlpha</h1>
+<p class="desc">save()/restore() works for globalAlpha</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.globalAlpha">2d.state.globalAlpha</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.globalAlpha;
+ctx.save();
+ctx.globalAlpha = 0.5;
+ctx.restore();
+_assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old");
+
+// Also test that save() doesn't modify the values
+ctx.globalAlpha = 0.5;
+old = ctx.globalAlpha;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against 0.5
+ctx.save();
+_assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalCompositeOperation.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalCompositeOperation.html
new file mode 100644 (file)
index 0000000..0275e60
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.globalCompositeOperation</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.globalCompositeOperation</h1>
+<p class="desc">save()/restore() works for globalCompositeOperation</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.globalCompositeOperation">2d.state.globalCompositeOperation</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.globalCompositeOperation;
+ctx.save();
+ctx.globalCompositeOperation = "copy";
+ctx.restore();
+_assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old");
+
+// Also test that save() doesn't modify the values
+ctx.globalCompositeOperation = "copy";
+old = ctx.globalCompositeOperation;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against "copy"
+ctx.save();
+_assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineCap.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineCap.html
new file mode 100644 (file)
index 0000000..253fc9e
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.lineCap</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.lineCap</h1>
+<p class="desc">save()/restore() works for lineCap</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.lineCap">2d.state.lineCap</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.lineCap;
+ctx.save();
+ctx.lineCap = "round";
+ctx.restore();
+_assertSame(ctx.lineCap, old, "ctx.lineCap", "old");
+
+// Also test that save() doesn't modify the values
+ctx.lineCap = "round";
+old = ctx.lineCap;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against "round"
+ctx.save();
+_assertSame(ctx.lineCap, old, "ctx.lineCap", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineJoin.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineJoin.html
new file mode 100644 (file)
index 0000000..23fefd2
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.lineJoin</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.lineJoin</h1>
+<p class="desc">save()/restore() works for lineJoin</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.lineJoin">2d.state.lineJoin</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.lineJoin;
+ctx.save();
+ctx.lineJoin = "round";
+ctx.restore();
+_assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old");
+
+// Also test that save() doesn't modify the values
+ctx.lineJoin = "round";
+old = ctx.lineJoin;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against "round"
+ctx.save();
+_assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineWidth.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineWidth.html
new file mode 100644 (file)
index 0000000..7792c2e
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.lineWidth</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.lineWidth</h1>
+<p class="desc">save()/restore() works for lineWidth</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.lineWidth">2d.state.lineWidth</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.lineWidth;
+ctx.save();
+ctx.lineWidth = 0.5;
+ctx.restore();
+_assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old");
+
+// Also test that save() doesn't modify the values
+ctx.lineWidth = 0.5;
+old = ctx.lineWidth;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against 0.5
+ctx.save();
+_assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.miterLimit.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.miterLimit.html
new file mode 100644 (file)
index 0000000..599efb2
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.miterLimit</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.miterLimit</h1>
+<p class="desc">save()/restore() works for miterLimit</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.miterLimit">2d.state.miterLimit</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.miterLimit;
+ctx.save();
+ctx.miterLimit = 0.5;
+ctx.restore();
+_assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old");
+
+// Also test that save() doesn't modify the values
+ctx.miterLimit = 0.5;
+old = ctx.miterLimit;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against 0.5
+ctx.save();
+_assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.path.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.path.html
new file mode 100644 (file)
index 0000000..4d686b7
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.path</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.path</h1>
+<p class="desc">save()/restore() does not affect the current path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.path">2d.state.path</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.save();
+ctx.rect(0, 0, 100, 50);
+ctx.restore();
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowBlur.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowBlur.html
new file mode 100644 (file)
index 0000000..5f99314
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.shadowBlur</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.shadowBlur</h1>
+<p class="desc">save()/restore() works for shadowBlur</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.shadowBlur">2d.state.shadowBlur</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.shadowBlur;
+ctx.save();
+ctx.shadowBlur = 5;
+ctx.restore();
+_assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old");
+
+// Also test that save() doesn't modify the values
+ctx.shadowBlur = 5;
+old = ctx.shadowBlur;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against 5
+ctx.save();
+_assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowColor.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowColor.html
new file mode 100644 (file)
index 0000000..5f7b8e7
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.shadowColor</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.shadowColor</h1>
+<p class="desc">save()/restore() works for shadowColor</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.shadowColor">2d.state.shadowColor</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.shadowColor;
+ctx.save();
+ctx.shadowColor = "#ff0000";
+ctx.restore();
+_assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old");
+
+// Also test that save() doesn't modify the values
+ctx.shadowColor = "#ff0000";
+old = ctx.shadowColor;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against "#ff0000"
+ctx.save();
+_assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetX.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetX.html
new file mode 100644 (file)
index 0000000..ed28fc5
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.shadowOffsetX</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.shadowOffsetX</h1>
+<p class="desc">save()/restore() works for shadowOffsetX</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.shadowOffsetX">2d.state.shadowOffsetX</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.shadowOffsetX;
+ctx.save();
+ctx.shadowOffsetX = 5;
+ctx.restore();
+_assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old");
+
+// Also test that save() doesn't modify the values
+ctx.shadowOffsetX = 5;
+old = ctx.shadowOffsetX;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against 5
+ctx.save();
+_assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetY.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetY.html
new file mode 100644 (file)
index 0000000..617947f
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.shadowOffsetY</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.shadowOffsetY</h1>
+<p class="desc">save()/restore() works for shadowOffsetY</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.shadowOffsetY">2d.state.shadowOffsetY</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.shadowOffsetY;
+ctx.save();
+ctx.shadowOffsetY = 5;
+ctx.restore();
+_assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old");
+
+// Also test that save() doesn't modify the values
+ctx.shadowOffsetY = 5;
+old = ctx.shadowOffsetY;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against 5
+ctx.save();
+_assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stack.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stack.html
new file mode 100644 (file)
index 0000000..87eebd9
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.stack</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.stack</h1>
+<p class="desc">save()/restore() can be nested as a stack</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.save">2d.state.save</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.restore">2d.state.restore</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.lineWidth = 1;
+ctx.save();
+ctx.lineWidth = 2;
+ctx.save();
+ctx.lineWidth = 3;
+_assertEqual(ctx.lineWidth, 3, "ctx.lineWidth", "3");
+ctx.restore();
+_assertEqual(ctx.lineWidth, 2, "ctx.lineWidth", "2");
+ctx.restore();
+_assertEqual(ctx.lineWidth, 1, "ctx.lineWidth", "1");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stackdepth.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stackdepth.html
new file mode 100644 (file)
index 0000000..1135332
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.stackdepth</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.stackdepth</h1>
+<p class="desc">save()/restore() stack depth is not unreasonably limited</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.save">2d.state.save</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.restore">2d.state.restore</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var limit = 512;
+for (var i = 1; i < limit; ++i)
+{
+    ctx.save();
+    ctx.lineWidth = i;
+}
+for (var i = limit-1; i > 0; --i)
+{
+    _assertEqual(ctx.lineWidth, i, "ctx.lineWidth", "i");
+    ctx.restore();
+}
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.strokeStyle.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.strokeStyle.html
new file mode 100644 (file)
index 0000000..8178231
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.strokeStyle</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.strokeStyle</h1>
+<p class="desc">save()/restore() works for strokeStyle</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.strokeStyle">2d.state.strokeStyle</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.strokeStyle;
+ctx.save();
+ctx.strokeStyle = "#ff0000";
+ctx.restore();
+_assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old");
+
+// Also test that save() doesn't modify the values
+ctx.strokeStyle = "#ff0000";
+old = ctx.strokeStyle;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against "#ff0000"
+ctx.save();
+_assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textAlign.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textAlign.html
new file mode 100644 (file)
index 0000000..c3b1329
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.textAlign</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.textAlign</h1>
+<p class="desc">save()/restore() works for textAlign</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.textAlign">2d.state.textAlign</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.textAlign;
+ctx.save();
+ctx.textAlign = "center";
+ctx.restore();
+_assertSame(ctx.textAlign, old, "ctx.textAlign", "old");
+
+// Also test that save() doesn't modify the values
+ctx.textAlign = "center";
+old = ctx.textAlign;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against "center"
+ctx.save();
+_assertSame(ctx.textAlign, old, "ctx.textAlign", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textBaseline.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textBaseline.html
new file mode 100644 (file)
index 0000000..e441f20
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.textBaseline</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.textBaseline</h1>
+<p class="desc">save()/restore() works for textBaseline</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.textBaseline">2d.state.textBaseline</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Test that restore() undoes any modifications
+var old = ctx.textBaseline;
+ctx.save();
+ctx.textBaseline = "bottom";
+ctx.restore();
+_assertSame(ctx.textBaseline, old, "ctx.textBaseline", "old");
+
+// Also test that save() doesn't modify the values
+ctx.textBaseline = "bottom";
+old = ctx.textBaseline;
+    // we're not interested in failures caused by get(set(x)) != x (e.g.
+    // from rounding), so compare against 'old' instead of against "bottom"
+ctx.save();
+_assertSame(ctx.textBaseline, old, "ctx.textBaseline", "old");
+ctx.restore();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.transformation.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.transformation.html
new file mode 100644 (file)
index 0000000..77f8edf
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.transformation</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.transformation</h1>
+<p class="desc">save()/restore() affects the current transformation matrix</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.transformation">2d.state.transformation</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.save();
+ctx.translate(200, 0);
+ctx.restore();
+ctx.fillStyle = '#f00';
+ctx.fillRect(-200, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.underflow.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.underflow.html
new file mode 100644 (file)
index 0000000..60b766b
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.state.saverestore.underflow</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.state.html">state</a>.<a href="index.2d.state.saverestore.html">saverestore</a>.underflow</h1>
+<p class="desc">restore() with an empty stack has no effect</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.state.restore.underflow">2d.state.restore.underflow</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+for (var i = 0; i < 16; ++i)
+    ctx.restore();
+ctx.lineWidth = 0.5;
+ctx.restore();
+_assertEqual(ctx.lineWidth, 0.5, "ctx.lineWidth", "0.5");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.basic.html
new file mode 100644 (file)
index 0000000..477f5cc
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.basic</h1>
+<p class="desc">strokeRect works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.strokeRect(25, 24, 50, 2);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.clip.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.clip.html
new file mode 100644 (file)
index 0000000..df1f006
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.clip</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.clip</h1>
+<p class="desc">strokeRect is affected by clipping regions</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.beginPath();
+ctx.rect(0, 0, 16, 16);
+ctx.clip();
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.strokeRect(0, 0, 100, 50);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 16, 16);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalalpha.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalalpha.html
new file mode 100644 (file)
index 0000000..6d17b99
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.globalalpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.globalalpha</h1>
+<p class="desc">strokeRect is affected by globalAlpha</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalAlpha = 0;
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.strokeRect(25, 24, 50, 2);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalcomposite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalcomposite.html
new file mode 100644 (file)
index 0000000..ec94f2f
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.globalcomposite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.globalcomposite</h1>
+<p class="desc">strokeRect is not affected by globalCompositeOperation</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.globalCompositeOperation = 'source-in';
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.strokeRect(25, 24, 50, 2);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.negative.html
new file mode 100644 (file)
index 0000000..1a57e69
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.negative</h1>
+<p class="desc">strokeRect of negative sizes works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 25;
+ctx.strokeRect(12, 12, 26, 1);
+ctx.strokeRect(88, 12, -26, 1);
+ctx.strokeRect(12, 38, 26, -1);
+ctx.strokeRect(88, 38, -26, -1);
+_assertPixel(canvas, 25,12, 0,255,0,255, "25,12", "0,255,0,255");
+_assertPixel(canvas, 75,12, 0,255,0,255, "75,12", "0,255,0,255");
+_assertPixel(canvas, 25,37, 0,255,0,255, "25,37", "0,255,0,255");
+_assertPixel(canvas, 75,37, 0,255,0,255, "75,37", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.nonfinite.html
new file mode 100644 (file)
index 0000000..8789a8a
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.nonfinite</h1>
+<p class="desc">strokeRect() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 150;
+ctx.strokeRect(Infinity, 0, 100, 50);
+ctx.strokeRect(-Infinity, 0, 100, 50);
+ctx.strokeRect(NaN, 0, 100, 50);
+ctx.strokeRect(0, Infinity, 100, 50);
+ctx.strokeRect(0, -Infinity, 100, 50);
+ctx.strokeRect(0, NaN, 100, 50);
+ctx.strokeRect(0, 0, Infinity, 50);
+ctx.strokeRect(0, 0, -Infinity, 50);
+ctx.strokeRect(0, 0, NaN, 50);
+ctx.strokeRect(0, 0, 100, Infinity);
+ctx.strokeRect(0, 0, 100, -Infinity);
+ctx.strokeRect(0, 0, 100, NaN);
+ctx.strokeRect(Infinity, Infinity, 100, 50);
+ctx.strokeRect(Infinity, Infinity, Infinity, 50);
+ctx.strokeRect(Infinity, Infinity, Infinity, Infinity);
+ctx.strokeRect(Infinity, Infinity, 100, Infinity);
+ctx.strokeRect(Infinity, 0, Infinity, 50);
+ctx.strokeRect(Infinity, 0, Infinity, Infinity);
+ctx.strokeRect(Infinity, 0, 100, Infinity);
+ctx.strokeRect(0, Infinity, Infinity, 50);
+ctx.strokeRect(0, Infinity, Infinity, Infinity);
+ctx.strokeRect(0, Infinity, 100, Infinity);
+ctx.strokeRect(0, 0, Infinity, Infinity);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.path.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.path.html
new file mode 100644 (file)
index 0000000..3cc5edc
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.path</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.path</h1>
+<p class="desc">strokeRect does not affect the current path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.beginPath();
+ctx.rect(0, 0, 100, 50);
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 5;
+ctx.strokeRect(0, 0, 16, 16);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.shadow.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.shadow.html
new file mode 100644 (file)
index 0000000..9607b59
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.shadow</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.shadow</h1>
+<p class="desc">strokeRect draws shadows</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.shadowColor = '#0f0';
+ctx.shadowBlur = 0;
+ctx.shadowOffsetX = 0;
+ctx.shadowOffsetY = 50;
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 50;
+ctx.strokeRect(0, -75, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.transform.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.transform.html
new file mode 100644 (file)
index 0000000..fc81a19
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.transform</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.transform</h1>
+<p class="desc">fillRect is affected by transforms</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.scale(10, 10);
+ctx.translate(0, 5);
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 5;
+ctx.strokeRect(2.5, -2.6, 5, 0.2);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.1.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.1.html
new file mode 100644 (file)
index 0000000..bf93699
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.zero.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.<a href="index.2d.strokeRect.zero.html">zero</a>.1</h1>
+<p class="desc">strokeRect of 0x0 pixels draws nothing</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 250;
+ctx.strokeRect(50, 25, 0, 0);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.2.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.2.html
new file mode 100644 (file)
index 0000000..11fabe9
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.zero.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.<a href="index.2d.strokeRect.zero.html">zero</a>.2</h1>
+<p class="desc">strokeRect of 0x0 pixels draws nothing, including caps and joins</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 250;
+ctx.lineCap = 'round';
+ctx.lineJoin = 'round';
+ctx.strokeRect(50, 25, 0, 0);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.3.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.3.html
new file mode 100644 (file)
index 0000000..9b4364a
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.zero.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.<a href="index.2d.strokeRect.zero.html">zero</a>.3</h1>
+<p class="desc">strokeRect of Nx0 pixels draws a straight line</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 50;
+ctx.strokeRect(0, 25, 100, 0);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.4.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.4.html
new file mode 100644 (file)
index 0000000..f11cbdd
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.zero.4</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.<a href="index.2d.strokeRect.zero.html">zero</a>.4</h1>
+<p class="desc">strokeRect of Nx0 pixels draws a closed line with no caps</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="clear-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.strokeStyle = '#f00';
+ctx.lineWidth = 250;
+ctx.lineCap = 'round';
+ctx.strokeRect(100, 25, 100, 0);
+_assertPixel(canvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.5.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.5.html
new file mode 100644 (file)
index 0000000..2c4e532
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeRect.zero.5</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeRect.html">strokeRect</a>.<a href="index.2d.strokeRect.zero.html">zero</a>.5</h1>
+<p class="desc">strokeRect of Nx0 pixels draws a closed line with joins</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.strokeRect">2d.strokeRect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 250;
+ctx.lineJoin = 'round';
+ctx.strokeRect(100, 25, 100, 0);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeStyle.default.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.strokeStyle.default.html
new file mode 100644 (file)
index 0000000..2152134
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.strokeStyle.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.strokeStyle.html">strokeStyle</a>.default</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.default">2d.colours.default</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertEqual(ctx.strokeStyle, '#000000', "ctx.strokeStyle", "'#000000'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.align.default.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.align.default.html
new file mode 100644 (file)
index 0000000..d10224e
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.align.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.align.html">align</a>.default</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.default">2d.text.align.default</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.align.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.align.invalid.html
new file mode 100644 (file)
index 0000000..8c6ac72
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.align.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.align.html">align</a>.invalid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.invalid">2d.text.align.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'bogus';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'END';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end ';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end\0';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.align.valid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.align.valid.html
new file mode 100644 (file)
index 0000000..a4f00f9
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.align.valid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.align.html">align</a>.valid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.get">2d.text.align.get</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.set">2d.text.align.set</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.textAlign = 'start';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'end';
+_assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'");
+
+ctx.textAlign = 'left';
+_assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'");
+
+ctx.textAlign = 'right';
+_assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'");
+
+ctx.textAlign = 'center';
+_assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.default.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.default.html
new file mode 100644 (file)
index 0000000..c37a4e0
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.baseline.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.baseline.html">baseline</a>.default</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.baseline.default">2d.text.baseline.default</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.invalid.html
new file mode 100644 (file)
index 0000000..2709ad2
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.baseline.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.baseline.html">baseline</a>.invalid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.baseline.invalid">2d.text.baseline.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'bogus';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'MIDDLE';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle ';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle\0';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.valid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.valid.html
new file mode 100644 (file)
index 0000000..ab0ffde
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.baseline.valid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.baseline.html">baseline</a>.valid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.baseline.get">2d.text.baseline.get</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.baseline.set">2d.text.baseline.set</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.textBaseline = 'top';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'hanging';
+_assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'");
+
+ctx.textBaseline = 'middle';
+_assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'");
+
+ctx.textBaseline = 'alphabetic';
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+ctx.textBaseline = 'ideographic';
+_assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'");
+
+ctx.textBaseline = 'bottom';
+_assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.center.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.center.html
new file mode 100644 (file)
index 0000000..dcfc5c8
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.align.center</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.align.html">align</a>.center</h1>
+<p class="desc">textAlign center is the center of the em squares (not the bounding box)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.center">2d.text.align.center</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<div id="log"></div>
+<script>
+var t = async_test(document.title, {timeout: 3000});
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'center';
+    ctx.fillText('DD', 50, 37.5);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+
+});
+setTimeout(function(){
+    t.step(function() {
+        assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+    });
+    t.done();
+}, 1500);
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.ltr.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.ltr.html
new file mode 100644 (file)
index 0000000..266e9ce
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.align.end.ltr</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.align.html">align</a>.<a href="index.2d.text.draw.align.end.html">end</a>.ltr</h1>
+<p class="desc">textAlign end with ltr is the right edge</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.right">2d.text.align.right</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50" dir="ltr"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<div id="log"></div>
+<script>
+var t = async_test(document.title, {timeout: 3000});
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'end';
+    ctx.fillText('DD', 100, 37.5);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+
+});
+setTimeout(function(){
+    t.step(function() {
+        assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+    });
+    t.done();
+}, 1500);
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.rtl.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.rtl.html
new file mode 100644 (file)
index 0000000..739ede7
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.align.end.rtl</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.align.html">align</a>.<a href="index.2d.text.draw.align.end.html">end</a>.rtl</h1>
+<p class="desc">textAlign end with rtl is the left edge</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.left">2d.text.align.left</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.direction">2d.text.draw.direction</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50" dir="rtl"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<div id="log"></div>
+<script>
+var t = async_test(document.title, {timeout: 3000});
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'end';
+    ctx.fillText('DD', 0, 37.5);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+
+});
+setTimeout(function(){
+    t.step(function() {
+        assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+    });
+    t.done();
+}, 1500);
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.left.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.left.html
new file mode 100644 (file)
index 0000000..3a67c9a
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.align.left</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.align.html">align</a>.left</h1>
+<p class="desc">textAlign left is the left of the first em square (not the bounding box)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.left">2d.text.align.left</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<div id="log"></div>
+<script>
+var t = async_test(document.title, {timeout: 3000});
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'left';
+    ctx.fillText('DD', 0, 37.5);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+
+});
+setTimeout(function(){
+    t.step(function() {
+        assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+    });
+    t.done();
+}, 1500);
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.right.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.right.html
new file mode 100644 (file)
index 0000000..c1c4497
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.align.right</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.align.html">align</a>.right</h1>
+<p class="desc">textAlign right is the right of the last em square (not the bounding box)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.right">2d.text.align.right</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<div id="log"></div>
+<script>
+var t = async_test(document.title, {timeout: 3000});
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'right';
+    ctx.fillText('DD', 100, 37.5);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+
+});
+setTimeout(function(){
+    t.step(function() {
+        assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+    });
+    t.done();
+}, 1500);
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.ltr.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.ltr.html
new file mode 100644 (file)
index 0000000..43d00ef
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.align.start.ltr</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.align.html">align</a>.<a href="index.2d.text.draw.align.start.html">start</a>.ltr</h1>
+<p class="desc">textAlign start with ltr is the left edge</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.left">2d.text.align.left</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50" dir="ltr"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<div id="log"></div>
+<script>
+var t = async_test(document.title, {timeout: 3000});
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'start';
+    ctx.fillText('DD', 0, 37.5);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+
+});
+setTimeout(function(){
+    t.step(function() {
+        assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+    });
+    t.done();
+}, 1500);
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.rtl.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.rtl.html
new file mode 100644 (file)
index 0000000..85ca08b
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.align.start.rtl</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.align.html">align</a>.<a href="index.2d.text.draw.align.start.html">start</a>.rtl</h1>
+<p class="desc">textAlign start with rtl is the right edge</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.align.right">2d.text.align.right</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.direction">2d.text.draw.direction</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50" dir="rtl"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<div id="log"></div>
+<script>
+var t = async_test(document.title, {timeout: 3000});
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textAlign = 'start';
+    ctx.fillText('DD', 100, 37.5);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+
+});
+setTimeout(function(){
+    t.step(function() {
+        assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+    });
+    t.done();
+}, 1500);
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.baseline.alphabetic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.baseline.alphabetic.html
new file mode 100644 (file)
index 0000000..0ef4f77
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.baseline.alphabetic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.baseline.html">baseline</a>.alphabetic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.baseline.alphabetic">2d.text.baseline.alphabetic</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.textBaseline = 'alphabetic';
+    ctx.fillText('CC', 0, 37.5);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.basic.html
new file mode 100644 (file)
index 0000000..1534740
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fill.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.fill.html">fill</a>.basic</h1>
+<p class="desc">fillText draws filled text</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw">2d.text.draw</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.fill">2d.text.draw.fill</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.text.draw.fill.basic.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35);
+_requireManualCheck();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.basic.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.basic.png
new file mode 100644 (file)
index 0000000..2c2b557
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.basic.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.bound.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.bound.html
new file mode 100644 (file)
index 0000000..c8b7717
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fill.maxWidth.bound</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.fill.html">fill</a>.<a href="index.2d.text.draw.fill.maxWidth.html">maxWidth</a>.bound</h1>
+<p class="desc">fillText handles maxWidth based on line size, not bounding box size</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.maxwidth">2d.text.draw.maxwidth</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('DD', 0, 37.5, 100);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.fontface.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.fontface.html
new file mode 100644 (file)
index 0000000..1cdd498
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fill.maxWidth.fontface</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.fill.html">fill</a>.<a href="index.2d.text.draw.fill.maxWidth.html">maxWidth</a>.fontface</h1>
+<p class="desc">fillText works on @font-face fonts</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.maxwidth">2d.text.draw.maxwidth</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#0f0';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#f00';
+    ctx.fillText('EEEE', -50, 37.5, 40);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.large.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.large.html
new file mode 100644 (file)
index 0000000..0f48693
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fill.maxWidth.large</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.fill.html">fill</a>.<a href="index.2d.text.draw.fill.maxWidth.html">maxWidth</a>.large</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.maxwidth">2d.text.draw.maxwidth</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.text.draw.fill.maxWidth.large.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35, 200);
+_requireManualCheck();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.large.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.large.png
new file mode 100644 (file)
index 0000000..2c2b557
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.large.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.negative.html
new file mode 100644 (file)
index 0000000..17f6b57
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fill.maxWidth.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.text.draw.fill.maxWidth.negative</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, -1);
+_requireManualCheck();
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.small.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.small.html
new file mode 100644 (file)
index 0000000..2a3f863
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fill.maxWidth.small</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.fill.html">fill</a>.<a href="index.2d.text.draw.fill.maxWidth.html">maxWidth</a>.small</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.maxwidth">2d.text.draw.maxwidth</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', -100, 35, 90);
+_requireManualCheck();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.zero.html
new file mode 100644 (file)
index 0000000..42ded11
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fill.maxWidth.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.fill.html">fill</a>.<a href="index.2d.text.draw.fill.maxWidth.html">maxWidth</a>.zero</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.maxwidth">2d.text.draw.maxwidth</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, 0);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.rtl.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.rtl.html
new file mode 100644 (file)
index 0000000..885c4c8
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fill.rtl</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.fill.html">fill</a>.rtl</h1>
+<p class="desc">fillText respects Right-To-Left Override characters</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw">2d.text.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.text.draw.fill.rtl.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35);
+_requireManualCheck();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.rtl.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.rtl.png
new file mode 100644 (file)
index 0000000..2c2b557
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.rtl.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.unaffected.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.unaffected.html
new file mode 100644 (file)
index 0000000..26e25d7
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fill.unaffected</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.fill.html">fill</a>.unaffected</h1>
+<p class="desc">fillText does not start a new path or subpath</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.fill">2d.text.draw.fill</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.html
new file mode 100644 (file)
index 0000000..2eff96a
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fontface</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.fontface</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.fontface">2d.text.font.fontface</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = '67px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('AA', 0, 50);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.repeat.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.repeat.html
new file mode 100644 (file)
index 0000000..be9bf65
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.fontface.repeat</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.fontface.html">fontface</a>.repeat</h1>
+<p class="desc">Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.fontface">2d.text.font.fontface</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.font = '67px CanvasTest';
+ctx.fillStyle = '#0f0';
+ctx.fillText('AA', 0, 50);
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillText('AA', 0, 50);
+    _assertPixelApprox(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.kern.consistent.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.kern.consistent.html
new file mode 100644 (file)
index 0000000..26f2237
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.kern.consistent</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.kern.html">kern</a>.consistent</h1>
+<p class="desc">Stroked and filled text should have exactly the same kerning so it overlaps</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw">2d.text.draw</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 3;
+ctx.font = '20px Arial, sans-serif';
+ctx.fillText('VAVAVAVAVAVAVA', -50, 25);
+ctx.fillText('ToToToToToToTo', -50, 45);
+ctx.strokeText('VAVAVAVAVAVAVA', -50, 25);
+ctx.strokeText('ToToToToToToTo', -50, 45);
+_requireManualCheck();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.basic.html
new file mode 100644 (file)
index 0000000..f0a8288
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.space.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.space.html">space</a>.basic</h1>
+<p class="desc">U+0020 is rendered the correct size (1em wide)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.spaces">2d.text.draw.spaces</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E EE', -100, 37.5);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.collapse.nonspace.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.collapse.nonspace.html
new file mode 100644 (file)
index 0000000..f5809f4
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.space.collapse.nonspace</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.space.html">space</a>.<a href="index.2d.text.draw.space.collapse.html">collapse</a>.nonspace</h1>
+<p class="desc">Non-space characters are not converted to U+0020 and collapsed</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.spaces">2d.text.draw.spaces</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50px CanvasTest';
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.fillStyle = '#f00';
+    ctx.fillRect(0, 0, 100, 50);
+    ctx.fillStyle = '#0f0';
+    ctx.fillText('E\x0b EE', -150, 37.5);
+    _assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+    _assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.basic.html
new file mode 100644 (file)
index 0000000..e5dde18
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.stroke.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.stroke.html">stroke</a>.basic</h1>
+<p class="desc">strokeText draws stroked text</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw">2d.text.draw</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.stroke">2d.text.draw.stroke</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="2d.text.draw.stroke.basic.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.fillStyle = '#f00';
+ctx.lineWidth = 1;
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeText('PASS', 5, 35);
+_requireManualCheck();
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.basic.png b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.basic.png
new file mode 100644 (file)
index 0000000..59e6835
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.basic.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.unaffected.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.unaffected.html
new file mode 100644 (file)
index 0000000..454fe35
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.draw.stroke.unaffected</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.draw.html">draw</a>.<a href="index.2d.text.draw.stroke.html">stroke</a>.unaffected</h1>
+<p class="desc">strokeText does not start a new path or subpath</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.draw.stroke">2d.text.draw.stroke</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeStyle = '#f00';
+ctx.strokeText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.default.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.default.html
new file mode 100644 (file)
index 0000000..7682af9
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.font.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.font.html">font</a>.default</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.default">2d.text.font.default</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.basic.html
new file mode 100644 (file)
index 0000000..fd097c7
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.font.parse.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.font.html">font</a>.<a href="index.2d.text.font.parse.html">parse</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.parse">2d.text.font.parse</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.get">2d.text.font.get</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20PX   SERIF';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.complex.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.complex.html
new file mode 100644 (file)
index 0000000..846bc21
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.font.parse.complex</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.font.html">font</a>.<a href="index.2d.text.font.parse.html">parse</a>.complex</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.parse">2d.text.font.parse</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.get">2d.text.font.get</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.lineheight">2d.text.font.lineheight</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif';
+_assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.invalid.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.invalid.html
new file mode 100644 (file)
index 0000000..1d7abce
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.font.parse.invalid</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.font.html">font</a>.<a href="index.2d.text.font.parse.html">parse</a>.invalid</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.invalid">2d.text.font.invalid</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'bogus';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px {bogus}';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px initial';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px default';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '1em serif; background: green; margin: 10px';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.default.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.default.html
new file mode 100644 (file)
index 0000000..fae48ce
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.font.parse.size.percentage.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.font.html">font</a>.<a href="index.2d.text.font.parse.html">parse</a>.<a href="index.2d.text.font.parse.size.html">size</a>.<a href="index.2d.text.font.parse.size.percentage.html">percentage</a>.default</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.undefined">2d.text.font.undefined</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+var ctx2 = canvas2.getContext('2d');
+ctx2.font = '1000% serif';
+_assertSame(ctx2.font, '100px serif', "ctx2.font", "'100px serif'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.html
new file mode 100644 (file)
index 0000000..0d890be
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.font.parse.size.percentage</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.font.html">font</a>.<a href="index.2d.text.font.parse.html">parse</a>.<a href="index.2d.text.font.parse.size.html">size</a>.percentage</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.parse">2d.text.font.parse</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.get">2d.text.font.get</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.fontsize">2d.text.font.fontsize</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.size">2d.text.font.size</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" style="font-size: 144px" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = '50% serif';
+_assertSame(ctx.font, '72px serif', "ctx.font", "'72px serif'");
+canvas.setAttribute('style', 'font-size: 100px');
+_assertSame(ctx.font, '72px serif', "ctx.font", "'72px serif'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.system.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.system.html
new file mode 100644 (file)
index 0000000..cd60202
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.font.parse.system</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.font.html">font</a>.<a href="index.2d.text.font.parse.html">parse</a>.system</h1>
+<p class="desc">System fonts must be computed to explicit values</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.parse">2d.text.font.parse</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.get">2d.text.font.get</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.font.systemfonts">2d.text.font.systemfonts</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.font = 'message-box';
+_assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.basic.html
new file mode 100644 (file)
index 0000000..1e368c8
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.measure.width.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.measure.html">measure</a>.<a href="index.2d.text.measure.width.html">width</a>.basic</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.measure">2d.text.measure</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.font = '50px CanvasTest';
+    _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50");
+    _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100");
+    _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200");
+
+    ctx.font = '100px CanvasTest';
+    _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100");
+}), 500);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.empty.html
new file mode 100644 (file)
index 0000000..6b541e2
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.text.measure.width.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<style>
+@font-face {
+  font-family: CanvasTest;
+  src: url("../fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.text.html">text</a>.<a href="index.2d.text.measure.html">measure</a>.<a href="index.2d.text.measure.width.html">width</a>.empty</h1>
+<p class="desc">The empty string has zero width</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.text.measure">2d.text.measure</a>
+</ul>
+</div>
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+deferTest();
+setTimeout(wrapFunction(function () {
+    ctx.font = '50px CanvasTest';
+    _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0");
+}), 500);
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.order.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.order.html
new file mode 100644 (file)
index 0000000..bc36315
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.order</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.order</h1>
+<p class="desc">Transformations are applied in the right order</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.order">2d.transformation.order</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.scale(2, 1);
+ctx.rotate(Math.PI / 2);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, -50, 50, 50);
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.direction.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.direction.html
new file mode 100644 (file)
index 0000000..541c7ac
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.rotate.direction</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.rotate.html">rotate</a>.direction</h1>
+<p class="desc">rotate() is clockwise</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.rotate.direction">2d.transformation.rotate.direction</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.rotate(Math.PI / 2);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, -100, 50, 100);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.nonfinite.html
new file mode 100644 (file)
index 0000000..bdac1ff
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.rotate.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.rotate.html">rotate</a>.nonfinite</h1>
+<p class="desc">rotate() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.translate(100, 10);
+ctx.rotate(Infinity);
+ctx.rotate(-Infinity);
+ctx.rotate(NaN);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, -10, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.radians.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.radians.html
new file mode 100644 (file)
index 0000000..c78975d
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.rotate.radians</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.rotate.html">rotate</a>.radians</h1>
+<p class="desc">rotate() uses radians</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.rotate.radians">2d.transformation.rotate.radians</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.rotate(Math.PI); // should fail obviously if this is 3.1 degrees
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, -50, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrap.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrap.html
new file mode 100644 (file)
index 0000000..d8c191e
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.rotate.wrap</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.rotate.html">rotate</a>.wrap</h1>
+<p class="desc">rotate() wraps large positive values correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.rotate">2d.transformation.rotate</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.rotate(Math.PI * (1 + 4096)); // == pi (mod 2*pi)
+// We need about pi +/- 0.001 in order to get correct-looking results
+// 32-bit floats can store pi*4097 with precision 2^-10, so that should
+// be safe enough on reasonable implementations
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, -50, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,2, 0,255,0,255, "98,2", "0,255,0,255");
+_assertPixel(canvas, 98,47, 0,255,0,255, "98,47", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrapnegative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrapnegative.html
new file mode 100644 (file)
index 0000000..ea56176
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.rotate.wrapnegative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.rotate.html">rotate</a>.wrapnegative</h1>
+<p class="desc">rotate() wraps large negative values correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.rotate">2d.transformation.rotate</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.rotate(-Math.PI * (1 + 4096));
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, -50, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(canvas, 98,2, 0,255,0,255, "98,2", "0,255,0,255");
+_assertPixel(canvas, 98,47, 0,255,0,255, "98,47", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.zero.html
new file mode 100644 (file)
index 0000000..59ef6c0
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.rotate.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.rotate.html">rotate</a>.zero</h1>
+<p class="desc">rotate() by 0 does nothing</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.rotate">2d.transformation.rotate</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.rotate(0);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.basic.html
new file mode 100644 (file)
index 0000000..693b728
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.scale.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.scale.html">scale</a>.basic</h1>
+<p class="desc">scale() works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.scale">2d.transformation.scale</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.scale(2, 4);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 12.5);
+_assertPixel(canvas, 90,40, 0,255,0,255, "90,40", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.large.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.large.html
new file mode 100644 (file)
index 0000000..9eab9d8
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.scale.large</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.scale.html">scale</a>.large</h1>
+<p class="desc">scale() with large scale factors works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.scale">2d.transformation.scale</a>
+</ul>
+</div>
+<p class="notes">Not really that large at all, but it hits the limits in Firefox.
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.scale(1e5, 1e5);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 1, 1);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.multiple.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.multiple.html
new file mode 100644 (file)
index 0000000..747b970
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.scale.multiple</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.scale.html">scale</a>.multiple</h1>
+<p class="desc">Multiple scale()s combine</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.scale.multiple">2d.transformation.scale.multiple</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.scale(Math.sqrt(2), Math.sqrt(2));
+ctx.scale(Math.sqrt(2), Math.sqrt(2));
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 25);
+_assertPixel(canvas, 90,40, 0,255,0,255, "90,40", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.negative.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.negative.html
new file mode 100644 (file)
index 0000000..1d28266
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.scale.negative</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.scale.html">scale</a>.negative</h1>
+<p class="desc">scale() with negative scale factors works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.scale">2d.transformation.scale</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.save();
+ctx.scale(-1, 1);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-50, 0, 50, 50);
+ctx.restore();
+
+ctx.save();
+ctx.scale(1, -1);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(50, -50, 50, 50);
+ctx.restore();
+_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
+_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.nonfinite.html
new file mode 100644 (file)
index 0000000..df18a6c
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.scale.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.scale.html">scale</a>.nonfinite</h1>
+<p class="desc">scale() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.translate(100, 10);
+ctx.scale(Infinity, 0.1);
+ctx.scale(-Infinity, 0.1);
+ctx.scale(NaN, 0.1);
+ctx.scale(0.1, Infinity);
+ctx.scale(0.1, -Infinity);
+ctx.scale(0.1, NaN);
+ctx.scale(Infinity, Infinity);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, -10, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.zero.html
new file mode 100644 (file)
index 0000000..3027e32
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.scale.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.scale.html">scale</a>.zero</h1>
+<p class="desc">scale() with a scale factor of zero works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.scale">2d.transformation.scale</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.save();
+ctx.translate(50, 0);
+ctx.scale(0, 1);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.restore();
+
+ctx.save();
+ctx.translate(0, 25);
+ctx.scale(1, 0);
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.restore();
+
+canvas.toDataURL();
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.multiple.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.multiple.html
new file mode 100644 (file)
index 0000000..5f5dcf5
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.setTransform.multiple</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.setTransform.html">setTransform</a>.multiple</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.setTransform.identity">2d.transformation.setTransform.identity</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.setTransform(1/2,0, 0,1/2, 0,0);
+ctx.setTransform(2,0, 0,2, 0,0);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 50, 25);
+_assertPixel(canvas, 75,35, 0,255,0,255, "75,35", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.nonfinite.html
new file mode 100644 (file)
index 0000000..d01da7d
--- /dev/null
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.setTransform.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.setTransform.html">setTransform</a>.nonfinite</h1>
+<p class="desc">setTransform() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.translate(100, 10);
+ctx.setTransform(Infinity, 0, 0, 0, 0, 0);
+ctx.setTransform(-Infinity, 0, 0, 0, 0, 0);
+ctx.setTransform(NaN, 0, 0, 0, 0, 0);
+ctx.setTransform(0, Infinity, 0, 0, 0, 0);
+ctx.setTransform(0, -Infinity, 0, 0, 0, 0);
+ctx.setTransform(0, NaN, 0, 0, 0, 0);
+ctx.setTransform(0, 0, Infinity, 0, 0, 0);
+ctx.setTransform(0, 0, -Infinity, 0, 0, 0);
+ctx.setTransform(0, 0, NaN, 0, 0, 0);
+ctx.setTransform(0, 0, 0, Infinity, 0, 0);
+ctx.setTransform(0, 0, 0, -Infinity, 0, 0);
+ctx.setTransform(0, 0, 0, NaN, 0, 0);
+ctx.setTransform(0, 0, 0, 0, Infinity, 0);
+ctx.setTransform(0, 0, 0, 0, -Infinity, 0);
+ctx.setTransform(0, 0, 0, 0, NaN, 0);
+ctx.setTransform(0, 0, 0, 0, 0, Infinity);
+ctx.setTransform(0, 0, 0, 0, 0, -Infinity);
+ctx.setTransform(0, 0, 0, 0, 0, NaN);
+ctx.setTransform(Infinity, Infinity, 0, 0, 0, 0);
+ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, 0);
+ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, 0);
+ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
+ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, 0);
+ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, Infinity);
+ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, 0);
+ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, 0);
+ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, 0);
+ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, Infinity);
+ctx.setTransform(Infinity, Infinity, 0, 0, 0, Infinity);
+ctx.setTransform(Infinity, 0, Infinity, 0, 0, 0);
+ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, 0);
+ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, 0);
+ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
+ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, Infinity);
+ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, 0);
+ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, Infinity);
+ctx.setTransform(Infinity, 0, Infinity, 0, 0, Infinity);
+ctx.setTransform(Infinity, 0, 0, Infinity, 0, 0);
+ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, 0);
+ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, Infinity);
+ctx.setTransform(Infinity, 0, 0, Infinity, 0, Infinity);
+ctx.setTransform(Infinity, 0, 0, 0, Infinity, 0);
+ctx.setTransform(Infinity, 0, 0, 0, Infinity, Infinity);
+ctx.setTransform(Infinity, 0, 0, 0, 0, Infinity);
+ctx.setTransform(0, Infinity, Infinity, 0, 0, 0);
+ctx.setTransform(0, Infinity, Infinity, Infinity, 0, 0);
+ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, 0);
+ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.setTransform(0, Infinity, Infinity, Infinity, 0, Infinity);
+ctx.setTransform(0, Infinity, Infinity, 0, Infinity, 0);
+ctx.setTransform(0, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.setTransform(0, Infinity, Infinity, 0, 0, Infinity);
+ctx.setTransform(0, Infinity, 0, Infinity, 0, 0);
+ctx.setTransform(0, Infinity, 0, Infinity, Infinity, 0);
+ctx.setTransform(0, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.setTransform(0, Infinity, 0, Infinity, 0, Infinity);
+ctx.setTransform(0, Infinity, 0, 0, Infinity, 0);
+ctx.setTransform(0, Infinity, 0, 0, Infinity, Infinity);
+ctx.setTransform(0, Infinity, 0, 0, 0, Infinity);
+ctx.setTransform(0, 0, Infinity, Infinity, 0, 0);
+ctx.setTransform(0, 0, Infinity, Infinity, Infinity, 0);
+ctx.setTransform(0, 0, Infinity, Infinity, Infinity, Infinity);
+ctx.setTransform(0, 0, Infinity, Infinity, 0, Infinity);
+ctx.setTransform(0, 0, Infinity, 0, Infinity, 0);
+ctx.setTransform(0, 0, Infinity, 0, Infinity, Infinity);
+ctx.setTransform(0, 0, Infinity, 0, 0, Infinity);
+ctx.setTransform(0, 0, 0, Infinity, Infinity, 0);
+ctx.setTransform(0, 0, 0, Infinity, Infinity, Infinity);
+ctx.setTransform(0, 0, 0, Infinity, 0, Infinity);
+ctx.setTransform(0, 0, 0, 0, Infinity, Infinity);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, -10, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.skewed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.skewed.html
new file mode 100644 (file)
index 0000000..733b13d
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.setTransform.skewed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.setTransform.html">setTransform</a>.skewed</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.setTransform">2d.transformation.setTransform</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Create green with a red square ring inside it
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(20, 10, 60, 30);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(40, 20, 20, 10);
+
+// Draw a skewed shape to fill that gap, to make sure it is aligned correctly
+ctx.setTransform(1,4, 2,3, 5,6);
+// Post-transform coordinates:
+//   [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
+// Hence pre-transform coordinates:
+var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
+         [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
+         [-7.4,11.2]];
+ctx.beginPath();
+ctx.moveTo(pts[0][0], pts[0][1]);
+for (var i = 0; i < pts.length; ++i)
+    ctx.lineTo(pts[i][0], pts[i][1]);
+ctx.fill();
+_assertPixel(canvas, 21,11, 0,255,0,255, "21,11", "0,255,0,255");
+_assertPixel(canvas, 79,11, 0,255,0,255, "79,11", "0,255,0,255");
+_assertPixel(canvas, 21,39, 0,255,0,255, "21,39", "0,255,0,255");
+_assertPixel(canvas, 79,39, 0,255,0,255, "79,39", "0,255,0,255");
+_assertPixel(canvas, 39,19, 0,255,0,255, "39,19", "0,255,0,255");
+_assertPixel(canvas, 61,19, 0,255,0,255, "61,19", "0,255,0,255");
+_assertPixel(canvas, 39,31, 0,255,0,255, "39,31", "0,255,0,255");
+_assertPixel(canvas, 61,31, 0,255,0,255, "61,31", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.identity.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.identity.html
new file mode 100644 (file)
index 0000000..7a2e7a8
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.transform.identity</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.transform.html">transform</a>.identity</h1>
+<p class="desc">transform() with the identity matrix does nothing</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.transform">2d.transformation.transform</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.transform(1,0, 0,1, 0,0);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.multiply.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.multiply.html
new file mode 100644 (file)
index 0000000..cf1f58b
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.transform.multiply</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.transform.html">transform</a>.multiply</h1>
+<p class="desc">transform() multiplies the CTM</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.transform.multiply">2d.transformation.transform.multiply</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.transform(1,2, 3,4, 5,6);
+ctx.transform(-2,1, 3/2,-1/2, 1,-2);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.nonfinite.html
new file mode 100644 (file)
index 0000000..8681a7b
--- /dev/null
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.transform.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.transform.html">transform</a>.nonfinite</h1>
+<p class="desc">transform() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.translate(100, 10);
+ctx.transform(Infinity, 0, 0, 0, 0, 0);
+ctx.transform(-Infinity, 0, 0, 0, 0, 0);
+ctx.transform(NaN, 0, 0, 0, 0, 0);
+ctx.transform(0, Infinity, 0, 0, 0, 0);
+ctx.transform(0, -Infinity, 0, 0, 0, 0);
+ctx.transform(0, NaN, 0, 0, 0, 0);
+ctx.transform(0, 0, Infinity, 0, 0, 0);
+ctx.transform(0, 0, -Infinity, 0, 0, 0);
+ctx.transform(0, 0, NaN, 0, 0, 0);
+ctx.transform(0, 0, 0, Infinity, 0, 0);
+ctx.transform(0, 0, 0, -Infinity, 0, 0);
+ctx.transform(0, 0, 0, NaN, 0, 0);
+ctx.transform(0, 0, 0, 0, Infinity, 0);
+ctx.transform(0, 0, 0, 0, -Infinity, 0);
+ctx.transform(0, 0, 0, 0, NaN, 0);
+ctx.transform(0, 0, 0, 0, 0, Infinity);
+ctx.transform(0, 0, 0, 0, 0, -Infinity);
+ctx.transform(0, 0, 0, 0, 0, NaN);
+ctx.transform(Infinity, Infinity, 0, 0, 0, 0);
+ctx.transform(Infinity, Infinity, Infinity, 0, 0, 0);
+ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, 0);
+ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
+ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, 0);
+ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.transform(Infinity, Infinity, Infinity, 0, 0, Infinity);
+ctx.transform(Infinity, Infinity, 0, Infinity, 0, 0);
+ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, 0);
+ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.transform(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ctx.transform(Infinity, Infinity, 0, 0, Infinity, 0);
+ctx.transform(Infinity, Infinity, 0, 0, Infinity, Infinity);
+ctx.transform(Infinity, Infinity, 0, 0, 0, Infinity);
+ctx.transform(Infinity, 0, Infinity, 0, 0, 0);
+ctx.transform(Infinity, 0, Infinity, Infinity, 0, 0);
+ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, 0);
+ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
+ctx.transform(Infinity, 0, Infinity, Infinity, 0, Infinity);
+ctx.transform(Infinity, 0, Infinity, 0, Infinity, 0);
+ctx.transform(Infinity, 0, Infinity, 0, Infinity, Infinity);
+ctx.transform(Infinity, 0, Infinity, 0, 0, Infinity);
+ctx.transform(Infinity, 0, 0, Infinity, 0, 0);
+ctx.transform(Infinity, 0, 0, Infinity, Infinity, 0);
+ctx.transform(Infinity, 0, 0, Infinity, Infinity, Infinity);
+ctx.transform(Infinity, 0, 0, Infinity, 0, Infinity);
+ctx.transform(Infinity, 0, 0, 0, Infinity, 0);
+ctx.transform(Infinity, 0, 0, 0, Infinity, Infinity);
+ctx.transform(Infinity, 0, 0, 0, 0, Infinity);
+ctx.transform(0, Infinity, Infinity, 0, 0, 0);
+ctx.transform(0, Infinity, Infinity, Infinity, 0, 0);
+ctx.transform(0, Infinity, Infinity, Infinity, Infinity, 0);
+ctx.transform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ctx.transform(0, Infinity, Infinity, Infinity, 0, Infinity);
+ctx.transform(0, Infinity, Infinity, 0, Infinity, 0);
+ctx.transform(0, Infinity, Infinity, 0, Infinity, Infinity);
+ctx.transform(0, Infinity, Infinity, 0, 0, Infinity);
+ctx.transform(0, Infinity, 0, Infinity, 0, 0);
+ctx.transform(0, Infinity, 0, Infinity, Infinity, 0);
+ctx.transform(0, Infinity, 0, Infinity, Infinity, Infinity);
+ctx.transform(0, Infinity, 0, Infinity, 0, Infinity);
+ctx.transform(0, Infinity, 0, 0, Infinity, 0);
+ctx.transform(0, Infinity, 0, 0, Infinity, Infinity);
+ctx.transform(0, Infinity, 0, 0, 0, Infinity);
+ctx.transform(0, 0, Infinity, Infinity, 0, 0);
+ctx.transform(0, 0, Infinity, Infinity, Infinity, 0);
+ctx.transform(0, 0, Infinity, Infinity, Infinity, Infinity);
+ctx.transform(0, 0, Infinity, Infinity, 0, Infinity);
+ctx.transform(0, 0, Infinity, 0, Infinity, 0);
+ctx.transform(0, 0, Infinity, 0, Infinity, Infinity);
+ctx.transform(0, 0, Infinity, 0, 0, Infinity);
+ctx.transform(0, 0, 0, Infinity, Infinity, 0);
+ctx.transform(0, 0, 0, Infinity, Infinity, Infinity);
+ctx.transform(0, 0, 0, Infinity, 0, Infinity);
+ctx.transform(0, 0, 0, 0, Infinity, Infinity);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, -10, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.skewed.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.skewed.html
new file mode 100644 (file)
index 0000000..7072b15
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.transform.skewed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.transform.html">transform</a>.skewed</h1>
+<p class="desc">transform() with skewy matrix transforms correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.transform">2d.transformation.transform</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Create green with a red square ring inside it
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.fillRect(20, 10, 60, 30);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(40, 20, 20, 10);
+
+// Draw a skewed shape to fill that gap, to make sure it is aligned correctly
+ctx.transform(1,4, 2,3, 5,6);
+// Post-transform coordinates:
+//   [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
+// Hence pre-transform coordinates:
+var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
+         [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
+         [-7.4,11.2]];
+ctx.beginPath();
+ctx.moveTo(pts[0][0], pts[0][1]);
+for (var i = 0; i < pts.length; ++i)
+    ctx.lineTo(pts[i][0], pts[i][1]);
+ctx.fill();
+_assertPixel(canvas, 21,11, 0,255,0,255, "21,11", "0,255,0,255");
+_assertPixel(canvas, 79,11, 0,255,0,255, "79,11", "0,255,0,255");
+_assertPixel(canvas, 21,39, 0,255,0,255, "21,39", "0,255,0,255");
+_assertPixel(canvas, 79,39, 0,255,0,255, "79,39", "0,255,0,255");
+_assertPixel(canvas, 39,19, 0,255,0,255, "39,19", "0,255,0,255");
+_assertPixel(canvas, 61,19, 0,255,0,255, "61,19", "0,255,0,255");
+_assertPixel(canvas, 39,31, 0,255,0,255, "39,31", "0,255,0,255");
+_assertPixel(canvas, 61,31, 0,255,0,255, "61,31", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.basic.html
new file mode 100644 (file)
index 0000000..36f509f
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.translate.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.translate.html">translate</a>.basic</h1>
+<p class="desc">translate() works</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.transformation.translate">2d.transformation.translate</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.translate(100, 50);
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, -50, 100, 50);
+_assertPixel(canvas, 90,40, 0,255,0,255, "90,40", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.nonfinite.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.nonfinite.html
new file mode 100644 (file)
index 0000000..09184b2
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.transformation.translate.nonfinite</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.transformation.html">transformation</a>.<a href="index.2d.transformation.translate.html">translate</a>.nonfinite</h1>
+<p class="desc">translate() with Infinity/NaN is ignored</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.2d.nonfinite">2d.nonfinite</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.translate(100, 10);
+ctx.translate(Infinity, 0.1);
+ctx.translate(-Infinity, 0.1);
+ctx.translate(NaN, 0.1);
+ctx.translate(0.1, Infinity);
+ctx.translate(0.1, -Infinity);
+ctx.translate(0.1, NaN);
+ctx.translate(Infinity, Infinity);
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(-100, -10, 100, 50);
+
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.type.delete.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.type.delete.html
new file mode 100644 (file)
index 0000000..c503b67
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.type.delete</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.type.delete</h1>
+<p class="desc">window.CanvasRenderingContext2D is Configurable</p>
+
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertDifferent(window.CanvasRenderingContext2D, undefined, "window.CanvasRenderingContext2D", "undefined");
+_assertSame(delete window.CanvasRenderingContext2D, true, "delete window.CanvasRenderingContext2D", "true");
+_assertSame(window.CanvasRenderingContext2D, undefined, "window.CanvasRenderingContext2D", "undefined");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.type.exists.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.type.exists.html
new file mode 100644 (file)
index 0000000..b294fdf
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.type.exists</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.type.html">type</a>.exists</h1>
+<p class="desc">The 2D context interface is a property of 'window'</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.2d.type">context.2d.type</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assert(window.CanvasRenderingContext2D, "window.CanvasRenderingContext2D");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.type.extend.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.type.extend.html
new file mode 100644 (file)
index 0000000..3510a23
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.type.extend</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.type.html">type</a>.extend</h1>
+<p class="desc">Interface methods can be added</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.2d.type">context.2d.type</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="../images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+window.CanvasRenderingContext2D.prototype.fillRectGreen = function (x, y, w, h)
+{
+    this.fillStyle = '#0f0';
+    this.fillRect(x, y, w, h);
+};
+ctx.fillStyle = '#f00';
+ctx.fillRectGreen(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.type.prototype.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.type.prototype.html
new file mode 100644 (file)
index 0000000..21247e7
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.type.prototype</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.type.html">type</a>.prototype</h1>
+<p class="desc">window.CanvasRenderingContext2D.prototype are not [[Writable]] and not [[Configurable]], and its methods are [[Configurable]].</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.2d.type">context.2d.type</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assert(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype");
+_assert(window.CanvasRenderingContext2D.prototype.fill, "window.CanvasRenderingContext2D.prototype.fill");
+window.CanvasRenderingContext2D.prototype = null;
+_assert(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype");
+delete window.CanvasRenderingContext2D.prototype;
+_assert(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype");
+window.CanvasRenderingContext2D.prototype.fill = 1;
+_assertSame(window.CanvasRenderingContext2D.prototype.fill, 1, "window.CanvasRenderingContext2D.prototype.fill", "1");
+delete window.CanvasRenderingContext2D.prototype.fill;
+_assertSame(window.CanvasRenderingContext2D.prototype.fill, undefined, "window.CanvasRenderingContext2D.prototype.fill", "undefined");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.type.replace.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.type.replace.html
new file mode 100644 (file)
index 0000000..793c5a9
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.type.replace</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.<a href="index.2d.type.html">type</a>.replace</h1>
+<p class="desc">Interface methods can be overridden</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.2d.type">context.2d.type</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="../images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var fillRect = window.CanvasRenderingContext2D.prototype.fillRect;
+window.CanvasRenderingContext2D.prototype.fillRect = function (x, y, w, h)
+{
+    this.fillStyle = '#0f0';
+    fillRect.call(this, x, y, w, h);
+};
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/2d.voidreturn.html b/common/tct-canvas-html5-tests/canvas/w3c/2d.voidreturn.html
new file mode 100644 (file)
index 0000000..31d204e
--- /dev/null
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.voidreturn</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.2d.html">2d</a>.voidreturn</h1>
+<p class="desc">void methods return undefined</p>
+
+<div class="refs">Spec references:
+<ul>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(ctx.save(), undefined, "ctx.save()", "undefined");
+_assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined");
+_assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined");
+_assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined");
+_assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined");
+if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
+    _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined");
+}
+if (ctx.setTransform) {
+    _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform(1, 0, 0, 1, 0, 0)", "undefined");
+}
+_assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", "undefined");
+_assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "undefined");
+_assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined");
+_assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined");
+_assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined");
+_assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined");
+_assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined");
+_assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0, 0, 0, 0)", "undefined");
+_assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0, 0, 0, 0, 0, 0)", "undefined");
+_assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "undefined");
+_assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined");
+_assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, true)", "undefined");
+_assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined");
+_assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined");
+_assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined");
+if (ctx.fillText) {
+    _assertSame(ctx.fillText('test', 0, 0), undefined, "ctx.fillText('test', 0, 0)", "undefined");
+    _assertSame(ctx.strokeText('test', 0, 0), undefined, "ctx.strokeText('test', 0, 0)", "undefined");
+}
+if (ctx.putImageData) {
+    _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined");
+}
+_assertSame(ctx.drawImage(document.getElementById('yellow.png'), 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(document.getElementById('yellow.png'), 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
+_assertSame(ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
+_assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undefined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefined");
+
+
+});
+</script>
+<img src="../images/yellow.png" id="yellow.png" class="resource">
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/COPYING b/common/tct-canvas-html5-tests/canvas/w3c/COPYING
new file mode 100644 (file)
index 0000000..1248f2f
--- /dev/null
@@ -0,0 +1,92 @@
+This test suite comes from
+https://github.com/w3c/web-platform-tests
+with modification:
+
+security.drawImage.canvas.html
+
+  -<img src="http://www2.w3c-test.org/html/tests/approved/images/yellow.png" id="yellow.png" class="resource">
+  +<img src="http://127.0.0.1:8081/opt/tct-canvas-html5-tests/canvas/w3c/yellow.png" id="yellow.png" class="resource">
+
+security.drawImage.image.html
+
+  -<img src="http://www2.w3c-test.org/html/tests/approved/images/yellow.png" id="yellow.png" class="resource">
+  +<img src="http://127.0.0.1:8081/opt/tct-canvas-html5-tests/canvas/w3c/yellow.png" id="yellow.png" class="resource">
+
+security.pattern.canvas.fillStyle.html
+
+  -<img src="http://www2.w3c-test.org/html/tests/approved/images/yellow.png" id="yellow.png" class="resource">
+  +<img src="http://127.0.0.1:8081/opt/tct-canvas-html5-tests/canvas/w3c/yellow.png" id="yellow.png" class="resource">
+
+security.pattern.canvas.strokeStyle.html
+
+  -<img src="http://www2.w3c-test.org/html/tests/approved/images/yellow.png" id="yellow.png" class="resource">
+  +<img src="http://127.0.0.1:8081/opt/tct-canvas-html5-tests/canvas/w3c/yellow.png" id="yellow.png" class="resource">
+
+security.reset.html 
+
+  -<img src="http://www2.w3c-test.org/html/tests/approved/images/yellow.png" id="yellow.png" class="resource">
+  +<img src="http://127.0.0.1:8081/opt/tct-canvas-html5-tests/canvas/w3c/yellow.png" id="yellow.png" class="resource">
+
+2d.line.width.basic.html
+2d.line.width.transformed.html
+2d.path.arcTo.shape.curve1.html
+2d.path.arcTo.shape.curve2.html
+2d.text.draw.align.center.html
+2d.text.draw.align.end.ltr.html
+2d.text.draw.align.end.rtl.html
+2d.text.draw.align.left.html
+2d.text.draw.align.right.html
+2d.text.draw.align.start.ltr.html
+2d.text.draw.align.start.rtl.html
+
+  + <script src="../../resources/testharness.js"></script>
+  + <script src="../../resources/testharnessreport.js"></script>
+
+  + var t = async_test(document.title, {timeout: 3000});
+  + <div id="log"></div>
+
+  + setTimeout(function(){
+  +     t.step(function() {
+  +         assert_true(window._testStatus[0] == "pass", window._testStatus[1]);
+  +     });
+  +     t.done();
+  + }, 1500);
+
+canvas_colorsandstyles_addcolorstop_001.htm
+
+  + <script src="../../resources/testharness.js"></script>
+  + <script src="../../resources/testharnessreport.js"></script>
+  + var t = async_test(document.title, {timeout:5000});
+
+  + t.step(function() {
+  +     assert_true(false, "SYNTAX_ERR exception should be thrown if color cannot be parsed");
+  + });
+
+  + t.step(function() {
+  +     assert_true(e.code == DOMException.SYNTAX_ERR, "SYNTAX_ERR exception should be thrown");
+  + });
+  + t.done();
+
+  + <div id="log"></div>
+
+canvas_complexshapes_ispointInpath_001.htm
+
+  + <script src="../../resources/testharness.js"></script>
+  + <script src="../../resources/testharnessreport.js"></script>
+  + var t = async_test(document.title, {timeout:5000});
+
+  + t.step(function() {
+  +     assert_true(ctx.isPointInPath(125, 75) && !ctx.isPointInPath(25, 25), "Ensure that the coordinates passed to isPointInPath are unaffected by the current transformation matrix");
+  + });
+  + t.done();
+
+  + <div id="log"></div>
+
+These tests are copyright by W3C and/or the author listed in the test
+file. The tests are dual-licensed under the W3C Test Suite License:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+and the BSD 3-clause License:
+http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+under W3C's test suite licensing policy:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/Makefile.am b/common/tct-canvas-html5-tests/canvas/w3c/Makefile.am
new file mode 100644 (file)
index 0000000..f991cce
--- /dev/null
@@ -0,0 +1,5 @@
+w3c_SCRIPTS = *
+w3cdir = $(prefix)/opt/tct-canvas-html5-tests/canvas/w3c
+EXTRA_DIST = $(w3c_SCRIPTS)
+docdir = $(prefix)/opt/tct-canvas-html5-tests/canvas/w3c
+dist_doc_DATA = COPYING
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_addcolorstop_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_addcolorstop_001.htm
new file mode 100644 (file)
index 0000000..656a918
--- /dev/null
@@ -0,0 +1,49 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test: Invalid addColorStop() throws SYNTAX_ERR exception</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-canvasgradient-addcolorstop" />
+        <meta name="assert" content="addColorStop(offset, color) must throw a SYNTAX_ERR exception if the color passed cannot be parsed" />
+        <script src="../../resources/testharness.js"></script>
+        <script src="../../resources/testharnessreport.js"></script>
+        <script type="text/javascript">
+            var t = async_test(document.title, {timeout:5000});
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                var lingrad = ctx.createLinearGradient(0, 0, 100, 0);
+
+                try
+                {
+                    lingrad.addColorStop(0, "invalidColor");
+                    t.step(function() {
+                        assert_true(false, "SYNTAX_ERR exception should be thrown if color cannot be parsed");
+                    });
+                }
+                catch (e)
+                {
+                    // SYNTAX_ERR exception should be thrown if color cannot be parsed.
+                    if (e.code == DOMException.SYNTAX_ERR) 
+                    {
+                        document.getElementById("testresult").firstChild.data = "PASS";
+                    }
+                    t.step(function() {
+                        assert_true(e.code == DOMException.SYNTAX_ERR, "SYNTAX_ERR exception should be thrown");
+                    });
+                }
+                t.done();
+
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: addColorStop(offset, color) must throw a SYNTAX_ERR exception if the color passed cannot be parsed.</p>
+        <p>Test passes if the word "PASS" appears below.</p>
+        <div id="testresult">FAIL</div>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+        <div id="log"></div>
+    </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_createlineargradient_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_createlineargradient_001.htm
new file mode 100644 (file)
index 0000000..801f832
--- /dev/null
@@ -0,0 +1,35 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test:  createlinearGradient() with two points same</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-createlineargradient" />
+        <meta name="assert" content="If the two points in a linear gradient have identical x,y coordinates, the canvas must paint nothing." />
+        <script type="text/javascript">
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                // Start by drawing a left to right, green-to-blue linear gradient.
+                var lingrad = ctx.createLinearGradient(0, 50, 100, 50);
+                lingrad.addColorStop(0, "rgba(0, 255, 0, 1.0)");
+                lingrad.addColorStop(1, "rgba(0, 0, 255, 1.0)");
+                ctx.fillStyle = lingrad;
+                ctx.fillRect(0, 0, 100, 50);
+
+                // Nothing must be drawn if the two points in the linear gradient are the same.
+                lingrad = ctx.createLinearGradient(100, 100, 100, 100);
+                lingrad.addColorStop(0, "rgba(255, 0, 0, 1.0)");
+                lingrad.addColorStop(1, "rgba(255, 0, 0, 1.0)");
+                ctx.fillStyle = lingrad;
+                ctx.fillRect(0, 0, 300, 150);
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: If the two points in a linear gradient have identical x,y coordinates, the canvas must paint nothing.</p>
+        <p>Test passes if there is one left-to-right, green-to-blue linear gradient seen on the page and no red is seen on the page.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_arcto_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_arcto_001.htm
new file mode 100644 (file)
index 0000000..ca21a51
--- /dev/null
@@ -0,0 +1,26 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test:  arcTo() adds to subpath if same point</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-arcto" />
+        <meta name="assert" content="If x1,y1 and x2,y2 are the same point, then arcTo must add x1,y1 to the subpath, and connect that point to x0,y0 with a straight line." />
+        <script type="text/javascript">
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+                ctx.moveTo(0, 50);
+
+                // Since (x1, y1) and (x2, y2) are the same point, (x1, y1) must be added to the subpath, thus creating a line.
+                ctx.arcTo(100, 50, 100, 50, 10);
+                ctx.stroke();
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: If x1,y1 and x2,y2 are the same point, then arcTo must add x1,y1 to the subpath, and connect that point to x0,y0 with a straight line.</p>
+        <p>Test passes if there is a straight, horizontal line seen on the page.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_beziercurveto_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_beziercurveto_001.htm
new file mode 100644 (file)
index 0000000..b384119
--- /dev/null
@@ -0,0 +1,35 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test:  bezierCurveTo() must ensure subpaths</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-beziercurveto" />
+        <meta name="assert" content="bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) must ensure there is a subpath for the point (cp1x,cp1y) if the context has no subpaths, then it must connect the last point in the subpath to the point (x,y)." />
+        <script type="text/javascript">
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                // Since the canvas has no subpaths, a virtual moveTo must be performed to (65,25) before creating the bezier.
+                ctx.bezierCurveTo(65, 25, 65, 25, 65, 65);
+                ctx.stroke();
+                ctx.beginPath();
+
+                // Since the canvas has no subpaths, a virtual moveTo must be performed to (35,25) before creating the bezier.
+                ctx.bezierCurveTo(35, 25, 35, 25, 35, 65);
+                ctx.stroke();
+                ctx.beginPath();
+
+                // Since the canvas has no subpaths, a virtual moveTo must be performed to (0,75) before creating the bezier.
+                ctx.bezierCurveTo(0, 75, 50, 150, 100, 75);
+                ctx.stroke();
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) must ensure there is a subpath for the point (cp1x,cp1y) if the context has no subpaths, then it must connect the last point in the subpath to the point (x,y).</p>
+        <p>Test passes if two vertical lines and one curved line are seen below in the shape of a smiley face.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_ispointInpath_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_ispointInpath_001.htm
new file mode 100644 (file)
index 0000000..8a0e694
--- /dev/null
@@ -0,0 +1,40 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test:  isPointInPath() unaffected by the current transformation matrix</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-ispointinpath" />
+        <meta name="assert" content="isPointInPath must check the point (x, y) as coordinates unaffected by the current transformation matrix." />
+        <script src="../../resources/testharness.js"></script>
+        <script src="../../resources/testharnessreport.js"></script>
+        <script type="text/javascript">
+            var t = async_test(document.title, {timeout:5000});
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                // Create a path that is transformed by a translation transformation matrix.
+                ctx.translate(100, 50);
+                ctx.rect(0, 0, 100, 50);
+
+                // Ensure that the coordinates passed to isPointInPath are unaffected by the current transformation matrix.
+                if (ctx.isPointInPath(125, 75) && !ctx.isPointInPath(25, 25)) 
+                {
+                    document.getElementById("testresult").firstChild.data = "PASS";
+                }
+                t.step(function() {
+                    assert_true(ctx.isPointInPath(125, 75) && !ctx.isPointInPath(25, 25), "Ensure that the coordinates passed to isPointInPath are unaffected by the current transformation matrix");
+                });
+                t.done();
+            }
+        </script>
+    </head>
+    <body onload="runTest();">
+        <p>Description: isPointInPath must check the point (x, y) as coordinates unaffected by the current transformation matrix.</p>
+        <p>Test passes if the word "PASS" appears below.</p>
+        <div id="testresult">FAIL</div>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+        <div id="log"></div>
+    </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_compositing_globalcompositeoperation_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_compositing_globalcompositeoperation_001.htm
new file mode 100644 (file)
index 0000000..57cd90a
--- /dev/null
@@ -0,0 +1,32 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test:  globalCompositeOperation "destination-over"</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-globalcompositeoperation" />
+        <meta name="assert" content="If the globalCompositeOperation is set to 'destination-over', display the destination image wherever the destination image is opaque." />
+        <script type="text/javascript">
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                // Source image.
+                ctx.fillStyle = "rgba(0, 0, 0, 1.0)";
+                ctx.fillRect(0, 0, 100, 50);
+
+                // Assign the globalCompositeOperation.
+                ctx.globalCompositeOperation = "destination-over";
+
+                // Destination image.
+                ctx.fillStyle = "rgba(255, 0, 0, 1.0)";
+                ctx.fillRect(0, 0, 100, 50);
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: If the globalCompositeOperation is set to "destination-over", display the destination image wherever the destination image is opaque.</p>
+        <p>Test passes if a black rectangle is seen on the page and no red is visible on the page.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_linestyles_linecap_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_linestyles_linecap_001.htm
new file mode 100644 (file)
index 0000000..1892140
--- /dev/null
@@ -0,0 +1,37 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test: "square" lineCap</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-linecap" />
+        <meta name="assert" content="The square value of lineCap means that a rectangle with the length of the line width and the width of half the line width, placed flat against the edge perpendicular to the direction of the line, must be added at the end of each line." />
+        <script type="text/javascript">
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                // Draw the first red rectangle.
+                ctx.fillStyle ="rgba(255, 0, 0, 1.0)";
+                ctx.fillRect(75, 0, 25, 50);
+
+                // Draw second red rectangle.
+                ctx.fillRect(0, 0, 25, 50);
+
+                // Draw a line with square lineCap.
+                ctx.strokeStyle = "rgba(0, 0, 0, 1.0)";
+                ctx.lineWidth = 50;
+                ctx.lineCap = "square";
+                ctx.beginPath();
+                ctx.moveTo(25, 25);
+                ctx.lineTo(75, 25);
+                ctx.stroke();
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: The square value of lineCap means that a rectangle with the length of the line width and the width of half the line width, placed flat against the edge perpendicular to the direction of the line, must be added at the end of each line.</p>
+        <p>Test passes if there is no red visible on the page and a black rectangle is seen on the page.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_001.htm
new file mode 100644 (file)
index 0000000..4afd93b
--- /dev/null
@@ -0,0 +1,36 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test: Shadows for linear gradients</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#shadows" />
+        <meta name="assert" content="Shadows must be drawn for linear gradients." />
+        <script type="text/javascript">
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                // Draw a red rectangle.
+                ctx.fillStyle = "rgba(255, 0, 0, 1.0)";
+                ctx.fillRect(150, 0, 100, 50);
+
+                // Set shadow styles to draw a black shadow to overlap the red rectangle.
+                ctx.shadowOffsetX = 150;
+                ctx.shadowColor = "rgba(0, 0, 0, 1.0)";
+
+                // Draw a left to right, green-to-blue linear gradient.
+                var lingrad = ctx.createLinearGradient(0, 50, 100, 50);
+                lingrad.addColorStop(0, "rgba(0, 255, 0, 1.0)");
+                lingrad.addColorStop(1, "rgba(0, 0, 255, 1.0)");
+                ctx.fillStyle = lingrad;
+                ctx.fillRect(0, 0, 100, 50);
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: Shadows must be drawn for linear gradients.</p>
+        <p>Test passes if there is one gradient filled rectangle and one black rectangle, and no red seen on the page.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_002-ref.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_002-ref.htm
new file mode 100644 (file)
index 0000000..e827c4b
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+  <head>
+    <title>HTML5 Canvas Test:  Shadows for images</title>
+    <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+    <link rel="help" href="http://www.w3.org/TR/2dcontext/#shadows" />
+    <link rel="match" href="canvas_shadows_002-ref.htm" />
+    <meta name="assert" content="Shadows must be drawn for images." />
+    <script type="text/javascript">
+      function runTest() {
+        var canvas = document.getElementById("canvas1");
+        var ctx = canvas.getContext("2d");
+
+        // Draw a black rectangle image on the canvas.
+        var img = document.getElementById("imgBlackRect");
+        ctx.drawImage(img, 0, 0);
+        ctx.drawImage(img, 150, 0);
+      }
+    </script>
+
+  </head>
+  <body onload="runTest()">
+    <p>Description:  Shadows must be drawn for images.</p>
+    <p>Test passes if two black rectangles are shown and there is no red visible on the page.</p>
+    <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    <img id="imgBlackRect" style="display:none;" width="100" height="50" src="../images/black-rectangle.png">
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_002.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_002.htm
new file mode 100644 (file)
index 0000000..53b9b63
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+  <head>
+    <title>HTML5 Canvas Test:  Shadows for images</title>
+    <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+    <link rel="help" href="http://www.w3.org/TR/2dcontext/#shadows" />
+    <link rel="match" href="canvas_shadows_002-ref.htm" />
+    <meta name="assert" content="Shadows must be drawn for images." />
+    <script type="text/javascript">
+      function runTest() {
+        var canvas = document.getElementById("canvas1");
+        var ctx = canvas.getContext("2d");
+
+        // Draw a red rectangle.
+        ctx.fillStyle = "rgba(255, 0, 0, 1.0)";
+        ctx.fillRect(150, 0, 100, 50);
+
+        // Set shadow styles to draw a black shadow to overlap the red rectangle.
+        ctx.shadowOffsetX = 150;
+        ctx.shadowColor = "rgba(0, 0, 0, 1.0)";
+
+        // Draw a black rectangle image on the canvas.
+        var img = document.getElementById("imgBlackRect");
+        ctx.drawImage(img, 0, 0);
+      }
+    </script>
+  </head>
+  <body onload="runTest()">
+    <p>Description:  Shadows must be drawn for images.</p>
+    <p>Test passes if two black rectangles are shown and there is no red visible on the page.</p>
+    <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    <img id="imgBlackRect" style="display:none" width="100" height="50" src="../images/black-rectangle.png">
+  </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_state_restore_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_state_restore_001.htm
new file mode 100644 (file)
index 0000000..e5df48f
--- /dev/null
@@ -0,0 +1,42 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test: restore() pops top entry in drawing state stack</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#the-canvas-state" />
+        <meta name="assert" content="restore() pops the top entry in the drawing state stack." />
+        <script type="text/javascript">
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+                ctx.fillStyle = "rgba(255, 0, 0, 1.0)";
+                ctx.fillRect(0, 0, 99, 50); 
+
+                // Save colors to the stack as separate drawing states.
+                ctx.fillStyle = "rgba(255, 255, 0, 1.0)";
+                ctx.save(); 
+                ctx.fillStyle = "rgba(0, 0, 255, 1.0)";
+                ctx.save();
+                ctx.fillStyle = "rgba(0, 255, 0, 1.0)";
+                ctx.save(); 
+
+                // Modify the current fillStyle.
+                ctx.fillStyle = "rgba(255, 0, 0, 1.0)";
+
+                // Restore the drawing states previously saved and draw with them.
+                ctx.restore(); 
+                ctx.fillRect(66, 0, 33, 50); 
+                ctx.restore(); 
+                ctx.fillRect(33, 0, 33, 50);
+                ctx.restore(); 
+                ctx.fillRect(0, 0, 33, 50); 
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: restore() pops the top entry in the drawing state stack.</p>
+        <p>Test passes if a rectangle is seen on the page with three colors - ordered from left to right:  yellow, blue, green.  The test fails if this order is not shown or if any red is seen.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_text_font_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_text_font_001.htm
new file mode 100644 (file)
index 0000000..0d3c156
--- /dev/null
@@ -0,0 +1,32 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test:  Ignore property-independent style sheet syntax "inherit" in Text</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-font" />
+        <meta name="assert" content=":  Ignore 'inherit' property-independent style sheet syntax without assigning a new font value." />
+        <script type="text/javascript">
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                // Assign a valid font.
+                ctx.font = "40px Times New Roman";
+
+                // Assign property-independent style sheet syntax 'inherit' as font.
+                ctx.font = "20px inherit";
+                ctx.fillText("Test String", 5, 50);
+
+                // Assign a valid font which was used earlier.
+                ctx.font = "40px Times New Roman";
+                ctx.fillText("Test String", 5, 100);  
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description:  Ignore "inherit" property-independent style sheet syntax without assigning a new font value.</p>
+        <p>Test passes if both strings are identical in both size, style, and text.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/canvas_transformations_scale_001.htm b/common/tct-canvas-html5-tests/canvas/w3c/canvas_transformations_scale_001.htm
new file mode 100644 (file)
index 0000000..44fdf3a
--- /dev/null
@@ -0,0 +1,30 @@
+<!doctype HTML> 
+<html>
+    <head>
+        <title>HTML5 Canvas Test: scale() transformation</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
+        <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-scale" />
+        <meta name="assert" content="The scale(x, y) method must add the scaling transformation described by the arguments to the transformation matrix." />
+        <script type="text/javascript">
+            function runTest() 
+            {
+                var canvas = document.getElementById("canvas1");
+                var ctx = canvas.getContext("2d");
+
+                // Draw a red rectangle.
+                ctx.fillStyle = "rgba(255, 0, 0, 1.0)";
+                ctx.fillRect(0, 0, 100, 50);
+
+                // Draw a black rectangle with scaling.
+                ctx.fillStyle = "rgba(0, 0, 0, 1.0)";
+                ctx.scale(2, 2);
+                ctx.fillRect(0, 0, 50, 25);
+            }
+        </script>
+    </head>
+    <body onload="runTest()">
+        <p>Description: The scale(x, y) method must add the scaling transformation described by the arguments to the transformation matrix.</p>
+        <p>Test passes if there is no red visible on the page and a black rectangle is seen on the page.</p>
+        <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
+    </body>
+</html>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/clear-100x50.png b/common/tct-canvas-html5-tests/canvas/w3c/clear-100x50.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/clear-100x50.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/context.arguments.missing.html b/common/tct-canvas-html5-tests/canvas/w3c/context.arguments.missing.html
new file mode 100644 (file)
index 0000000..b95cd56
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: context.arguments.missing</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>context.arguments.missing</h1>
+<p class="desc"></p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.unrecognised">context.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+try { var _thrown = false;
+  canvas.getContext();
+} catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: canvas.getContext()"); }
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/context.casesensitive.html b/common/tct-canvas-html5-tests/canvas/w3c/context.casesensitive.html
new file mode 100644 (file)
index 0000000..39e67a1
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: context.casesensitive</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.context.html">context</a>.casesensitive</h1>
+<p class="desc">Context name "2D" is unrecognised; matching is case sensitive</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.unrecognised">context.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.getContext('2D'), null, "canvas.getContext('2D')", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/context.emptystring.html b/common/tct-canvas-html5-tests/canvas/w3c/context.emptystring.html
new file mode 100644 (file)
index 0000000..dbf5bdb
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: context.emptystring</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.context.html">context</a>.emptystring</h1>
+<p class="desc">getContext with empty string returns null</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.unrecognised">context.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.getContext(""), null, "canvas.getContext(\"\")", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badname.html b/common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badname.html
new file mode 100644 (file)
index 0000000..99a7f39
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: context.unrecognised.badname</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.context.html">context</a>.<a href="index.context.unrecognised.html">unrecognised</a>.badname</h1>
+<p class="desc">getContext with unrecognised context name returns null</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.unrecognised">context.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.getContext('This is not an implemented context in any real browser'), null, "canvas.getContext('This is not an implemented context in any real browser')", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badsuffix.html b/common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badsuffix.html
new file mode 100644 (file)
index 0000000..bddde0b
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: context.unrecognised.badsuffix</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.context.html">context</a>.<a href="index.context.unrecognised.html">unrecognised</a>.badsuffix</h1>
+<p class="desc">Context name "2d" plus a suffix is unrecognised</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.unrecognised">context.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.getContext("2d#"), null, "canvas.getContext(\"2d#\")", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.nullsuffix.html b/common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.nullsuffix.html
new file mode 100644 (file)
index 0000000..6fcadff
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: context.unrecognised.nullsuffix</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.context.html">context</a>.<a href="index.context.unrecognised.html">unrecognised</a>.nullsuffix</h1>
+<p class="desc">Context name "2d" plus a "\0" suffix is unrecognised</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.unrecognised">context.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.getContext("2d\0"), null, "canvas.getContext(\"2d\\0\")", "null");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.unicode.html b/common/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.unicode.html
new file mode 100644 (file)
index 0000000..48456ce
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: context.unrecognised.unicode</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.context.html">context</a>.<a href="index.context.unrecognised.html">unrecognised</a>.unicode</h1>
+<p class="desc">Context name which kind of looks like "2d" is unrecognised</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.context.unrecognised">context.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.getContext("2\uFF44"), null, "canvas.getContext(\"2\\uFF44\")", "null"); // Fullwidth Latin Small Letter D
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_002.html b/common/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_002.html
new file mode 100644 (file)
index 0000000..53fd7ff
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>drawFocusIfNeeded()</title>
+    <script src="../../resources/testharness.js"></script>
+    <script src="../../resources/testharnessreport.js"></script>
+    <link rel="author" title="W3C">
+    <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-drawFocusIfNeeded">
+  </head>
+  <body>
+    <h1>Description</h1>
+    <p>This test uses drawFocusIfNeeded does nothing if the element is not in focus but comparing ImageData from before and after.</p>
+    <div>
+      <p>Before:</p>
+      <canvas height=100 width=100 id='original'>
+      </canvas>
+      <p>After:</p>
+      <canvas height=100 width=100 id=canvas>
+        <label><a href='http://www.w3.org' id='element'>Focus</a></label>
+      </canvas>
+    </div>
+    <script>
+      test(function() {
+          var canvas = document.getElementById('canvas');
+          var context = canvas.getContext('2d');
+          var element = document.getElementById('element');
+          context.fillStyle = 'white';
+          context.fillRect(0, 0, 100, 100);
+          context.beginPath();
+          context.strokeStyle = 'black';
+          context.rect(10, 10, 80, 80);
+          context.stroke();
+          context.save();
+          var refImage = context.getImageData(0, 0, 100, 100);
+
+          assert_equals(40000, refImage.data.length, "ImageData.data.length is 40000");
+
+          var original = document.getElementById('original');
+          var o_context = original.getContext('2d');
+          o_context.fillStyle = 'white';
+          o_context.fillRect(0, 0, 100, 100);
+          o_context.putImageData(refImage, 0, 0, 0, 0, 100, 100);
+
+
+
+          context.strokeStyle = 'blue';
+          context.rect(5, 5, 90, 90);
+          context.drawFocusIfNeeded(element);
+
+          var ringImage = context.getImageData(0, 0, 100, 100);
+          assert_equals(40000, ringImage.data.length, "ImageData.data.length is 40000");
+
+          // make sure refImage and ringImage are different
+          var length = 40000;
+          var index = length;
+          var identical = true;
+          while (--index > 0) {
+            if (refImage.data[index] != ringImage.data[index]) identical = false;
+          }
+
+          assert_true(identical, "No focus ring appears in the canvas");
+
+
+      }, 'drawFocusIfNeeded does not draw a focus ring if the element is not in focus.');
+    </script>
+    <div id="log"></div>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_003.html b/common/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_003.html
new file mode 100644 (file)
index 0000000..37fd7e1
--- /dev/null
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>drawFocusIfNeeded()</title>
+    <script src="../../resources/testharness.js"></script>
+    <script src="../../resources/testharnessreport.js"></script>
+    <link rel="author" title="W3C">
+    <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-drawFocusIfNeeded">
+  </head>
+  <body>
+    <h1>Description</h1>
+    <p>This test uses drawFocusIfNeeded does nothing if the element is not a descendant but comparing ImageData from before and after.</p>
+    <div>
+      <p>Before:</p>
+      <canvas height=100 width=100 id='original'>
+        <label><a href='http://www.w3.org' id='element'>Focus</a></label>
+      </canvas>
+      <p>After:</p>
+      <canvas height=100 width=100 id=canvas>
+      </canvas>
+    </div>
+    <script>
+      test(function() {
+          var canvas = document.getElementById('canvas');
+          var context = canvas.getContext('2d');
+          var element = document.getElementById('element');
+          element.focus();
+          context.fillStyle = 'white';
+          context.fillRect(0, 0, 100, 100);
+          context.beginPath();
+          context.strokeStyle = 'black';
+          context.rect(10, 10, 80, 80);
+          context.stroke();
+          context.save();
+          var refImage = context.getImageData(0, 0, 100, 100);
+
+          assert_equals(40000, refImage.data.length, "ImageData.data.length is 40000");
+
+          var original = document.getElementById('original');
+          var o_context = original.getContext('2d');
+          o_context.fillStyle = 'white';
+          o_context.fillRect(0, 0, 100, 100);
+          o_context.putImageData(refImage, 0, 0, 0, 0, 100, 100);
+
+
+
+          context.strokeStyle = 'blue';
+          context.rect(5, 5, 90, 90);
+          context.drawFocusIfNeeded(element);
+
+          var ringImage = context.getImageData(0, 0, 100, 100);
+          assert_equals(40000, ringImage.data.length, "ImageData.data.length is 40000");
+
+          // make sure refImage and ringImage are different
+          var length = 40000;
+          var index = length;
+          var identical = true;
+          while (--index > 0) {
+            if (refImage.data[index] != ringImage.data[index]) identical = false;
+          }
+
+          assert_true(identical, "No focus ring appears in the canvas");
+
+
+      }, 'drawFocusIfNeeded does not draw a focus ring if the element is not a descendant of the context.');
+    </script>
+    <div id="log"></div>
+  </body>
+</html>
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/fallback.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/fallback.basic.html
new file mode 100644 (file)
index 0000000..5eafabe
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: fallback.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.fallback.html">fallback</a>.basic</h1>
+<p class="desc">Fallback content is inserted into the DOM</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.fallback">fallback</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertEqual(canvas.childNodes.length, 1, "canvas.childNodes.length", "1");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/fallback.multiple.html b/common/tct-canvas-html5-tests/canvas/w3c/fallback.multiple.html
new file mode 100644 (file)
index 0000000..aa01397
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: fallback.multiple</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.fallback.html">fallback</a>.multiple</h1>
+<p class="desc">Fallback content with multiple elements</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.fallback">fallback</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL</p><p class="fallback">FAIL</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertEqual(canvas.childNodes.length, 2, "canvas.childNodes.length", "2");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/fallback.nested.html b/common/tct-canvas-html5-tests/canvas/w3c/fallback.nested.html
new file mode 100644 (file)
index 0000000..41a33d1
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: fallback.nested</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.fallback.html">fallback</a>.nested</h1>
+<p class="desc">Fallback content containing another canvas (mostly testing parsers)</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.fallback">fallback</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><canvas><p class="fallback">FAIL (fallback content)</p></canvas><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertEqual(canvas.childNodes.length, 2, "canvas.childNodes.length", "2");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/green-100x50.png b/common/tct-canvas-html5-tests/canvas/w3c/green-100x50.png
new file mode 100644 (file)
index 0000000..2b7577d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/green-100x50.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/historical.html b/common/tct-canvas-html5-tests/canvas/w3c/historical.html
new file mode 100644 (file)
index 0000000..12a2829
--- /dev/null
@@ -0,0 +1,20 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Historical canvas features</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function() {
+var canvas = document.createElement("canvas");
+
+_assertEqual("supportsContext" in canvas, false, "'supportsContext' in canvas", "false");
+_assertEqual("probablySupportsContext" in canvas, false, "'probablySupportsContext' in canvas", "false");
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/imagesmoothing.html b/common/tct-canvas-html5-tests/canvas/w3c/imagesmoothing.html
new file mode 100644 (file)
index 0000000..f9c2c12
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>CanvasRenderingContext2D imageSmoothingEnabled test</title>
+    <script src="../../resources/testharness.js"></script>
+    <script src="../../resources/testharnessreport.js"></script>
+    <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>
+      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>
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.colour.html b/common/tct-canvas-html5-tests/canvas/w3c/initial.colour.html
new file mode 100644 (file)
index 0000000..00cc8ff
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: initial.colour</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.initial.html">initial</a>.colour</h1>
+<p class="desc">Initial state is transparent black</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.initial.colour">initial.colour</a>
+</ul>
+</div>
+<p class="notes">Output should be transparent black (not transparent anything-else), but manual
+verification can only confirm that it's transparent - it's not possible to make
+the actual blackness visible.
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="initial.colour.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertPixel(canvas, 20,20, 0,0,0,0, "20,20", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.colour.png b/common/tct-canvas-html5-tests/canvas/w3c/initial.colour.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/initial.colour.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.2dstate.html b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.2dstate.html
new file mode 100644 (file)
index 0000000..731ba32
--- /dev/null
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<title>Canvas test: initial.reset.2dstate</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.initial.html">initial</a>.<a href="index.initial.reset.html">reset</a>.2dstate</h1>
+<p class="desc">Resetting the canvas state resets 2D state variables</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.initial.reset">initial.reset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 100;
+var default_val;
+
+default_val = ctx.strokeStyle;
+ctx.strokeStyle = "#ff0000";
+canvas.width = 100;
+_assertSame(ctx.strokeStyle, default_val, "ctx.strokeStyle", "default_val");
+
+default_val = ctx.fillStyle;
+ctx.fillStyle = "#ff0000";
+canvas.width = 100;
+_assertSame(ctx.fillStyle, default_val, "ctx.fillStyle", "default_val");
+
+default_val = ctx.globalAlpha;
+ctx.globalAlpha = 0.5;
+canvas.width = 100;
+_assertSame(ctx.globalAlpha, default_val, "ctx.globalAlpha", "default_val");
+
+default_val = ctx.lineWidth;
+ctx.lineWidth = 0.5;
+canvas.width = 100;
+_assertSame(ctx.lineWidth, default_val, "ctx.lineWidth", "default_val");
+
+default_val = ctx.lineCap;
+ctx.lineCap = "round";
+canvas.width = 100;
+_assertSame(ctx.lineCap, default_val, "ctx.lineCap", "default_val");
+
+default_val = ctx.lineJoin;
+ctx.lineJoin = "round";
+canvas.width = 100;
+_assertSame(ctx.lineJoin, default_val, "ctx.lineJoin", "default_val");
+
+default_val = ctx.miterLimit;
+ctx.miterLimit = 0.5;
+canvas.width = 100;
+_assertSame(ctx.miterLimit, default_val, "ctx.miterLimit", "default_val");
+
+default_val = ctx.shadowOffsetX;
+ctx.shadowOffsetX = 5;
+canvas.width = 100;
+_assertSame(ctx.shadowOffsetX, default_val, "ctx.shadowOffsetX", "default_val");
+
+default_val = ctx.shadowOffsetY;
+ctx.shadowOffsetY = 5;
+canvas.width = 100;
+_assertSame(ctx.shadowOffsetY, default_val, "ctx.shadowOffsetY", "default_val");
+
+default_val = ctx.shadowBlur;
+ctx.shadowBlur = 5;
+canvas.width = 100;
+_assertSame(ctx.shadowBlur, default_val, "ctx.shadowBlur", "default_val");
+
+default_val = ctx.shadowColor;
+ctx.shadowColor = "#ff0000";
+canvas.width = 100;
+_assertSame(ctx.shadowColor, default_val, "ctx.shadowColor", "default_val");
+
+default_val = ctx.globalCompositeOperation;
+ctx.globalCompositeOperation = "copy";
+canvas.width = 100;
+_assertSame(ctx.globalCompositeOperation, default_val, "ctx.globalCompositeOperation", "default_val");
+
+default_val = ctx.font;
+ctx.font = "25px serif";
+canvas.width = 100;
+_assertSame(ctx.font, default_val, "ctx.font", "default_val");
+
+default_val = ctx.textAlign;
+ctx.textAlign = "center";
+canvas.width = 100;
+_assertSame(ctx.textAlign, default_val, "ctx.textAlign", "default_val");
+
+default_val = ctx.textBaseline;
+ctx.textBaseline = "bottom";
+canvas.width = 100;
+_assertSame(ctx.textBaseline, default_val, "ctx.textBaseline", "default_val");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.clip.html b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.clip.html
new file mode 100644 (file)
index 0000000..ec7416f
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Canvas test: initial.reset.clip</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.initial.html">initial</a>.<a href="index.initial.reset.html">reset</a>.clip</h1>
+<p class="desc">Resetting the canvas state resets the current clip region</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.initial.reset">initial.reset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 100;
+ctx.rect(0, 0, 1, 1);
+ctx.clip();
+canvas.width = 100;
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.different.html b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.different.html
new file mode 100644 (file)
index 0000000..bac5c01
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: initial.reset.different</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.initial.html">initial</a>.<a href="index.initial.reset.html">reset</a>.different</h1>
+<p class="desc">Changing size resets canvas to transparent black</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.initial.reset">initial.reset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="initial.reset.different.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 20,20, 255,0,0,255, "20,20", "255,0,0,255");
+canvas.width = 50;
+_assertPixel(canvas, 20,20, 0,0,0,0, "20,20", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.different.png b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.different.png
new file mode 100644 (file)
index 0000000..d83fdd5
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.different.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.gradient.html b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.gradient.html
new file mode 100644 (file)
index 0000000..318c1cc
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: initial.reset.gradient</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.initial.html">initial</a>.<a href="index.initial.reset.html">reset</a>.gradient</h1>
+<p class="desc">Resetting the canvas state does not invalidate any existing gradients</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.initial.reset">initial.reset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 50;
+var g = ctx.createLinearGradient(0, 0, 100, 0);
+g.addColorStop(0, '#0f0');
+g.addColorStop(1, '#0f0');
+canvas.width = 100;
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.path.html b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.path.html
new file mode 100644 (file)
index 0000000..54a38e6
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: initial.reset.path</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.initial.html">initial</a>.<a href="index.initial.reset.html">reset</a>.path</h1>
+<p class="desc">Resetting the canvas state resets the current path</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.initial.reset">initial.reset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="initial.reset.path.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 100;
+ctx.rect(0, 0, 100, 50);
+canvas.width = 100;
+ctx.fillStyle = '#f00';
+ctx.fill();
+_assertPixel(canvas, 20,20, 0,0,0,0, "20,20", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.path.png b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.path.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.path.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.pattern.html b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.pattern.html
new file mode 100644 (file)
index 0000000..f77ca04
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>Canvas test: initial.reset.pattern</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.initial.html">initial</a>.<a href="index.initial.reset.html">reset</a>.pattern</h1>
+<p class="desc">Resetting the canvas state does not invalidate any existing patterns</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.initial.reset">initial.reset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 30;
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 30, 50);
+var p = ctx.createPattern(canvas, 'repeat-x');
+canvas.width = 100;
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = p;
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.same.html b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.same.html
new file mode 100644 (file)
index 0000000..3168a42
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: initial.reset.same</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.initial.html">initial</a>.<a href="index.initial.reset.html">reset</a>.same</h1>
+<p class="desc">Setting size (not changing the value) resets canvas to transparent black</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.initial.reset">initial.reset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="initial.reset.same.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 100;
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 50, 50);
+_assertPixel(canvas, 20,20, 255,0,0,255, "20,20", "255,0,0,255");
+canvas.width = 100;
+_assertPixel(canvas, 20,20, 0,0,0,0, "20,20", "0,0,0,0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.same.png b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.same.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.same.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.transform.html b/common/tct-canvas-html5-tests/canvas/w3c/initial.reset.transform.html
new file mode 100644 (file)
index 0000000..d2ace3d
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: initial.reset.transform</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.initial.html">initial</a>.<a href="index.initial.reset.html">reset</a>.transform</h1>
+<p class="desc">Resetting the canvas state resets the current transformation matrix</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.initial.reset">initial.reset</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 100;
+ctx.scale(0.1, 0.1);
+canvas.width = 100;
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+_assertPixel(canvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/security.dataURI.html b/common/tct-canvas-html5-tests/canvas/w3c/security.dataURI.html
new file mode 100644 (file)
index 0000000..b1994c2
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: security.dataURI</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>security.dataURI</h1>
+<p class="desc">data: URIs do not count as different-origin, and do not taint the canvas</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var data = canvas.toDataURL();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+var img = new Image();
+deferTest();
+img.onload = wrapFunction(function ()
+{
+    ctx.drawImage(img, 0, 0);
+    canvas.toDataURL(); // should be permitted
+    _assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+});
+img.src = data;
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/security.pattern.canvas.timing.sub.html b/common/tct-canvas-html5-tests/canvas/w3c/security.pattern.canvas.timing.sub.html
new file mode 100644 (file)
index 0000000..b3d323a
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>Canvas test: security.pattern.canvas.timing.sub</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>security.pattern.canvas.timing.sub</h1>
+<p class="desc">Pattern safety depends on whether the source was origin-clean, not on whether it still is clean</p>
+
+<p class="notes">Disagrees with spec on "is" vs "was"
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+canvas2.width = 100;
+canvas2.height = 50;
+var ctx2 = canvas2.getContext('2d');
+ctx2.fillStyle = '#0f0';
+ctx2.fillRect(0, 0, 100, 50);
+var p = ctx.createPattern(canvas2, 'repeat');
+ctx2.drawImage(document.getElementById('yellow.png'), 0, 0); // make canvas2 origin-unclean
+ctx.fillStyle = p;
+ctx.fillRect(0, 0, 100, 50);
+canvas.toDataURL();
+ctx.getImageData(0, 0, 1, 1);
+_assert(true, "true"); // okay if there was no exception
+
+
+});
+</script>
+<img src="http://{{domains[www2]}}:{{ports[http][0]}}/images/yellow.png" id="yellow.png" class="resource">
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/security.pattern.create.sub.html b/common/tct-canvas-html5-tests/canvas/w3c/security.pattern.create.sub.html
new file mode 100644 (file)
index 0000000..c8743b2
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>Canvas test: security.pattern.create.sub</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>security.pattern.create.sub</h1>
+<p class="desc">Creating an unclean pattern does not make the canvas origin-unclean</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var p = ctx.createPattern(document.getElementById('yellow.png'), 'repeat');
+canvas.toDataURL();
+ctx.getImageData(0, 0, 1, 1);
+_assert(true, "true"); // okay if there was no exception
+
+
+});
+</script>
+<img src="http://{{domains[www]}}:{{ports[http][0]}}/images/yellow.png" id="yellow.png" class="resource">
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.default.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.default.html
new file mode 100644 (file)
index 0000000..4e31b19
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.default</h1>
+<p class="desc">Default width/height when attributes are missing</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.default">size.default</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.missing">size.missing</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" ><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.default.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 300, "canvas.width", "300");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+_assert(!canvas.hasAttribute('width'), "!canvas.hasAttribute('width')");
+_assert(!canvas.hasAttribute('height'), "!canvas.hasAttribute('height')");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.default.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.default.png
new file mode 100644 (file)
index 0000000..a72d047
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.default.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.get.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.get.html
new file mode 100644 (file)
index 0000000..b4a5410
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.get</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.get</h1>
+<p class="desc">Getting width/height IDL/content attributes</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.width">size.width</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.height">size.height</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="120" height="60"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.get.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 120, "canvas.width", "120");
+_assertSame(canvas.height, 60, "canvas.height", "60");
+_assertSame(canvas.getAttribute('width'), '120', "canvas.getAttribute('width')", "'120'");
+_assertSame(canvas.getAttribute('height'), '60', "canvas.getAttribute('height')", "'60'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.get.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.get.png
new file mode 100644 (file)
index 0000000..47830c8
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.get.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.html
new file mode 100644 (file)
index 0000000..bff2e5d
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.idl</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.idl</h1>
+<p class="desc">Getting/setting width/height IDL attributes</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.width">size.width</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.height">size.height</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = "100";
+canvas.height = "100";
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+
+canvas.width = "+1.5e2";
+canvas.height = "0x96";
+_assertSame(canvas.width, 150, "canvas.width", "150");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+
+canvas.width = 200 - Math.pow(2, 32);
+canvas.height = 200 - Math.pow(2, 32);
+_assertSame(canvas.width, 200, "canvas.width", "200");
+_assertSame(canvas.height, 200, "canvas.height", "200");
+
+canvas.width = 301.999;
+canvas.height = 301.001;
+_assertSame(canvas.width, 301, "canvas.width", "301");
+_assertSame(canvas.height, 301, "canvas.height", "301");
+
+canvas.width = "400x";
+canvas.height = "foo";
+_assertSame(canvas.width, 0, "canvas.width", "0");
+_assertSame(canvas.height, 0, "canvas.height", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.set.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.set.zero.html
new file mode 100644 (file)
index 0000000..9b5f38b
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.idl.set.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.idl.html">idl</a>.<a href="index.size.attributes.idl.set.html">set</a>.zero</h1>
+<p class="desc">Setting width/height IDL attributes to 0</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.width">size.width</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.height">size.height</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 0;
+canvas.height = 0;
+_assertSame(canvas.width, 0, "canvas.width", "0");
+_assertSame(canvas.height, 0, "canvas.height", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.decimal.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.decimal.html
new file mode 100644 (file)
index 0000000..cc0e564
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.decimal</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.decimal</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100.999" height="100.999"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.decimal.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100.999', "canvas.getAttribute('width')", "'100.999'");
+_assertSame(canvas.getAttribute('height'), '100.999', "canvas.getAttribute('height')", "'100.999'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.decimal.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.decimal.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.decimal.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.em.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.em.html
new file mode 100644 (file)
index 0000000..59c393e
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.em</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.em</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100em" height="100em"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.em.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100em', "canvas.getAttribute('width')", "'100em'");
+_assertSame(canvas.getAttribute('height'), '100em', "canvas.getAttribute('height')", "'100em'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.em.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.em.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.em.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.empty.html
new file mode 100644 (file)
index 0000000..a608f21
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.empty</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.error">size.error</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="" height=""><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.empty.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 300, "canvas.width", "300");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+_assertSame(canvas.getAttribute('width'), '', "canvas.getAttribute('width')", "''");
+_assertSame(canvas.getAttribute('height'), '', "canvas.getAttribute('height')", "''");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.empty.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.empty.png
new file mode 100644 (file)
index 0000000..a72d047
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.empty.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.exp.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.exp.html
new file mode 100644 (file)
index 0000000..9f060fa
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.exp</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.exp</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100e1" height="100e1"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.exp.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100e1', "canvas.getAttribute('width')", "'100e1'");
+_assertSame(canvas.getAttribute('height'), '100e1', "canvas.getAttribute('height')", "'100e1'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.exp.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.exp.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.exp.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.hex.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.hex.html
new file mode 100644 (file)
index 0000000..004059e
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.hex</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.hex</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="0x100" height="0x100"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 0, "canvas.width", "0");
+_assertSame(canvas.height, 0, "canvas.height", "0");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\"");
+_assertSame(canvas.getAttribute('width'), '0x100', "canvas.getAttribute('width')", "'0x100'");
+_assertSame(canvas.getAttribute('height'), '0x100', "canvas.getAttribute('height')", "'0x100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.junk.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.junk.html
new file mode 100644 (file)
index 0000000..84b9dc6
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.junk</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.junk</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.error">size.error</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="#!?" height="#!?"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.junk.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 300, "canvas.width", "300");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+_assertSame(canvas.getAttribute('width'), '#!?', "canvas.getAttribute('width')", "'#!?'");
+_assertSame(canvas.getAttribute('height'), '#!?', "canvas.getAttribute('height')", "'#!?'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.junk.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.junk.png
new file mode 100644 (file)
index 0000000..a72d047
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.junk.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.minus.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.minus.html
new file mode 100644 (file)
index 0000000..7e1eb72
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.minus</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.minus</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.error">size.error</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="-100" height="-100"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.minus.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 300, "canvas.width", "300");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+_assertSame(canvas.getAttribute('width'), '-100', "canvas.getAttribute('width')", "'-100'");
+_assertSame(canvas.getAttribute('height'), '-100', "canvas.getAttribute('height')", "'-100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.minus.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.minus.png
new file mode 100644 (file)
index 0000000..a72d047
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.minus.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.octal.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.octal.html
new file mode 100644 (file)
index 0000000..99f4d05
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.octal</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.octal</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="0100" height="0100"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.octal.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '0100', "canvas.getAttribute('width')", "'0100'");
+_assertSame(canvas.getAttribute('height'), '0100', "canvas.getAttribute('height')", "'0100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.octal.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.octal.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.octal.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.onlyspace.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.onlyspace.html
new file mode 100644 (file)
index 0000000..ae6df5a
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.onlyspace</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.onlyspace</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.error">size.error</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="  " height="  "><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.onlyspace.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 300, "canvas.width", "300");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+_assertSame(canvas.getAttribute('width'), '  ', "canvas.getAttribute('width')", "'  '");
+_assertSame(canvas.getAttribute('height'), '  ', "canvas.getAttribute('height')", "'  '");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.onlyspace.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.onlyspace.png
new file mode 100644 (file)
index 0000000..a72d047
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.onlyspace.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.percent.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.percent.html
new file mode 100644 (file)
index 0000000..b359601
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.percent</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.percent</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100%" height="100%"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.percent.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100%', "canvas.getAttribute('width')", "'100%'");
+_assertSame(canvas.getAttribute('height'), '100%', "canvas.getAttribute('height')", "'100%'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.percent.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.percent.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.percent.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.plus.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.plus.html
new file mode 100644 (file)
index 0000000..15cb118
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.plus</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.plus</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="+100" height="+100"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.plus.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '+100', "canvas.getAttribute('width')", "'+100'");
+_assertSame(canvas.getAttribute('height'), '+100', "canvas.getAttribute('height')", "'+100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.plus.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.plus.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.plus.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.space.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.space.html
new file mode 100644 (file)
index 0000000..674fbd7
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.space</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.space</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="  100" height="  100"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.space.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '  100', "canvas.getAttribute('width')", "'  100'");
+_assertSame(canvas.getAttribute('height'), '  100', "canvas.getAttribute('height')", "'  100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.space.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.space.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.space.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.trailingjunk.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.trailingjunk.html
new file mode 100644 (file)
index 0000000..fd34a31
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.trailingjunk</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.trailingjunk</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100#!?" height="100#!?"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.trailingjunk.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100#!?', "canvas.getAttribute('width')", "'100#!?'");
+_assertSame(canvas.getAttribute('height'), '100#!?', "canvas.getAttribute('height')", "'100#!?'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.trailingjunk.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.trailingjunk.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.trailingjunk.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.whitespace.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.whitespace.html
new file mode 100644 (file)
index 0000000..83d2a02
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.whitespace</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.whitespace</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="
+       \f100" height="
+       \f100"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.whitespace.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '\n\t\x0c100', "canvas.getAttribute('width')", "'\\n\\t\\x0c100'");
+_assertSame(canvas.getAttribute('height'), '\n\t\x0c100', "canvas.getAttribute('height')", "'\\n\\t\\x0c100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.whitespace.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.whitespace.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.whitespace.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.zero.html
new file mode 100644 (file)
index 0000000..72a6b20
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.parse.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.parse.html">parse</a>.zero</h1>
+<p class="desc">Parsing of non-negative integers</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="0" height="0"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 0, "canvas.width", "0");
+_assertSame(canvas.height, 0, "canvas.height", "0");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\"");
+_assertSame(canvas.getAttribute('width'), '0', "canvas.getAttribute('width')", "'0'");
+_assertSame(canvas.getAttribute('height'), '0', "canvas.getAttribute('height')", "'0'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setcontent.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setcontent.html
new file mode 100644 (file)
index 0000000..57e14dc
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.reflect.setcontent</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.reflect.html">reflect</a>.setcontent</h1>
+<p class="desc">Setting content attributes updates IDL and content attributes</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.reflect">size.reflect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.reflect.setcontent.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '120');
+canvas.setAttribute('height', '60');
+_assertSame(canvas.getAttribute('width'), '120', "canvas.getAttribute('width')", "'120'");
+_assertSame(canvas.getAttribute('height'), '60', "canvas.getAttribute('height')", "'60'");
+_assertSame(canvas.width, 120, "canvas.width", "120");
+_assertSame(canvas.height, 60, "canvas.height", "60");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setcontent.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setcontent.png
new file mode 100644 (file)
index 0000000..47830c8
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setcontent.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidl.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidl.html
new file mode 100644 (file)
index 0000000..cf13115
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.reflect.setidl</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.reflect.html">reflect</a>.setidl</h1>
+<p class="desc">Setting IDL attributes updates IDL and content attributes</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.reflect">size.reflect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.reflect.setidl.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 120;
+canvas.height = 60;
+_assertSame(canvas.getAttribute('width'), '120', "canvas.getAttribute('width')", "'120'");
+_assertSame(canvas.getAttribute('height'), '60', "canvas.getAttribute('height')", "'60'");
+_assertSame(canvas.width, 120, "canvas.width", "120");
+_assertSame(canvas.height, 60, "canvas.height", "60");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidl.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidl.png
new file mode 100644 (file)
index 0000000..47830c8
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidl.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidlzero.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidlzero.html
new file mode 100644 (file)
index 0000000..42228e8
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.reflect.setidlzero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.reflect.html">reflect</a>.setidlzero</h1>
+<p class="desc">Setting IDL attributes to 0 updates IDL and content attributes</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.reflect">size.reflect</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.width = 0;
+canvas.height = 0;
+_assertSame(canvas.getAttribute('width'), '0', "canvas.getAttribute('width')", "'0'");
+_assertSame(canvas.getAttribute('height'), '0', "canvas.getAttribute('height')", "'0'");
+_assertSame(canvas.width, 0, "canvas.width", "0");
+_assertSame(canvas.height, 0, "canvas.height", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.removed.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.removed.html
new file mode 100644 (file)
index 0000000..c458307
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.removed</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.removed</h1>
+<p class="desc">Removing content attributes reverts to default size</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.missing">size.missing</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="120" height="60"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.removed.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(canvas.width, 120, "canvas.width", "120");
+canvas.removeAttribute('width');
+_assertSame(canvas.width, 300, "canvas.width", "300");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.removed.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.removed.png
new file mode 100644 (file)
index 0000000..1ebf30d
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.removed.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.decimal.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.decimal.html
new file mode 100644 (file)
index 0000000..d329737
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.decimal</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.decimal</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.decimal.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '100.999');
+canvas.setAttribute('height', '100.999');
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100.999', "canvas.getAttribute('width')", "'100.999'");
+_assertSame(canvas.getAttribute('height'), '100.999', "canvas.getAttribute('height')", "'100.999'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.decimal.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.decimal.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.decimal.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.em.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.em.html
new file mode 100644 (file)
index 0000000..c2fe069
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.em</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.em</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.em.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '100em');
+canvas.setAttribute('height', '100em');
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100em', "canvas.getAttribute('width')", "'100em'");
+_assertSame(canvas.getAttribute('height'), '100em', "canvas.getAttribute('height')", "'100em'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.em.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.em.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.em.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.empty.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.empty.html
new file mode 100644 (file)
index 0000000..cce26da
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.empty</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.empty</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.error">size.error</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.empty.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '');
+canvas.setAttribute('height', '');
+_assertSame(canvas.width, 300, "canvas.width", "300");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+_assertSame(canvas.getAttribute('width'), '', "canvas.getAttribute('width')", "''");
+_assertSame(canvas.getAttribute('height'), '', "canvas.getAttribute('height')", "''");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.empty.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.empty.png
new file mode 100644 (file)
index 0000000..a72d047
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.empty.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.exp.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.exp.html
new file mode 100644 (file)
index 0000000..671f8d7
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.exp</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.exp</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.exp.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '100e1');
+canvas.setAttribute('height', '100e1');
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100e1', "canvas.getAttribute('width')", "'100e1'");
+_assertSame(canvas.getAttribute('height'), '100e1', "canvas.getAttribute('height')", "'100e1'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.exp.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.exp.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.exp.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.hex.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.hex.html
new file mode 100644 (file)
index 0000000..7e521f1
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.hex</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.hex</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '0x100');
+canvas.setAttribute('height', '0x100');
+_assertSame(canvas.width, 0, "canvas.width", "0");
+_assertSame(canvas.height, 0, "canvas.height", "0");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\"");
+_assertSame(canvas.getAttribute('width'), '0x100', "canvas.getAttribute('width')", "'0x100'");
+_assertSame(canvas.getAttribute('height'), '0x100', "canvas.getAttribute('height')", "'0x100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.junk.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.junk.html
new file mode 100644 (file)
index 0000000..207dbd5
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.junk</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.junk</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.error">size.error</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.junk.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '#!?');
+canvas.setAttribute('height', '#!?');
+_assertSame(canvas.width, 300, "canvas.width", "300");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+_assertSame(canvas.getAttribute('width'), '#!?', "canvas.getAttribute('width')", "'#!?'");
+_assertSame(canvas.getAttribute('height'), '#!?', "canvas.getAttribute('height')", "'#!?'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.junk.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.junk.png
new file mode 100644 (file)
index 0000000..a72d047
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.junk.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.minus.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.minus.html
new file mode 100644 (file)
index 0000000..1a676f1
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.minus</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.minus</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.error">size.error</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.minus.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '-100');
+canvas.setAttribute('height', '-100');
+_assertSame(canvas.width, 300, "canvas.width", "300");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+_assertSame(canvas.getAttribute('width'), '-100', "canvas.getAttribute('width')", "'-100'");
+_assertSame(canvas.getAttribute('height'), '-100', "canvas.getAttribute('height')", "'-100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.minus.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.minus.png
new file mode 100644 (file)
index 0000000..a72d047
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.minus.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.octal.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.octal.html
new file mode 100644 (file)
index 0000000..25f88c8
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.octal</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.octal</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.octal.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '0100');
+canvas.setAttribute('height', '0100');
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '0100', "canvas.getAttribute('width')", "'0100'");
+_assertSame(canvas.getAttribute('height'), '0100', "canvas.getAttribute('height')", "'0100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.octal.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.octal.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.octal.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.onlyspace.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.onlyspace.html
new file mode 100644 (file)
index 0000000..a110df8
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.onlyspace</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>size.attributes.setAttribute.onlyspace</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.onlyspace.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '  ');
+canvas.setAttribute('height', '  ');
+_assertSame(canvas.width, 300, "canvas.width", "300");
+_assertSame(canvas.height, 150, "canvas.height", "150");
+_assertSame(canvas.getAttribute('width'), '  ', "canvas.getAttribute('width')", "'  '");
+_assertSame(canvas.getAttribute('height'), '  ', "canvas.getAttribute('height')", "'  '");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.onlyspace.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.onlyspace.png
new file mode 100644 (file)
index 0000000..a72d047
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.onlyspace.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.percent.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.percent.html
new file mode 100644 (file)
index 0000000..3bde7a8
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.percent</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.percent</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.percent.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '100%');
+canvas.setAttribute('height', '100%');
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100%', "canvas.getAttribute('width')", "'100%'");
+_assertSame(canvas.getAttribute('height'), '100%', "canvas.getAttribute('height')", "'100%'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.percent.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.percent.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.percent.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.plus.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.plus.html
new file mode 100644 (file)
index 0000000..a693b48
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.plus</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.plus</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.plus.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '+100');
+canvas.setAttribute('height', '+100');
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '+100', "canvas.getAttribute('width')", "'+100'");
+_assertSame(canvas.getAttribute('height'), '+100', "canvas.getAttribute('height')", "'+100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.plus.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.plus.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.plus.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.space.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.space.html
new file mode 100644 (file)
index 0000000..0def5c9
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.space</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.space</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.space.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '  100');
+canvas.setAttribute('height', '  100');
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '  100', "canvas.getAttribute('width')", "'  100'");
+_assertSame(canvas.getAttribute('height'), '  100', "canvas.getAttribute('height')", "'  100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.space.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.space.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.space.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.trailingjunk.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.trailingjunk.html
new file mode 100644 (file)
index 0000000..692ffd5
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.trailingjunk</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.trailingjunk</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.trailingjunk.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '100#!?');
+canvas.setAttribute('height', '100#!?');
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '100#!?', "canvas.getAttribute('width')", "'100#!?'");
+_assertSame(canvas.getAttribute('height'), '100#!?', "canvas.getAttribute('height')", "'100#!?'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.trailingjunk.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.trailingjunk.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.trailingjunk.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.whitespace.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.whitespace.html
new file mode 100644 (file)
index 0000000..fa192f9
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.whitespace</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.whitespace</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.setAttribute.whitespace.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '\r\n\t\x0c100');
+canvas.setAttribute('height', '\r\n\t\x0c100');
+_assertSame(canvas.width, 100, "canvas.width", "100");
+_assertSame(canvas.height, 100, "canvas.height", "100");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
+_assertSame(canvas.getAttribute('width'), '\r\n\t\x0c100', "canvas.getAttribute('width')", "'\\r\\n\\t\\x0c100'");
+_assertSame(canvas.getAttribute('height'), '\r\n\t\x0c100', "canvas.getAttribute('height')", "'\\r\\n\\t\\x0c100'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.whitespace.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.whitespace.png
new file mode 100644 (file)
index 0000000..f842673
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.whitespace.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.zero.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.zero.html
new file mode 100644 (file)
index 0000000..4585f78
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.setAttribute.zero</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.<a href="index.size.attributes.setAttribute.html">setAttribute</a>.zero</h1>
+<p class="desc">Parsing of non-negative integers in setAttribute</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.nonnegativeinteger">size.nonnegativeinteger</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+canvas.setAttribute('width', '0');
+canvas.setAttribute('height', '0');
+_assertSame(canvas.width, 0, "canvas.width", "0");
+_assertSame(canvas.height, 0, "canvas.height", "0");
+_assertEqual(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\"");
+_assertSame(canvas.getAttribute('width'), '0', "canvas.getAttribute('width')", "'0'");
+_assertSame(canvas.getAttribute('height'), '0', "canvas.getAttribute('height')", "'0'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.style.html b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.style.html
new file mode 100644 (file)
index 0000000..94e4b28
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: size.attributes.style</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.style</h1>
+<p class="desc">Canvas size is independent of CSS resizing</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.size.css">size.css</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="50" height="30" style="width: 100px; height: 50px"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="size.attributes.style.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertEqual(canvas.width, 50, "canvas.width", "50");
+_assertEqual(canvas.height, 30, "canvas.height", "30");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.style.png b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.style.png
new file mode 100644 (file)
index 0000000..eeedd0f
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/size.attributes.style.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.1.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.1.html
new file mode 100644 (file)
index 0000000..da268c5
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.arguments.1</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.arguments.html">arguments</a>.1</h1>
+<p class="desc">toDataURL ignores extra arguments</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.arguments">toDataURL.arguments</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL('image/png', 'another argument that should not raise an exception');
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.2.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.2.html
new file mode 100644 (file)
index 0000000..5efb755
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.arguments.2</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.arguments.html">arguments</a>.2</h1>
+<p class="desc">toDataURL ignores extra arguments</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.arguments">toDataURL.arguments</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL('image/png', 'another argument that should not raise an exception', 'and another');
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.3.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.3.html
new file mode 100644 (file)
index 0000000..814a48d
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.arguments.3</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.arguments.html">arguments</a>.3</h1>
+<p class="desc">toDataURL ignores extra arguments</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.arguments">toDataURL.arguments</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// More arguments that should not raise exceptions
+var data = canvas.toDataURL('image/png', null, null, null);
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.bogustype.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.bogustype.html
new file mode 100644 (file)
index 0000000..3fd57f4
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.bogustype</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.bogustype</h1>
+<p class="desc">toDataURL with a syntactically invalid type returns a PNG</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.unrecognised">toDataURL.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL('bogus');
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.default.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.default.html
new file mode 100644 (file)
index 0000000..770b44d
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.default</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.default</h1>
+<p class="desc">toDataURL with no arguments returns a PNG</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.noarguments">toDataURL.noarguments</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL();
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.alpha.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.alpha.html
new file mode 100644 (file)
index 0000000..41c5249
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.jpeg.alpha</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.jpeg.html">jpeg</a>.alpha</h1>
+<p class="desc">toDataURL with JPEG composites onto black</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.jpeg">toDataURL.jpeg</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.noalpha">toDataURL.noalpha</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="toDataURL.jpeg.alpha.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = 'rgba(128, 255, 128, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over'; // should be ignored by toDataURL
+var data = canvas.toDataURL('image/jpeg');
+ctx.globalCompositeOperation = 'source-over';
+if (!data.match(/^data:image\/jpeg[;,]/)) {
+  _assert(true, "true");
+} else {
+  ctx.fillStyle = '#f00';
+  ctx.fillRect(0, 0, 100, 50);
+  var img = new Image();
+  deferTest();
+  img.onload = wrapFunction(function ()
+  {
+      ctx.drawImage(img, 0, 0);
+      
+      _assertPixelApprox(canvas, 50,25, 63,127,63,255, "50,25", "63,127,63,255", 8);
+  });
+  img.src = data;
+}
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.alpha.png b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.alpha.png
new file mode 100644 (file)
index 0000000..5eba388
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.alpha.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.primarycolours.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.primarycolours.html
new file mode 100644 (file)
index 0000000..8b3276d
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.jpeg.primarycolours</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.jpeg.html">jpeg</a>.primarycolours</h1>
+<p class="desc">toDataURL with JPEG handles simple colours correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.jpeg">toDataURL.jpeg</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="toDataURL.jpeg.primarycolours.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#ff0';
+ctx.fillRect(0, 0, 25, 40);
+ctx.fillStyle = '#0ff';
+ctx.fillRect(25, 0, 50, 40);
+ctx.fillStyle = '#00f';
+ctx.fillRect(75, 0, 25, 40);
+ctx.fillStyle = '#fff';
+ctx.fillRect(0, 40, 100, 10);
+var data = canvas.toDataURL('image/jpeg'); // it is okay if this returns a PNG instead
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+var img = new Image();
+deferTest();
+img.onload = wrapFunction(function ()
+{
+    ctx.drawImage(img, 0, 0);
+    
+    _assertPixelApprox(canvas, 12,20, 255,255,0,255, "12,20", "255,255,0,255", 8);
+    _assertPixelApprox(canvas, 50,20, 0,255,255,255, "50,20", "0,255,255,255", 8);
+    _assertPixelApprox(canvas, 87,20, 0,0,255,255, "87,20", "0,0,255,255", 8);
+    _assertPixelApprox(canvas, 50,45, 255,255,255,255, "50,45", "255,255,255,255", 8);
+});
+img.src = data;
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.primarycolours.png b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.primarycolours.png
new file mode 100644 (file)
index 0000000..86649c7
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.primarycolours.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.basic.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.basic.html
new file mode 100644 (file)
index 0000000..66fdd52
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.jpeg.quality.basic</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.jpeg.html">jpeg</a>.<a href="index.toDataURL.jpeg.quality.html">quality</a>.basic</h1>
+<p class="desc">toDataURL with JPEG uses the quality parameter</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.jpeg.quality">toDataURL.jpeg.quality</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="toDataURL.jpeg.quality.basic.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#00f';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0ff';
+ctx.fillRect(0, 3, 100, 1);
+// Check for JPEG support first
+var data = canvas.toDataURL('image/jpeg');
+if (!data.match(/^data:image\/jpeg[;,]/)) {
+  _assert(true, "true");
+} else {
+  var data_hi = canvas.toDataURL('image/jpeg', 0.99);
+  var data_lo = canvas.toDataURL('image/jpeg', 0.01);
+  ctx.fillStyle = '#f00';
+  ctx.fillRect(0, 0, 100, 50);
+  deferTest();
+  var img_hi = new Image();
+  img_hi.onload = function ()
+  {
+      var img_lo = new Image();
+      img_lo.onload = wrapFunction(function ()
+      {
+          ctx.drawImage(img_hi, 0, 0, 50, 50, 0, 0, 50, 50);
+          ctx.drawImage(img_lo, 0, 0, 50, 50, 50, 0, 50, 50);
+          
+          _assert(data_hi.length > data_lo.length, "data_hi.length > data_lo.length");
+          _assertPixelApprox(canvas, 25,25, 0,0,255,255, "25,25", "0,0,255,255", 8);
+          _assertPixelApprox(canvas, 75,25, 0,0,255,255, "75,25", "0,0,255,255", 32);
+      });
+      img_lo.src = data_lo;
+  };
+  img_hi.src = data_hi;
+}
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.basic.png b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.basic.png
new file mode 100644 (file)
index 0000000..785ad39
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.basic.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.notnumber.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.notnumber.html
new file mode 100644 (file)
index 0000000..65f4084
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.jpeg.quality.notnumber</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.jpeg.html">jpeg</a>.<a href="index.toDataURL.jpeg.quality.html">quality</a>.notnumber</h1>
+<p class="desc">toDataURL with JPEG handles non-numeric quality parameters</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.jpeg.nan">toDataURL.jpeg.nan</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#00f';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0ff';
+ctx.fillRect(0, 3, 100, 1);
+// Check for JPEG support first
+var data = canvas.toDataURL('image/jpeg');
+if (!data.match(/^data:image\/jpeg[;,]/)) {
+  _assert(true, "true");
+} else {
+    _assertSame(canvas.toDataURL('image/jpeg', 'bogus'), data, "canvas.toDataURL('image/jpeg', 'bogus')", "data");
+    _assertSame(canvas.toDataURL('image/jpeg', {}), data, "canvas.toDataURL('image/jpeg', {})", "data");
+    _assertSame(canvas.toDataURL('image/jpeg', null), data, "canvas.toDataURL('image/jpeg', null)", "data");
+    _assertSame(canvas.toDataURL('image/jpeg', undefined), data, "canvas.toDataURL('image/jpeg', undefined)", "data");
+    _assertSame(canvas.toDataURL('image/jpeg', true), data, "canvas.toDataURL('image/jpeg', true)", "data");
+    _assertSame(canvas.toDataURL('image/jpeg', '0.01'), data, "canvas.toDataURL('image/jpeg', '0.01')", "data");
+}
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.outsiderange.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.outsiderange.html
new file mode 100644 (file)
index 0000000..c060760
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.jpeg.quality.outsiderange</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.jpeg.html">jpeg</a>.<a href="index.toDataURL.jpeg.quality.html">quality</a>.outsiderange</h1>
+<p class="desc">toDataURL with JPEG handles out-of-range quality parameters</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.jpeg.range">toDataURL.jpeg.range</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#00f';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0ff';
+ctx.fillRect(0, 3, 100, 1);
+// Check for JPEG support first
+var data = canvas.toDataURL('image/jpeg');
+if (!data.match(/^data:image\/jpeg[;,]/)) {
+  _assert(true, "true");
+} else {
+    _assertSame(canvas.toDataURL('image/jpeg', 10), data, "canvas.toDataURL('image/jpeg', 10)", "data");
+    _assertSame(canvas.toDataURL('image/jpeg', -10), data, "canvas.toDataURL('image/jpeg', -10)", "data");
+    _assertSame(canvas.toDataURL('image/jpeg', 1.01), data, "canvas.toDataURL('image/jpeg', 1.01)", "data");
+    _assertSame(canvas.toDataURL('image/jpeg', -0.01), data, "canvas.toDataURL('image/jpeg', -0.01)", "data");
+
+    _assert(canvas.toDataURL('image/jpeg', 1).length >= canvas.toDataURL('image/jpeg', 0.9).length, "canvas.toDataURL('image/jpeg', 1).length >= canvas.toDataURL('image/jpeg', 0.9).length");
+    _assert(canvas.toDataURL('image/jpeg', 0).length <= canvas.toDataURL('image/jpeg', 0.1).length, "canvas.toDataURL('image/jpeg', 0).length <= canvas.toDataURL('image/jpeg', 0.1).length");
+}
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpg.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpg.html
new file mode 100644 (file)
index 0000000..dea74f1
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.jpg</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>toDataURL.jpg</h1>
+<p class="desc">toDataURL with image/jpg is invalid type hence returns a PNG</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL('image/jpg');
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.ascii.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.ascii.html
new file mode 100644 (file)
index 0000000..e0ed6b7
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.lowercase.ascii</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.lowercase.html">lowercase</a>.ascii</h1>
+<p class="desc">toDataURL type is case-insensitive</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.lowercase">toDataURL.lowercase</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL('ImAgE/PnG');
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+// If JPEG is supported at all, it must be supported case-insensitively
+data = canvas.toDataURL('image/jpeg');
+if (data.match(/^data:image\/jpeg[;,]/)) {
+    data = canvas.toDataURL('ImAgE/JpEg');
+    _assertMatch(data, /^data:image\/jpeg[;,]/, "data", "/^data:image\\/jpeg[;,]/");
+}
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.unicode.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.unicode.html
new file mode 100644 (file)
index 0000000..3d4ebba
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.lowercase.unicode</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.lowercase.html">lowercase</a>.unicode</h1>
+<p class="desc">toDataURL type is ASCII-case-insensitive</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.lowercase">toDataURL.lowercase</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// Use LATIN CAPITAL LETTER I WITH DOT ABOVE (Unicode lowercase is "i")
+var data = canvas.toDataURL('\u0130mage/png');
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+var data = canvas.toDataURL('\u0130mage/jpeg');
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.nocontext.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.nocontext.html
new file mode 100644 (file)
index 0000000..1244e1e
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.nocontext</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.nocontext</h1>
+<p class="desc">toDataURL works before any context has been got</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.noarguments">toDataURL.noarguments</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var canvas2 = document.createElement('canvas');
+var data = canvas2.toDataURL();
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.complexcolours.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.complexcolours.html
new file mode 100644 (file)
index 0000000..4db03b3
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.png.complexcolours</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.png.html">png</a>.complexcolours</h1>
+<p class="desc">toDataURL with PNG handles non-primary and non-solid colours correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.png">toDataURL.png</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="toDataURL.png.complexcolours.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+// (These values are chosen to survive relatively alright through being premultiplied)
+ctx.fillStyle = 'rgba(1, 3, 254, 1)';
+ctx.fillRect(0, 0, 25, 25);
+ctx.fillStyle = 'rgba(8, 252, 248, 0.75)';
+ctx.fillRect(25, 0, 25, 25);
+ctx.fillStyle = 'rgba(6, 10, 250, 0.502)';
+ctx.fillRect(50, 0, 25, 25);
+ctx.fillStyle = 'rgba(12, 16, 244, 0.25)';
+ctx.fillRect(75, 0, 25, 25);
+var img = new Image();
+deferTest();
+img.onload = wrapFunction(function ()
+{
+    ctx.drawImage(img, 0, 25);
+    // (The alpha values do not really survive float->int conversion, so just
+    // do approximate comparisons)
+    _assertPixel(canvas, 12,40, 1,3,254,255, "12,40", "1,3,254,255");
+    _assertPixelApprox(canvas, 37,40, 8,252,248,191, "37,40", "8,252,248,191", 2);
+    _assertPixelApprox(canvas, 62,40, 6,10,250,127, "62,40", "6,10,250,127", 4);
+    _assertPixelApprox(canvas, 87,40, 12,16,244,63, "87,40", "12,16,244,63", 8);
+});
+img.src = canvas.toDataURL();
+_requireManualCheck();
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.complexcolours.png b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.complexcolours.png
new file mode 100644 (file)
index 0000000..9bc8146
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.complexcolours.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.html
new file mode 100644 (file)
index 0000000..e293e47
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.png</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.png</h1>
+<p class="desc">toDataURL with image/png returns a PNG</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.png">toDataURL.png</a>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.witharguments">toDataURL.witharguments</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL('image/png');
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.primarycolours.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.primarycolours.html
new file mode 100644 (file)
index 0000000..426a35b
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.png.primarycolours</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.<a href="index.toDataURL.png.html">png</a>.primarycolours</h1>
+<p class="desc">toDataURL with PNG handles simple colours correctly</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.png">toDataURL.png</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="toDataURL.png.primarycolours.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#ff0';
+ctx.fillRect(0, 0, 25, 40);
+ctx.fillStyle = '#0ff';
+ctx.fillRect(25, 0, 50, 40);
+ctx.fillStyle = '#00f';
+ctx.fillRect(75, 0, 25, 40);
+ctx.fillStyle = '#fff';
+ctx.fillRect(0, 40, 100, 10);
+var data = canvas.toDataURL();
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+var img = new Image();
+deferTest();
+img.onload = wrapFunction(function ()
+{
+    ctx.drawImage(img, 0, 0);
+    
+    _assertPixel(canvas, 12,20, 255,255,0,255, "12,20", "255,255,0,255");
+    _assertPixel(canvas, 50,20, 0,255,255,255, "50,20", "0,255,255,255");
+    _assertPixel(canvas, 87,20, 0,0,255,255, "87,20", "0,0,255,255");
+    _assertPixel(canvas, 50,45, 255,255,255,255, "50,45", "255,255,255,255");
+});
+img.src = data;
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.primarycolours.png b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.primarycolours.png
new file mode 100644 (file)
index 0000000..86649c7
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.primarycolours.png differ
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.unrecognised.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.unrecognised.html
new file mode 100644 (file)
index 0000000..5b2beeb
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.unrecognised</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.unrecognised</h1>
+<p class="desc">toDataURL with an unhandled type returns a PNG</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.unrecognised">toDataURL.unrecognised</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL('image/example');
+_assertMatch(data, /^data:image\/png[;,]/, "data", "/^data:image\\/png[;,]/");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.zeroheight.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.zeroheight.html
new file mode 100644 (file)
index 0000000..26f2546
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.zeroheight</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>toDataURL.zeroheight</h1>
+<p class="desc">toDataURL on zero-size canvas returns 'data:,'</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" height="0"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL();
+_assertSame(data, 'data:,', "data", "'data:,'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerosize.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerosize.html
new file mode 100644 (file)
index 0000000..e5ebc03
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.zerosize</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.toDataURL.html">toDataURL</a>.zerosize</h1>
+<p class="desc">toDataURL on zero-size canvas returns 'data:,'</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.toDataURL.zerosize">toDataURL.zerosize</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="0" height="0"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL();
+_assertSame(data, 'data:,', "data", "'data:,'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerowidth.html b/common/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerowidth.html
new file mode 100644 (file)
index 0000000..07e1ba4
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Canvas test: toDataURL.zerowidth</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>toDataURL.zerowidth</h1>
+<p class="desc">toDataURL on zero-size canvas returns 'data:,'</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="0"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+var data = canvas.toDataURL();
+_assertSame(data, 'data:,', "data", "'data:,'");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/type.delete.html b/common/tct-canvas-html5-tests/canvas/w3c/type.delete.html
new file mode 100644 (file)
index 0000000..9a39593
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Canvas test: type.delete</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>type.delete</h1>
+<p class="desc">window.HTMLCanvasElement interface object is [[Configurable]]</p>
+
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(delete window.HTMLCanvasElement, true, "delete window.HTMLCanvasElement", "true");
+_assertSame(window.HTMLCanvasElement, undefined, "window.HTMLCanvasElement", "undefined");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/type.exists.html b/common/tct-canvas-html5-tests/canvas/w3c/type.exists.html
new file mode 100644 (file)
index 0000000..abc0ede
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: type.exists</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.type.html">type</a>.exists</h1>
+<p class="desc">HTMLCanvasElement is a property of window</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.canvas.type">canvas.type</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assert(window.HTMLCanvasElement, "window.HTMLCanvasElement");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/type.extend.html b/common/tct-canvas-html5-tests/canvas/w3c/type.extend.html
new file mode 100644 (file)
index 0000000..5b5ea61
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: type.extend</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.type.html">type</a>.extend</h1>
+<p class="desc">HTMLCanvasElement methods can be added, and the new methods used by canvases</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.canvas.type">canvas.type</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+window.HTMLCanvasElement.prototype.getZero = function () { return 0; };
+_assertSame(canvas.getZero(), 0, "canvas.getZero()", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/type.name.html b/common/tct-canvas-html5-tests/canvas/w3c/type.name.html
new file mode 100644 (file)
index 0000000..78ea2b2
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Canvas test: type.name</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.type.html">type</a>.name</h1>
+<p class="desc">HTMLCanvasElement type and toString</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.canvas.type">canvas.type</a>
+</ul>
+</div>
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assertSame(Object.prototype.toString.call(canvas), '[object HTMLCanvasElement]', "Object.prototype.toString.call(canvas)", "'[object HTMLCanvasElement]'");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/type.prototype.html b/common/tct-canvas-html5-tests/canvas/w3c/type.prototype.html
new file mode 100644 (file)
index 0000000..0531c69
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Canvas test: type.prototype</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1>type.prototype</h1>
+<p class="desc">window.HTMLCanvasElement has prototype, which is { ReadOnly, DontDelete }. prototype has getContext, which is not</p>
+
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+_assert(window.HTMLCanvasElement.prototype, "window.HTMLCanvasElement.prototype");
+_assert(window.HTMLCanvasElement.prototype.getContext, "window.HTMLCanvasElement.prototype.getContext");
+window.HTMLCanvasElement.prototype = null;
+_assert(window.HTMLCanvasElement.prototype, "window.HTMLCanvasElement.prototype");
+delete window.HTMLCanvasElement.prototype;
+_assert(window.HTMLCanvasElement.prototype, "window.HTMLCanvasElement.prototype");
+window.HTMLCanvasElement.prototype.getContext = 1;
+_assertSame(window.HTMLCanvasElement.prototype.getContext, 1, "window.HTMLCanvasElement.prototype.getContext", "1");
+delete window.HTMLCanvasElement.prototype.getContext;
+_assertSame(window.HTMLCanvasElement.prototype.getContext, undefined, "window.HTMLCanvasElement.prototype.getContext", "undefined");
+
+
+});
+</script>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/type.replace.html b/common/tct-canvas-html5-tests/canvas/w3c/type.replace.html
new file mode 100644 (file)
index 0000000..9cd0c51
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>Canvas test: type.replace</title>
+<meta name="author" content="Philip Taylor">
+<script src="../common/canvas-tests.js"></script>
+<link rel="stylesheet" href="../common/canvas-tests.css">
+<body class="show_output">
+
+<h1><a href="index.type.html">type</a>.replace</h1>
+<p class="desc">HTMLCanvasElement methods can be replaced, and the replacement methods used by canvases</p>
+
+<div class="refs">Spec references:
+<ul>
+<li><a href="../annotated-spec/canvas.html#testrefs.canvas.type">canvas.type</a>
+</ul>
+</div>
+<p class="notes">Defined in "Web IDL" (draft)
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+_addTest(function(canvas, ctx) {
+
+window.HTMLCanvasElement.prototype.getContext = function (name) { return 0; };
+_assertSame(canvas.getContext('2d'), 0, "canvas.getContext('2d')", "0");
+
+
+});
+</script>
+
diff --git a/common/tct-canvas-html5-tests/canvas/w3c/yellow.png b/common/tct-canvas-html5-tests/canvas/w3c/yellow.png
new file mode 100644 (file)
index 0000000..51e8aaf
Binary files /dev/null and b/common/tct-canvas-html5-tests/canvas/w3c/yellow.png differ
diff --git a/common/tct-canvas-html5-tests/common/COPYING b/common/tct-canvas-html5-tests/common/COPYING
new file mode 100644 (file)
index 0000000..480f4a4
--- /dev/null
@@ -0,0 +1,49 @@
+All test files except this COPYING and Makefile.am under this folder come from
+http://w3c-test.org/html/tests/approved/common/
+with modification below:
+media.js
+
+ function getVideoURI(base)
+ {
+-    var extension = '.mp4';
++    var extension = '.ogv';
+     var videotag = document.createElement("video");
+     if ( videotag.canPlayType  &&
+-         videotag.canPlayType('video/ogg; codecs="theora, vorbis"') )
++         videotag.canPlayType('video/mp4') )
+     {
+-        extension = '.ogv';
++        extension = '.mp4';
+     }
+     return base + extension;
+ }
+
+ function getAudioURI(base)
+ {
+-    var extension = '.mp3';
++    var extension = '.oga';
+     var audiotag = document.createElement("audio");
+     if ( audiotag.canPlayType &&
+-         audiotag.canPlayType('audio/ogg') )
++        audiotag.canPlayType('audio/mpeg') )
+     {
+-        extension = '.oga';
++        extension = '.mp3';
+     }
+     return base + extension;
+ }
+
+These tests are copyright by W3C and/or the author listed in the test
+file. The tests are dual-licensed under the W3C Test Suite License:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+and the BSD 3-clause License:
+http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+under W3C's test suite licensing policy:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
+
diff --git a/common/tct-canvas-html5-tests/common/domtestcase.js b/common/tct-canvas-html5-tests/common/domtestcase.js
new file mode 100644 (file)
index 0000000..49ad747
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+*/
+  
+//
+// Log to console wrapper, use this so one doesn't create script errors on
+// user agents that don't support console.log
+function consoleLog(description)
+{
+    try
+       {
+           console.log(description);
+       }
+       catch(e)
+       {
+           alert(description);
+       }
+       
+}
+
+function assertEquals(description, expected, actual)
+{
+    var szError = description + " assertEquals failure: \r\n";
+
+    if ( !(expected === actual))
+    {
+        szError = szError + "expected=" + expected + " \r\n";
+        szError = szError + "actual=" + actual + " \r\n";
+
+        throw szError;
+    }
+}
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/common/media.js b/common/tct-canvas-html5-tests/common/media.js
new file mode 100644 (file)
index 0000000..620508f
--- /dev/null
@@ -0,0 +1,282 @@
+//
+// Returns whether the 'relative' parameter, resolved to an absolute URI,
+// is a match for the 'absolute' parameter
+//
+function isResolvedURI(absolute, relative)
+{
+    // This regex matches if the target starts with the current protocol,
+    // contains the current host, and ends with 'relative'
+    var regex = new RegExp('^' + location.protocol + '\/\/' + '.*' +
+        location.hostname + '.*' + relative + '$', 'i');
+    
+    return absolute.match(regex);
+}
+
+//
+// Returns whether the given variable is a valid value for a 'preload' property
+//
+function isValidPreloadValue(preload)
+{
+    preload = preload.toLowerCase();
+       return preload == "" || preload == "none" || preload == "metadata" ||
+               preload == "auto";
+}
+
+//
+// Returns the URI of a supported video source based on the user agent
+//
+function getVideoURI(base)
+{
+    var extension = '.ogv';
+
+    var videotag = document.createElement("video");
+
+    if ( videotag.canPlayType  &&
+         videotag.canPlayType('video/mp4') )
+    {
+        extension = '.mp4';
+    }
+
+    return base + extension;
+}
+
+//
+// Returns the URI of a supported audio source based on the user agent
+//
+function getAudioURI(base)
+{
+    var extension = '.oga';
+
+    var audiotag = document.createElement("audio");
+
+    if ( audiotag.canPlayType &&
+        audiotag.canPlayType('audio/mpeg') )
+    {
+        extension = '.mp3';
+    }
+
+    return base + extension;
+}
+
+//
+// Returns the mime type (and codecs parameter) of a supported video source
+// based on the user agent
+//
+function getVideoType(codecs)
+{
+    var mime = 'video/mp4';
+    var codecs_param = 'avc1.42E01E, mp4a.40.2';
+
+    var videotag = document.createElement("video");
+    
+    if ( videotag.canPlayType  &&
+         videotag.canPlayType('video/ogg; codecs="theora, vorbis"') )
+    {
+        mime = 'video/ogg';
+        codecs_param = 'theora, vorbis';
+    }
+
+    if ( codecs )
+    {
+        return mime + '; codecs="' + codecs_param + '"';
+    }
+    else
+    {
+        return mime;
+    }
+}
+
+var result_timeout = 0;
+
+//
+// Clear the result timeout so that the test will not automatically pass/fail
+//
+function clearResultTimeout()
+{
+    if (result_timeout != 0)
+    {
+        window.clearTimeout(result_timeout);
+        result_timeout = 0;
+    }
+}
+
+//
+// Passes the test
+//
+function passTest()
+{
+    document.getElementById("test_0_result").innerHTML = "PASS";
+    clearResultTimeout();
+}
+
+//
+// Fails the test
+//
+function failTest()
+{
+    document.getElementById("test_0_result").innerHTML = "FAIL";
+    clearResultTimeout();
+}
+
+//
+// Signals that the pass condition in this test should be manually verified
+//
+function manualTest()
+{
+    document.getElementById("test_0_result").innerHTML = "Manual";
+    clearResultTimeout();
+}
+
+//
+// Set the test to automatically fail after a timeout is reached
+//
+function setFailTimeout(milliseconds)
+{
+    clearResultTimeout();
+    result_timeout = window.setTimeout("failTest();", milliseconds);
+}
+
+//
+// Set the test to automatically pass after a timeout is reached
+//
+function setPassTimeout(milliseconds)
+{
+    clearResultTimeout();
+    result_timeout = window.setTimeout("passTest();", milliseconds);
+}
+
+//
+// Find an unbuffered time in the media resource
+//
+function findUnbufferedTime(media)
+{
+    var max = 0;
+        
+    for (var i=0; i < media.buffered.length; i++)
+    {
+        if (media.buffered.end(i) > max)
+        {
+            max = media.buffered.end(i);
+        }
+    }
+
+    if (max < media.duration)
+    {
+        return (max + media.duration) / 2;
+    }
+    else
+    {
+        return -1;
+    }
+}
+
+//
+// Returns whether the actual time is approximately the expected time (within a
+// tolerance)
+//
+function isApprox(actual, expected, tolerance)
+{
+    return ((expected - tolerance) < actual) && (actual < (expected + tolerance));
+}
+
+var checkPlaybackRate_media = null;
+var checkPlaybackRate_tolerance = -1;
+var checkPlaybackRate_callback = function(result){};
+var checkPlaybackRate_time = -1;
+var checkPlaybackRate_timeout = 0;
+var checkPlaybackRate_seconds = -1;
+var checkPlaybackRate_playbackRate = 0;
+
+function checkPlaybackRate_check()
+{
+    var rate = (checkPlaybackRate_media.currentTime - checkPlaybackRate_time) / checkPlaybackRate_seconds;
+
+    checkPlaybackRate_callback(
+        isApprox(
+            rate, 
+            checkPlaybackRate_playbackRate, 
+            checkPlaybackRate_tolerance
+            )
+        );
+}
+
+//
+// Checks that the playback rate is a given value by estimating the actual rate
+// over time
+//
+function checkPlaybackRate(media, playbackRate, seconds, tolerance, callback)
+{
+    if (checkPlaybackRate_timeout != 0)
+    {
+        window.clearTimeout(checkPlaybackRate_timeout);
+        checkPlaybackRate_timeout = 0;
+    }
+
+    checkPlaybackRate_media = media;
+    checkPlaybackRate_playbackRate = playbackRate;
+    checkPlaybackRate_seconds = seconds;
+    checkPlaybackRate_tolerance = tolerance;
+    checkPlaybackRate_callback = callback;
+    checkPlaybackRate_time = media.currentTime;
+    checkPlaybackRate_timeout = window.setTimeout("checkPlaybackRate_check();", 1000 * seconds);
+}
+
+//
+// Returns whether the given time has been buffered
+//
+function isTimeBuffered(media, time)
+{
+    for (var i=0; i < media.buffered.length; i++)
+    {
+        if (media.buffered.start(i) <= time && time <= media.buffered.end(i))
+        {
+            return true;
+        }
+    }
+
+    return false;
+}
+
+var waitForTimeBuffered_media = null;
+var waitForTimeBuffered_time = -1;
+var waitForTimeBuffered_callback = function(){};
+var waitForTimeBuffered_interval = 0;
+
+function waitForTimeBuffered_check()
+{
+    if (isTimeBuffered(waitForTimeBuffered_media, waitForTimeBuffered_time))
+    {
+        window.clearInterval(waitForTimeBuffered_interval);
+        waitForTimeBuffered_interval = 0;
+        waitForTimeBuffered_callback();
+    }
+}
+
+//
+// Waits for a time to be buffered by polling
+//
+function waitForTimeBuffered(media, time, callback)
+{
+    waitForTimeBuffered_media = media;
+    waitForTimeBuffered_time = time;
+    waitForTimeBuffered_callback = callback;
+
+    if (waitForTimeBuffered_interval != 0)
+    {
+        window.clearInterval(waitForTimeBuffered_interval);
+        waitForTimeBuffered_interval = 0;
+    }
+
+    waitForTimeBuffered_interval = setInterval("waitForTimeBuffered_check();", 250);
+}
+
+//
+// Makes sure that the media element is audible.  This is necessary because
+// user agents may remember volume settings for media elements, on a per-domain
+// basis or otherwise
+//
+function ensureAudible(media)
+{
+    media.muted = false;
+    media.volume = 1.0;
+}
diff --git a/common/tct-canvas-html5-tests/config.xml b/common/tct-canvas-html5-tests/config.xml
new file mode 100644 (file)
index 0000000..c1aaa4a
--- /dev/null
@@ -0,0 +1,7 @@
+<widget id='http://tizen.org/test/tct-canvas-html5-tests' xmlns='http://www.w3.org/ns/widgets' xmlns:tizen='http://tizen.org/ns/widgets'>
+  <access origin="*"/>
+  <icon src="icon.png" height="117" width="117"/>
+  <name>tct-canvas-html5-tests</name>
+  <tizen:application id="html5canva.WebAPIHTML5CanvasTests" package="html5canva" required_version="3.0"/>
+  <tizen:setting screen-orientation="landscape"/>
+</widget>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/icon.png b/common/tct-canvas-html5-tests/icon.png
new file mode 100644 (file)
index 0000000..aa50240
Binary files /dev/null and b/common/tct-canvas-html5-tests/icon.png differ
diff --git a/common/tct-canvas-html5-tests/inst.apk.py b/common/tct-canvas-html5-tests/inst.apk.py
new file mode 100644 (file)
index 0000000..31210db
--- /dev/null
@@ -0,0 +1,108 @@
+#!/usr/bin/env python
+
+import os
+import shutil
+import glob
+import time
+import sys
+import subprocess
+from optparse import OptionParser, make_option\r
+import ConfigParser
+
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+PARAMETERS = None
+ADB_CMD = "adb"
+
+
+def doCMD(cmd):
+    # Do not need handle timeout in this short script, let tool do it
+    print "-->> \"%s\"" % cmd
+    output = []
+    cmd_return_code = 1
+    cmd_proc = subprocess.Popen(
+        cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+
+    while True:
+        output_line = cmd_proc.stdout.readline().strip("\r\n")
+        cmd_return_code = cmd_proc.poll()
+        if output_line == '' and cmd_return_code != None:
+            break
+        sys.stdout.write("%s\n" % output_line)
+        sys.stdout.flush()
+        output.append(output_line)
+
+    return (cmd_return_code, output)
+
+
+def uninstPKGs():
+    action_status = True
+    for root, dirs, files in os.walk(SCRIPT_DIR):
+        for file in files:
+            if file.endswith(".apk"):
+                cmd = "%s -s %s uninstall org.xwalk.%s" % (
+                    ADB_CMD, PARAMETERS.device, os.path.basename(os.path.splitext(file)[0]))
+                (return_code, output) = doCMD(cmd)
+                for line in output:
+                    if "Failure" in line:
+                        action_status = False
+                        break
+    return action_status
+
+
+def instPKGs():
+    action_status = True
+    for root, dirs, files in os.walk(SCRIPT_DIR):
+        for file in files:
+            if file.endswith(".apk"):
+                cmd = "%s -s %s install %s" % (ADB_CMD,
+                                               PARAMETERS.device, os.path.join(root, file))
+                (return_code, output) = doCMD(cmd)
+                for line in output:
+                    if "Failure" in line:
+                        action_status = False
+                        break
+    return action_status
+
+
+def main():
+    try:
+        usage = "usage: inst.py -i"
+        opts_parser = OptionParser(usage=usage)
+        opts_parser.add_option(
+            "-s", dest="device", action="store", help="Specify device")
+        opts_parser.add_option(
+            "-i", dest="binstpkg", action="store_true", help="Install package")
+        opts_parser.add_option(
+            "-u", dest="buninstpkg", action="store_true", help="Uninstall package")
+        global PARAMETERS
+        (PARAMETERS, args) = opts_parser.parse_args()
+    except Exception, e:
+        print "Got wrong option: %s, exit ..." % e
+        sys.exit(1)
+
+    if not PARAMETERS.device:
+        (return_code, output) = doCMD("adb devices")
+        for line in output:
+            if str.find(line, "\tdevice") != -1:
+                PARAMETERS.device = line.split("\t")[0]
+                break
+
+    if not PARAMETERS.device:
+        print "No device found"
+        sys.exit(1)
+
+    if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
+        print "-i and -u are conflict"
+        sys.exit(1)
+
+    if PARAMETERS.buninstpkg:
+        if not uninstPKGs():
+            sys.exit(1)
+    else:
+        if not instPKGs():
+            sys.exit(1)
+
+if __name__ == "__main__":
+    main()
+    sys.exit(0)
diff --git a/common/tct-canvas-html5-tests/inst.wgt.py b/common/tct-canvas-html5-tests/inst.wgt.py
new file mode 100644 (file)
index 0000000..e735a70
--- /dev/null
@@ -0,0 +1,224 @@
+#!/usr/bin/env python
+
+import os
+import shutil
+import glob
+import time
+import sys
+import subprocess
+import string
+from optparse import OptionParser, make_option\r
+import ConfigParser
+
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+PKG_NAME = os.path.basename(SCRIPT_DIR)
+PARAMETERS = None
+#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
+TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
+tct_parser = ConfigParser.ConfigParser()
+tct_parser.read(TCT_CONFIG_FILE)
+SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
+PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
+
+
+def doCMD(cmd):
+    # Do not need handle timeout in this short script, let tool do it
+    print "-->> \"%s\"" % cmd
+    output = []
+    cmd_return_code = 1
+    cmd_proc = subprocess.Popen(
+        cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+
+    while True:
+        output_line = cmd_proc.stdout.readline().strip("\r\n")
+        cmd_return_code = cmd_proc.poll()
+        if output_line == '' and cmd_return_code != None:
+            break
+        sys.stdout.write("%s\n" % output_line)
+        sys.stdout.flush()
+        output.append(output_line)
+
+    return (cmd_return_code, output)
+
+def updateCMD(cmd=None):
+    if "pkgcmd" in cmd:
+        cmd = "su - %s -c '%s;%s'" % (PARAMETERS.user, XW_ENV, cmd)
+    return cmd
+def getUSERID():
+    if PARAMETERS.mode == "SDB":
+        cmd = "sdb -s %s shell id -u %s" % (
+            PARAMETERS.device, PARAMETERS.user)
+    else:
+        cmd = "ssh %s \"id -u %s\"" % (
+            PARAMETERS.device, PARAMETERS.user )
+    return doCMD(cmd)
+
+
+
+
+def getPKGID(pkg_name=None):
+    if PARAMETERS.mode == "SDB":
+        cmd = "sdb -s %s shell %s" % (
+            PARAMETERS.device, updateCMD('pkgcmd -l'))
+    else:
+        cmd = "ssh %s \"%s\"" % (
+            PARAMETERS.device, updateCMD('pkgcmd -l'))
+
+    (return_code, output) = doCMD(cmd)
+    if return_code != 0:
+        return None
+
+    test_pkg_id = None
+    for line in output:
+        if line.find("[" + pkg_name + "]") != -1:
+            pkgidIndex = line.split().index("pkgid")
+            test_pkg_id = line.split()[pkgidIndex+1].strip("[]")
+            break
+    return test_pkg_id
+
+
+def doRemoteCMD(cmd=None):
+    if PARAMETERS.mode == "SDB":
+        cmd = "sdb -s %s shell %s" % (PARAMETERS.device, updateCMD(cmd))
+    else:
+        cmd = "ssh %s \"%s\"" % (PARAMETERS.device, updateCMD(cmd))
+
+    return doCMD(cmd)
+
+
+def doRemoteCopy(src=None, dest=None):
+    if PARAMETERS.mode == "SDB":
+        cmd_prefix = "sdb -s %s push" % PARAMETERS.device
+        cmd = "%s %s %s" % (cmd_prefix, src, dest)
+    else:
+        cmd = "scp -r %s %s:/%s" % (src, PARAMETERS.device, dest)
+
+    (return_code, output) = doCMD(cmd)
+    doRemoteCMD("sync")
+
+    if return_code != 0:
+        return True
+    else:
+        return False
+
+
+def uninstPKGs():
+    action_status = True
+    for root, dirs, files in os.walk(SCRIPT_DIR):
+        for file in files:
+            if file.endswith(".wgt"):
+                pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
+                if not pkg_id:
+                    action_status = False
+                    continue
+                (return_code, output) = doRemoteCMD(
+                    "pkgcmd -u -t wgt -q -n %s" % pkg_id)
+                for line in output:
+                    if "Failure" in line:
+                        action_status = False
+                        break
+
+    (return_code, output) = doRemoteCMD(
+        "rm -rf %s" % PKG_SRC_DIR)
+    if return_code != 0:
+        action_status = False
+
+    return action_status
+
+
+def instPKGs():
+    action_status = True
+    (return_code, output) = doRemoteCMD(
+        "mkdir -p %s" % PKG_SRC_DIR)
+    if return_code != 0:
+        action_status = False
+    for root, dirs, files in os.walk(SCRIPT_DIR):
+        for file in files:
+            if file.endswith(".wgt"):
+                if not doRemoteCopy(os.path.join(root, file), "%s/%s" % (SRC_DIR, file)):
+                    action_status = False
+                (return_code, output) = doRemoteCMD(
+                    "pkgcmd -i -t wgt -q -p %s/%s" % (SRC_DIR, file))
+                doRemoteCMD("rm -rf %s/%s" % (SRC_DIR, file))
+                for line in output:
+                    if "Failure" in line:
+                        action_status = False
+                        break
+
+    for item in glob.glob("%s/*" % SCRIPT_DIR):
+        if item.endswith(".wgt"):
+            continue
+        elif item.endswith("inst.py"):
+            continue
+        else:
+            item_name = os.path.basename(item)
+            if not doRemoteCopy(item, "%s/%s" % (PKG_SRC_DIR, item_name)):
+            #if not doRemoteCopy(item, PKG_SRC_DIR):
+                action_status = False
+
+    return action_status
+
+
+def main():
+    try:
+        usage = "usage: inst.py -i"
+        opts_parser = OptionParser(usage=usage)
+        opts_parser.add_option(
+            "-m", dest="mode", action="store", help="Specify mode")
+        opts_parser.add_option(
+            "-s", dest="device", action="store", help="Specify device")
+        opts_parser.add_option(
+            "-i", dest="binstpkg", action="store_true", help="Install package")
+        opts_parser.add_option(
+            "-u", dest="buninstpkg", action="store_true", help="Uninstall package")
+        opts_parser.add_option(
+            "-a", dest="user", action="store", help="User name")
+        global PARAMETERS
+        (PARAMETERS, args) = opts_parser.parse_args()
+    except Exception, e:
+        print "Got wrong option: %s, exit ..." % e
+        sys.exit(1)
+
+    if not PARAMETERS.user:
+        PARAMETERS.user = "owner"
+    if not PARAMETERS.mode:
+        PARAMETERS.mode = "SDB"
+
+    if PARAMETERS.mode == "SDB":
+        if not PARAMETERS.device:
+            (return_code, output) = doCMD("sdb devices")
+            for line in output:
+                if str.find(line, "\tdevice") != -1:
+                    PARAMETERS.device = line.split("\t")[0]
+                    break
+    else:
+        PARAMETERS.mode = "SSH"
+
+    if not PARAMETERS.device:
+        print "No device provided"
+        sys.exit(1)
+
+    user_info = getUSERID()
+    re_code = user_info[0]
+    if re_code == 0 :
+        global XW_ENV
+        userid = user_info[1][0]
+        XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
+    else:
+        print "[Error] cmd commands error : %s"%str(user_info[1])
+        sys.exit(1)
+    if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
+        print "-i and -u are conflict"
+        sys.exit(1)
+
+    if PARAMETERS.buninstpkg:
+        if not uninstPKGs():
+            sys.exit(1)
+    else:
+        if not instPKGs():
+            sys.exit(1)
+
+if __name__ == "__main__":
+    main()
+    sys.exit(0)
diff --git a/common/tct-canvas-html5-tests/inst.xpk.py b/common/tct-canvas-html5-tests/inst.xpk.py
new file mode 100644 (file)
index 0000000..211d24c
--- /dev/null
@@ -0,0 +1,231 @@
+#!/usr/bin/env python
+
+import os
+import shutil
+import glob
+import time
+import sys
+import subprocess
+import string
+from optparse import OptionParser, make_option\r
+import ConfigParser
+
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+PKG_NAME = os.path.basename(SCRIPT_DIR)
+PARAMETERS = None
+#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
+TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
+tct_parser = ConfigParser.ConfigParser()
+tct_parser.read(TCT_CONFIG_FILE)
+SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
+PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
+
+
+def doCMD(cmd):
+    # Do not need handle timeout in this short script, let tool do it
+    print "-->> \"%s\"" % cmd
+    output = []
+    cmd_return_code = 1
+    cmd_proc = subprocess.Popen(
+        cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+
+    while True:
+        output_line = cmd_proc.stdout.readline().strip("\r\n")
+        cmd_return_code = cmd_proc.poll()
+        if output_line == '' and cmd_return_code != None:
+            break
+        sys.stdout.write("%s\n" % output_line)
+        sys.stdout.flush()
+        output.append(output_line)
+
+    return (cmd_return_code, output)
+
+
+def updateCMD(cmd=None):
+    if "pkgcmd" in cmd:
+        cmd = "su - %s -c '%s;%s'" % (PARAMETERS.user, XW_ENV, cmd)
+    return cmd
+def getUSERID():
+    if PARAMETERS.mode == "SDB":
+        cmd = "sdb -s %s shell id -u %s" % (
+            PARAMETERS.device, PARAMETERS.user)
+    else:
+        cmd = "ssh %s \"id -u %s\"" % (
+            PARAMETERS.device, PARAMETERS.user )
+    return doCMD(cmd)
+
+
+
+
+def getPKGID(pkg_name=None):
+    if PARAMETERS.mode == "SDB":
+        cmd = "sdb -s %s shell %s" % (
+            PARAMETERS.device, updateCMD('pkgcmd -l'))
+    else:
+        cmd = "ssh %s \"%s\"" % (
+            PARAMETERS.device, updateCMD('pkgcmd -l'))
+
+    (return_code, output) = doCMD(cmd)
+    if return_code != 0:
+        return None
+
+    test_pkg_id = None
+    for line in output:
+        if line.find("[" + pkg_name + "]") != -1:
+            pkgidIndex = line.split().index("pkgid")
+            test_pkg_id = line.split()[pkgidIndex+1].strip("[]")
+            break
+    return test_pkg_id
+
+
+def doRemoteCMD(cmd=None):
+    if PARAMETERS.mode == "SDB":
+        cmd = "sdb -s %s shell %s" % (PARAMETERS.device, updateCMD(cmd))
+    else:
+        cmd = "ssh %s \"%s\"" % (PARAMETERS.device, updateCMD(cmd))
+
+    return doCMD(cmd)
+
+
+def doRemoteCopy(src=None, dest=None):
+    if PARAMETERS.mode == "SDB":
+        cmd_prefix = "sdb -s %s push" % PARAMETERS.device
+        cmd = "%s %s %s" % (cmd_prefix, src, dest)
+    else:
+        cmd = "scp -r %s %s:/%s" % (src, PARAMETERS.device, dest)
+
+    (return_code, output) = doCMD(cmd)
+    doRemoteCMD("sync")
+
+    if return_code != 0:
+        return True
+    else:
+        return False
+
+
+def uninstPKGs():
+    action_status = True
+    for root, dirs, files in os.walk(SCRIPT_DIR):
+        if root.endswith("mediasrc"):
+            continue
+
+        for file in files:
+            if file.endswith(".xpk"):
+                pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
+                if not pkg_id:
+                    action_status = False
+                    continue
+                (return_code, output) = doRemoteCMD(
+                    "pkgcmd -u -t xpk -q -n %s" % pkg_id)
+                for line in output:
+                    if "Failure" in line:
+                        action_status = False
+                        break
+
+    (return_code, output) = doRemoteCMD(
+        "rm -rf %s" % PKG_SRC_DIR)
+    if return_code != 0:
+        action_status = False
+
+    return action_status
+
+
+def instPKGs():
+    action_status = True
+    (return_code, output) = doRemoteCMD(
+        "mkdir -p %s" % PKG_SRC_DIR)
+    if return_code != 0:
+        action_status = False
+    for root, dirs, files in os.walk(SCRIPT_DIR):
+        if root.endswith("mediasrc"):
+            continue
+
+        for file in files:
+            if file.endswith(".xpk"):
+                if not doRemoteCopy(os.path.join(root, file), "%s/%s" % (SRC_DIR, file)):
+                    action_status = False
+                (return_code, output) = doRemoteCMD(
+                    "pkgcmd -i -t xpk -q -p %s/%s" % (SRC_DIR, file))
+                doRemoteCMD("rm -rf %s/%s" % (SRC_DIR, file))
+                for line in output:
+                    if "Failure" in line:
+                        action_status = False
+                        break
+
+    # Do some special copy/delete... steps
+    '''
+    (return_code, output) = doRemoteCMD(
+        "mkdir -p %s/tests" % PKG_SRC_DIR)
+    if return_code != 0:
+        action_status = False
+
+    if not doRemoteCopy("specname/tests", "%s/tests" % PKG_SRC_DIR):
+        action_status = False
+    '''
+
+    return action_status
+
+
+def main():
+    try:
+        usage = "usage: inst.py -i"
+        opts_parser = OptionParser(usage=usage)
+        opts_parser.add_option(
+            "-m", dest="mode", action="store", help="Specify mode")
+        opts_parser.add_option(
+            "-s", dest="device", action="store", help="Specify device")
+        opts_parser.add_option(
+            "-i", dest="binstpkg", action="store_true", help="Install package")
+        opts_parser.add_option(
+            "-u", dest="buninstpkg", action="store_true", help="Uninstall package")
+        opts_parser.add_option(
+            "-a", dest="user", action="store", help="User name")
+        global PARAMETERS
+        (PARAMETERS, args) = opts_parser.parse_args()
+    except Exception, e:
+        print "Got wrong option: %s, exit ..." % e
+        sys.exit(1)
+
+    if not PARAMETERS.user:
+        PARAMETERS.user = "owner"
+    if not PARAMETERS.mode:
+        PARAMETERS.mode = "SDB"
+
+    if PARAMETERS.mode == "SDB":
+        if not PARAMETERS.device:
+            (return_code, output) = doCMD("sdb devices")
+            for line in output:
+                if str.find(line, "\tdevice") != -1:
+                    PARAMETERS.device = line.split("\t")[0]
+                    break
+    else:
+        PARAMETERS.mode = "SSH"
+
+    if not PARAMETERS.device:
+        print "No device provided"
+        sys.exit(1)
+
+    user_info = getUSERID()
+    re_code = user_info[0]
+    if re_code == 0 :
+        global XW_ENV
+        userid = user_info[1][0]
+        XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
+    else:
+        print "[Error] cmd commands error : %s"%str(user_info[1])
+        sys.exit(1)
+    if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
+        print "-i and -u are conflict"
+        sys.exit(1)
+
+    if PARAMETERS.buninstpkg:
+        if not uninstPKGs():
+            sys.exit(1)
+    else:
+        if not instPKGs():
+            sys.exit(1)
+
+if __name__ == "__main__":
+    main()
+    sys.exit(0)
diff --git a/common/tct-canvas-html5-tests/manifest.json b/common/tct-canvas-html5-tests/manifest.json
new file mode 100644 (file)
index 0000000..7380534
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    "version": "3.0",
+    "name": "tct-canvas-html5-tests",
+    "permissions": ["tabs", "unlimited_storage", "notifications", "http://*/*", "https://*/*"],
+    "description": "tct-canvas-html5-tests",
+    "file_name": "manifest.json",
+    "app": {
+        "launch": {
+            "local_path": "index.html"
+        }
+    }
+}
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/pack.py b/common/tct-canvas-html5-tests/pack.py
new file mode 100644 (file)
index 0000000..e67cd36
--- /dev/null
@@ -0,0 +1,1104 @@
+#!/usr/bin/env python
+#
+# Copyright (c) 2014 Intel Corporation.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# * Redistributions of works must retain the original copyright notice, this
+#   list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the original copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# * Neither the name of Intel Corporation nor the names of its contributors
+#   may be used to endorse or promote products derived from this work without
+#   specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors:
+#         Fan, Yugang <yugang.fan@intel.com>
+
+import os
+import shutil
+import glob
+import time
+import sys
+import stat
+import random
+import json
+import logging
+import zipfile
+import signal
+import subprocess
+from optparse import OptionParser
+
+reload(sys)
+sys.setdefaultencoding('utf8')
+
+TOOL_VERSION = "v0.1"
+VERSION_FILE = "VERSION"
+DEFAULT_CMD_TIMEOUT = 600
+PKG_TYPES = ["apk", "xpk", "wgt", "apk-aio", "cordova-aio", "cordova", "embeddingapi"]
+PKG_MODES = ["shared", "embedded"]
+PKG_ARCHS = ["x86", "arm"]
+PKG_BLACK_LIST = []
+PKG_NAME = None
+BUILD_PARAMETERS = None
+BUILD_ROOT = None
+BUILD_ROOT_SRC = None
+BUILD_ROOT_SRC_PKG = None
+BUILD_ROOT_SRC_PKG_APP = None
+BUILD_ROOT_SRC_SUB_APP = None
+BUILD_ROOT_PKG = None
+BUILD_ROOT_PKG_APP = None
+LOG = None
+LOG_LEVEL = logging.DEBUG
+
+
+class ColorFormatter(logging.Formatter):
+
+    def __init__(self, msg):
+        logging.Formatter.__init__(self, msg)
+
+    def format(self, record):
+        red, green, yellow, blue = range(4)
+        colors = {'INFO': green, 'DEBUG': blue,
+                  'WARNING': yellow, 'ERROR': red}
+        msg = record.msg
+        if msg[0] == "+":
+            msg = "\33[01m" + msg[1:] + "\033[0m"
+        elif msg[0] == "=":
+            msg = "\33[07m" + msg + "\033[0m"
+        levelname = record.levelname
+        if levelname in colors:
+            msg_color = "\033[0;%dm" % (
+                31 + colors[levelname]) + msg + "\033[0m"
+            record.msg = msg_color
+
+        return logging.Formatter.format(self, record)
+
+
+def pidExists(pid):
+    if pid < 0:
+        return False
+    try:
+        os.kill(pid, 0)
+    except OSError:
+        return False
+    else:
+        return True
+
+
+def isWindows():
+    return sys.platform == "cygwin" or sys.platform.startswith("win")
+
+
+def killProcesses(ppid=None):
+    if isWindows():
+        subprocess.check_call("TASKKILL /F /PID %s /T" % ppid)
+    else:
+        ppid = str(ppid)
+        pidgrp = []
+
+        def GetChildPids(ppid):
+            command = "ps -ef | awk '{if ($3 ==%s) print $2;}'" % str(ppid)
+            pids = os.popen(command).read()
+            pids = pids.split()
+            return pids
+
+        pidgrp.extend(GetChildPids(ppid))
+        for pid in pidgrp:
+            pidgrp.extend(GetChildPids(pid))
+
+        pidgrp.insert(0, ppid)
+        while len(pidgrp) > 0:
+            pid = pidgrp.pop()
+            try:
+                os.kill(int(pid), signal.SIGKILL)
+                return True
+            except OSError:
+                try:
+                    os.popen("kill -9 %d" % int(pid))
+                    return True
+                except Exception:
+                    return False
+
+
+def safelyGetValue(origin_json=None, key=None):
+    if origin_json and key and key in origin_json:
+        return origin_json[key]
+    return None
+
+
+def checkContains(origin_str=None, key_str=None):
+    if origin_str.upper().find(key_str.upper()) >= 0:
+        return True
+    return False
+
+
+def getRandomStr():
+    str_pool = list("abcdefghijklmnopqrstuvwxyz1234567890")
+    random_str = ""
+    for i in range(15):
+        index = random.randint(0, len(str_pool) - 1)
+        random_str = random_str + str_pool[index]
+
+    return random_str
+
+
+def zipDir(dir_path, zip_file):
+    try:
+        if os.path.exists(zip_file):
+            if not doRemove([zip_file]):
+                return False
+        if not os.path.exists(os.path.dirname(zip_file)):
+            os.makedirs(os.path.dirname(zip_file))
+        z_file = zipfile.ZipFile(zip_file, "w")
+        orig_dir = os.getcwd()
+        os.chdir(dir_path)
+        for root, dirs, files in os.walk("."):
+            for i_file in files:
+                LOG.info("zip %s" % os.path.join(root, i_file))
+                z_file.write(os.path.join(root, i_file))
+        z_file.close()
+        os.chdir(orig_dir)
+    except Exception as e:
+        LOG.error("Fail to pack %s to %s: %s" % (dir_path, zip_file, e))
+        return False
+    LOG.info("Done to zip %s to %s" % (dir_path, zip_file))
+    return True
+
+
+def overwriteCopy(src, dest, symlinks=False, ignore=None):
+    if not os.path.exists(dest):
+        os.makedirs(dest)
+        shutil.copystat(src, dest)
+    sub_list = os.listdir(src)
+    if ignore:
+        excl = ignore(src, sub_list)
+        sub_list = [x for x in sub_list if x not in excl]
+    for i_sub in sub_list:
+        s_path = os.path.join(src, i_sub)
+        d_path = os.path.join(dest, i_sub)
+        if symlinks and os.path.islink(s_path):
+            if os.path.lexists(d_path):
+                os.remove(d_path)
+            os.symlink(os.readlink(s_path), d_path)
+            try:
+                s_path_s = os.lstat(s_path)
+                s_path_mode = stat.S_IMODE(s_path_s.st_mode)
+                os.lchmod(d_path, s_path_mode)
+            except Exception:
+                pass
+        elif os.path.isdir(s_path):
+            overwriteCopy(s_path, d_path, symlinks, ignore)
+        else:
+            shutil.copy2(s_path, d_path)
+
+
+def doCopy(src_item=None, dest_item=None):
+    LOG.info("Copying %s to %s" % (src_item, dest_item))
+    try:
+        if os.path.isdir(src_item):
+            overwriteCopy(src_item, dest_item, symlinks=True)
+        else:
+            if not os.path.exists(os.path.dirname(dest_item)):
+                LOG.info("Create non-existent dir: %s" %
+                         os.path.dirname(dest_item))
+                os.makedirs(os.path.dirname(dest_item))
+            shutil.copy2(src_item, dest_item)
+    except Exception as e:
+        LOG.error("Fail to copy file %s: %s" % (src_item, e))
+        return False
+
+    return True
+
+
+def doRemove(target_file_list=None):
+    for i_file in target_file_list:
+        LOG.info("Removing %s" % i_file)
+        try:
+            if os.path.isdir(i_file):
+                shutil.rmtree(i_file)
+            else:
+                os.remove(i_file)
+        except Exception as e:
+            LOG.error("Fail to remove file %s: %s" % (i_file, e))
+            return False
+    return True
+
+
+def updateCopylistPrefix(src_default, dest_default, src_sub, dest_sub):
+    src_new = ""
+    dest_new = ""
+    PACK_TOOL_TAG = "PACK-TOOL-ROOT"
+
+    if src_sub[0:len(PACK_TOOL_TAG)] == PACK_TOOL_TAG:
+        src_new = src_sub.replace(PACK_TOOL_TAG, BUILD_PARAMETERS.pkgpacktools)
+    else:
+        src_new = os.path.join(src_default, src_sub)
+
+    if dest_sub[0:len(PACK_TOOL_TAG)] == PACK_TOOL_TAG:
+        dest_new = dest_sub.replace(PACK_TOOL_TAG, BUILD_ROOT)
+    else:
+        dest_new = os.path.join(dest_default, dest_sub)
+
+    return (src_new, dest_new)
+
+
+def buildSRC(src=None, dest=None, build_json=None):
+    if not os.path.exists(src):
+        LOG.info("+Src dir does not exist, skip build src process ...")
+        return True
+    if not doCopy(src, dest):
+        return False
+    if "blacklist" in build_json:
+        if build_json["blacklist"].count("") > 0:
+            build_json["blacklist"].remove("")
+        black_file_list = []
+        for i_black in build_json["blacklist"]:
+            black_file_list = black_file_list + \
+                glob.glob(os.path.join(dest, i_black))
+
+        black_file_list = list(set(black_file_list))
+        if not doRemove(black_file_list):
+            return False
+
+    if "copylist" in build_json:
+        for i_s_key in build_json["copylist"].keys():
+            if i_s_key and build_json["copylist"][i_s_key]:
+                (src_updated, dest_updated) = updateCopylistPrefix(
+                    src, dest, i_s_key, build_json["copylist"][i_s_key])
+                if not doCopy(src_updated, dest_updated):
+                    return False
+
+    return True
+
+
+def exitHandler(return_code=1):
+    LOG.info("+Cleaning build root folder ...")
+    if not BUILD_PARAMETERS.bnotclean and os.path.exists(BUILD_ROOT):
+        if not doRemove([BUILD_ROOT]):
+            LOG.error("Fail to clean build root, exit ...")
+            sys.exit(1)
+
+    if return_code == 0:
+        LOG.info("================ DONE ================")
+    else:
+        LOG.error(
+            "================ Found Something Wrong !!! ================")
+    sys.exit(return_code)
+
+
+def prepareBuildRoot():
+    LOG.info("+Preparing build root folder ...")
+    global BUILD_ROOT
+    global BUILD_ROOT_SRC
+    global BUILD_ROOT_SRC_PKG
+    global BUILD_ROOT_SRC_PKG_APP
+    global BUILD_ROOT_SRC_SUB_APP
+    global BUILD_ROOT_PKG
+    global BUILD_ROOT_PKG_APP
+
+    while True:
+        BUILD_ROOT = os.path.join("/tmp", getRandomStr())
+        if os.path.exists(BUILD_ROOT):
+            continue
+        else:
+            break
+
+    BUILD_ROOT_SRC = os.path.join(BUILD_ROOT, PKG_NAME)
+    BUILD_ROOT_SRC_PKG = os.path.join(BUILD_ROOT, "pkg")
+    BUILD_ROOT_SRC_PKG_APP = os.path.join(BUILD_ROOT, "pkg-app")
+    BUILD_ROOT_SRC_SUB_APP = os.path.join(BUILD_ROOT, "sub-app")
+    BUILD_ROOT_PKG = os.path.join(BUILD_ROOT, "pkg", "opt", PKG_NAME)
+    BUILD_ROOT_PKG_APP = os.path.join(BUILD_ROOT, "pkg-app", "opt", PKG_NAME)
+
+    if not doCopy(BUILD_PARAMETERS.srcdir, BUILD_ROOT_SRC):
+        return False
+    if not doRemove(
+            glob.glob(os.path.join(BUILD_ROOT_SRC, "%s*.zip" % PKG_NAME))):
+        return False
+
+    return True
+
+
+def doCMD(cmd, time_out=DEFAULT_CMD_TIMEOUT, no_check_return=False):
+    LOG.info("Doing CMD: [ %s ]" % cmd)
+    pre_time = time.time()
+    cmd_proc = subprocess.Popen(args=cmd, shell=True)
+    while True:
+        cmd_exit_code = cmd_proc.poll()
+        elapsed_time = time.time() - pre_time
+        if cmd_exit_code is None:
+            if elapsed_time >= time_out:
+                killProcesses(ppid=cmd_proc.pid)
+                LOG.error("Timeout to exe CMD")
+                return False
+        else:
+            if not no_check_return and cmd_exit_code != 0:
+                LOG.error("Fail to exe CMD")
+                return False
+            break
+        time.sleep(2)
+    return True
+
+
+def doCMDWithOutput(cmd, time_out=DEFAULT_CMD_TIMEOUT):
+    LOG.info("Doing CMD: [ %s ]" % cmd)
+    pre_time = time.time()
+    output = []
+    cmd_return_code = 1
+    cmd_proc = subprocess.Popen(
+        cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+
+    while True:
+        output_line = cmd_proc.stdout.readline().strip("\r\n")
+        cmd_return_code = cmd_proc.poll()
+        elapsed_time = time.time() - pre_time
+        if cmd_return_code is None:
+            if elapsed_time >= time_out:
+                killProcesses(ppid=cmd_proc.pid)
+                LOG.error("Timeout to exe CMD")
+                return False
+        elif output_line == '' and cmd_return_code is not None:
+            break
+
+        sys.stdout.write("%s\n" % output_line)
+        sys.stdout.flush()
+        output.append(output_line)
+    if cmd_return_code != 0:
+        LOG.error("Fail to exe CMD")
+
+    return (cmd_return_code, output)
+
+
+def packXPK(build_json=None, app_src=None, app_dest=None, app_name=None):
+    pack_tool = os.path.join(BUILD_ROOT, "make_xpk.py")
+    if not os.path.exists(pack_tool):
+        if not doCopy(
+                os.path.join(BUILD_PARAMETERS.pkgpacktools, "make_xpk.py"),
+                pack_tool):
+            return False
+    orig_dir = os.getcwd()
+    os.chdir(BUILD_ROOT)
+    if os.path.exists("key.file"):
+        if not doRemove(["key.file"]):
+            os.chdir(orig_dir)
+            return False
+
+    key_file = safelyGetValue(build_json, "key-file")
+    if key_file == "key.file":
+        LOG.error(
+            "\"key.file\" is reserved name for default key file, "
+            "pls change the key file name ...")
+        os.chdir(orig_dir)
+        return False
+    if key_file:
+        pack_cmd = "python make_xpk.py %s %s -o %s" % (
+            app_src, key_file, os.path.join(app_dest, "%s.xpk" % app_name))
+    else:
+        pack_cmd = "python make_xpk.py %s key.file -o %s" % (
+            app_src, os.path.join(app_dest, "%s.xpk" % app_name))
+    if not doCMD(pack_cmd, DEFAULT_CMD_TIMEOUT):
+        os.chdir(orig_dir)
+        return False
+
+    os.chdir(orig_dir)
+    return True
+
+
+def packWGT(build_json=None, app_src=None, app_dest=None, app_name=None):
+    if not zipDir(app_src, os.path.join(app_dest, "%s.wgt" % app_name)):
+        return False
+
+    if BUILD_PARAMETERS.signature == True:
+        if safelyGetValue(build_json, "sign-flag") == "true":
+            if not os.path.exists(os.path.join(BUILD_ROOT, "signing")):
+                if not doCopy(
+                        os.path.join(BUILD_PARAMETERS.pkgpacktools, "signing"),
+                        os.path.join(BUILD_ROOT, "signing")):
+                    return False
+            signing_cmd = "%s --dist platform %s" % (
+                os.path.join(BUILD_ROOT, "signing", "sign-widget.sh"),
+                os.path.join(app_dest, "%s.wgt" % app_name))
+            if not doCMD(signing_cmd, DEFAULT_CMD_TIMEOUT):
+                return False
+
+    return True
+
+
+def packAPK(build_json=None, app_src=None, app_dest=None, app_name=None):
+    app_name = app_name.replace("-", "_")
+
+    if not os.path.exists(os.path.join(BUILD_ROOT, "crosswalk")):
+        if not doCopy(
+                os.path.join(BUILD_PARAMETERS.pkgpacktools, "crosswalk"),
+                os.path.join(BUILD_ROOT, "crosswalk")):
+            return False
+
+    files = glob.glob(os.path.join(BUILD_ROOT, "crosswalk", "*.apk"))
+    if files:
+        if not doRemove(files):
+            return False
+
+    ext_opt = ""
+    cmd_opt = ""
+    url_opt = ""
+    mode_opt = ""
+    arch_opt = ""
+    icon_opt = ""
+
+    common_opts = safelyGetValue(build_json, "apk-common-opts")
+    if common_opts is None:
+        common_opts = ""
+
+    tmp_opt = safelyGetValue(build_json, "apk-ext-opt")
+    if tmp_opt:
+        ext_opt = "--extensions='%s'" % os.path.join(BUILD_ROOT_SRC, tmp_opt)
+
+    tmp_opt = safelyGetValue(build_json, "apk-cmd-opt")
+    if tmp_opt:
+        cmd_opt = "--xwalk-command-line='%s'" % tmp_opt
+
+    tmp_opt = safelyGetValue(build_json, "apk-url-opt")
+    if tmp_opt:
+        url_opt = "--app-url='%s'" % tmp_opt
+
+    tmp_opt = safelyGetValue(build_json, "apk-mode-opt")
+    if tmp_opt:
+        if tmp_opt in PKG_MODES:
+            mode_opt = "--mode=%s" % tmp_opt
+        else:
+            LOG.error("Got wrong app mode: %s" % tmp_opt)
+            return False
+    else:
+        mode_opt = "--mode=%s" % BUILD_PARAMETERS.pkgmode
+
+    tmp_opt = safelyGetValue(build_json, "apk-arch-opt")
+    if tmp_opt:
+        if tmp_opt in PKG_ARCHS:
+            arch_opt = "--arch=%s" % tmp_opt
+        else:
+            LOG.error("Got wrong app arch: %s" % tmp_opt)
+            return False
+    else:
+        arch_opt = "--arch=%s" % BUILD_PARAMETERS.pkgarch
+
+    tmp_opt = safelyGetValue(build_json, "apk-icon-opt")
+    if tmp_opt:
+        icon_opt = "--icon=%s" % tmp_opt
+    elif tmp_opt == "":
+        icon_opt = ""
+    else:
+        icon_opt = "--icon=%s/icon.png" % app_src
+
+    if safelyGetValue(build_json, "apk-type") == "MANIFEST":
+        pack_cmd = "python make_apk.py --package=org.xwalk.%s " \
+            "--manifest=%s/manifest.json  %s %s %s %s %s" % (
+                app_name, app_src, mode_opt, arch_opt,
+                ext_opt, cmd_opt, common_opts)
+    elif safelyGetValue(build_json, "apk-type") == "HOSTEDAPP":
+        if not url_opt:
+            LOG.error(
+                "Fail to find the key \"apk-url-opt\" for hosted APP packing")
+            return False
+        pack_cmd = "python make_apk.py --package=org.xwalk.%s --name=%s %s " \
+                   "%s %s %s %s %s" % (
+                       app_name, app_name, mode_opt, arch_opt, ext_opt,
+                       cmd_opt, url_opt, common_opts)
+    else:
+        pack_cmd = "python make_apk.py --package=org.xwalk.%s --name=%s " \
+                   "--app-root=%s --app-local-path=index.html %s %s " \
+                   "%s %s %s %s" % (
+                       app_name, app_name, app_src, icon_opt, mode_opt,
+                       arch_opt, ext_opt, cmd_opt, common_opts)
+
+    orig_dir = os.getcwd()
+    os.chdir(os.path.join(BUILD_ROOT, "crosswalk"))
+    if not doCMD(pack_cmd, DEFAULT_CMD_TIMEOUT):
+        os.chdir(orig_dir)
+        return False
+
+    files = glob.glob(os.path.join(BUILD_ROOT, "crosswalk", "*.apk"))
+    if files:
+        if not doCopy(files[0], os.path.join(app_dest, "%s.apk" % app_name)):
+            os.chdir(orig_dir)
+            return False
+    else:
+        LOG.error("Fail to find the apk file")
+        os.chdir(orig_dir)
+        return False
+
+    os.chdir(orig_dir)
+    return True
+
+
+def packCordova(build_json=None, app_src=None, app_dest=None, app_name=None):
+    pack_tool = os.path.join(BUILD_ROOT, "cordova")
+    app_name = app_name.replace("-", "_")
+    if not os.path.exists(pack_tool):
+        if not doCopy(
+                os.path.join(BUILD_PARAMETERS.pkgpacktools, "cordova"),
+                pack_tool):
+            return False
+
+    plugin_tool = os.path.join(BUILD_ROOT, "cordova_plugins")
+    if not os.path.exists(plugin_tool):
+        if not doCopy(
+                os.path.join(BUILD_PARAMETERS.pkgpacktools, "cordova_plugins"),
+                plugin_tool):
+            return False
+
+    orig_dir = os.getcwd()
+    os.chdir(pack_tool)
+    pack_cmd = "bin/create %s org.xwalk.%s %s" % (
+        app_name, app_name, app_name)
+    if not doCMD(pack_cmd, DEFAULT_CMD_TIMEOUT):
+        os.chdir(orig_dir)
+        return False
+
+    os.chdir(os.path.join(pack_tool, app_name))
+    plugin_dirs = os.listdir(plugin_tool)
+    for i_dir in plugin_dirs:
+        i_plugin_dir = os.path.join(plugin_tool, i_dir)
+        plugin_install_cmd = "plugman install --platform android --project " \
+                             "./ --plugin %s" % i_plugin_dir
+        if not doCMD(plugin_install_cmd, DEFAULT_CMD_TIMEOUT):
+            os.chdir(orig_dir)
+            return False
+    os.chdir(pack_tool)
+
+    if not doCopy(app_src, os.path.join(pack_tool, app_name, "assets", "www")):
+        os.chdir(orig_dir)
+        return False
+    os.chdir(os.path.join(BUILD_ROOT, "cordova", app_name))
+    pack_cmd = "./cordova/build"
+    if not doCMD(pack_cmd, DEFAULT_CMD_TIMEOUT):
+        os.chdir(orig_dir)
+        return False
+
+    if not doCopy(os.path.join(
+            BUILD_ROOT, "cordova", app_name, "bin", "%s-debug.apk" %
+            app_name),
+            os.path.join(app_dest, "%s.apk" % app_name)):
+        os.chdir(orig_dir)
+        return False
+    os.chdir(orig_dir)
+    return True
+
+
+def packEmbeddingAPI(
+        build_json=None, app_src=None, app_dest=None, app_name=None):
+    app_name = app_name.replace("-", "_")
+
+    library_dir_name = safelyGetValue(build_json, "embeddingapi-library-name")
+    if not library_dir_name:
+        LOG.error("Fail to get embeddingapi-library-name ...")
+        return False
+
+    new_library_dir_name = "core_library"
+    pack_tool = os.path.join(app_src, "..", new_library_dir_name)
+
+    if os.path.exists(pack_tool):
+        if not doRemove([pack_tool]):
+            return False
+
+    if not doCopy(
+            os.path.join(BUILD_PARAMETERS.pkgpacktools, library_dir_name),
+            pack_tool):
+        return False
+
+    if os.path.exists(os.path.join(pack_tool, "bin", "res", "crunch")):
+        if not doRemove([os.path.join(pack_tool, "bin", "res", "crunch")]):
+            return False
+
+    orig_dir = os.getcwd()
+    android_project_path = os.path.join(app_src, "android-project")
+    try:
+        os.makedirs(android_project_path)
+    except Exception as e:
+        LOG.error("Fail to create tmp project dir: %s" % e)
+        return False
+
+    (return_code, output) = doCMDWithOutput("android list target")
+    api_level = ""
+    for line in output:
+        if "API level" in line:
+            api_level = line.split(":")[1].strip()
+            break
+    if not api_level:
+        LOG.error("Fail to get Android API Level")
+        os.chdir(orig_dir)
+        return False
+
+    android_project_cmd = "android create project --name %s --target " \
+                          "android-%s --path %s --package com.%s " \
+                          "--activity MainActivity" % (
+                              app_name, api_level, android_project_path, app_name)
+    if not doCMD(android_project_cmd):
+        os.chdir(orig_dir)
+        return False
+
+    try:
+        update_file = open(
+            os.path.join(android_project_path, "project.properties"), "a+")
+        update_file.writelines(
+            "{0}\n".format(
+                "android.library.reference.1=../%s" %
+                new_library_dir_name))
+        update_file.close()
+    except Exception as e:
+        LOG.error(
+            "Fail to update %s: %s" %
+            (os.path.join(
+                android_project_path,
+                "project.properties"),
+                e))
+        os.chdir(orig_dir)
+        return False
+
+    if not doCopy(os.path.join(android_project_path, "build.xml"),
+                  os.path.join(app_src, "build.xml")):
+        os.chdir(orig_dir)
+        return False
+
+    if not doCopy(
+            os.path.join(android_project_path, "project.properties"),
+            os.path.join(app_src, "project.properties")):
+        os.chdir(orig_dir)
+        return False
+
+    if not doCopy(
+            os.path.join(android_project_path, "local.properties"),
+            os.path.join(app_src, "local.properties")):
+        os.chdir(orig_dir)
+        return False
+
+    if not doCopy(
+            os.path.join(android_project_path, "local.properties"),
+            os.path.join(pack_tool, "local.properties")):
+        os.chdir(orig_dir)
+        return False
+
+    os.chdir(app_src)
+    if not doCMD("ant debug"):
+        os.chdir(orig_dir)
+        return False
+
+    if not doCopy(
+            os.path.join(app_src, "bin", "%s-debug.apk" % app_name),
+            os.path.join(app_dest, "%s.apk" % app_name)):
+        os.chdir(orig_dir)
+        return False
+    os.chdir(orig_dir)
+    return True
+
+
+def packAPP(build_json=None, app_src=None, app_dest=None, app_name=None):
+    LOG.info("Packing %s(%s)" % (app_name, app_src))
+    if not os.path.exists(app_dest):
+        try:
+            os.makedirs(app_dest)
+        except Exception as e:
+            LOG.error("Fail to init package install dest dir: %s" % e)
+            return False
+
+    if checkContains(BUILD_PARAMETERS.pkgtype, "XPK"):
+        if not packXPK(build_json, app_src, app_dest, app_name):
+            return False
+    elif checkContains(BUILD_PARAMETERS.pkgtype, "WGT"):
+        if not packWGT(build_json, app_src, app_dest, app_name):
+            return False
+    elif checkContains(BUILD_PARAMETERS.pkgtype, "APK"):
+        if not packAPK(build_json, app_src, app_dest, app_name):
+            return False
+    elif checkContains(BUILD_PARAMETERS.pkgtype, "CORDOVA"):
+        if not packCordova(build_json, app_src, app_dest, app_name):
+            return False
+    elif checkContains(BUILD_PARAMETERS.pkgtype, "EMBEDDINGAPI"):
+        if not packEmbeddingAPI(build_json, app_src, app_dest, app_name):
+            return False
+    else:
+        LOG.error("Got wrong pkg type: %s" % BUILD_PARAMETERS.pkgtype)
+        return False
+
+    LOG.info("Success to pack APP: %s" % app_name)
+    return True
+
+
+def createIndexFile(index_file_path=None, hosted_app=None):
+    try:
+        if hosted_app:
+            index_url = "http://127.0.0.1/opt/%s/webrunner/index.html?" \
+                "testsuite=../tests.xml&testprefix=../../.." % PKG_NAME
+        else:
+            index_url = "opt/%s/webrunner/index.html?testsuite=../tests.xml" \
+                        "&testprefix=../../.." % PKG_NAME
+        html_content = "<!doctype html><head><meta http-equiv='Refresh' " \
+                       "content='1; url=%s'></head>" % index_url
+        index_file = open(index_file_path, "w")
+        index_file.write(html_content)
+        index_file.close()
+    except Exception as e:
+        LOG.error("Fail to create index.html for top-app: %s" % e)
+        return False
+    LOG.info("Success to create index file %s" % index_file_path)
+    return True
+
+
+def buildSubAPP(app_dir=None, build_json=None, app_dest_default=None):
+    app_dir_inside = safelyGetValue(build_json, "app-dir")
+    if app_dir_inside:
+        app_dir = app_dir_inside
+    LOG.info("+Building sub APP(s) from %s ..." % app_dir)
+    app_dir = os.path.join(BUILD_ROOT_SRC, app_dir)
+    app_name = safelyGetValue(build_json, "app-name")
+    if not app_name:
+        app_name = os.path.basename(app_dir)
+
+    app_src = os.path.join(BUILD_ROOT_SRC_SUB_APP, app_name)
+    if buildSRC(app_dir, app_src, build_json):
+        app_dest = safelyGetValue(build_json, "install-path")
+        if app_dest:
+            app_dest = os.path.join(app_dest_default, app_dest)
+        else:
+            app_dest = app_dest_default
+
+        if safelyGetValue(build_json, "all-apps") == "true":
+            app_dirs = os.listdir(app_src)
+            apps_num = 0
+            for i_app_dir in app_dirs:
+                if os.path.isdir(os.path.join(app_src, i_app_dir)):
+                    i_app_name = os.path.basename(i_app_dir)
+                    if not packAPP(
+                            build_json, os.path.join(app_src, i_app_name),
+                            app_dest, i_app_name):
+                        return False
+                    else:
+                        apps_num = apps_num + 1
+            if apps_num > 0:
+                LOG.info("Totally packed %d apps in %s" % (apps_num, app_dir))
+                return True
+        else:
+            return packAPP(build_json, app_src, app_dest, app_name)
+    return False
+
+
+def buildPKGAPP(build_json=None):
+    LOG.info("+Building package APP ...")
+    if not doCopy(os.path.join(BUILD_ROOT_SRC, "icon.png"),
+                  os.path.join(BUILD_ROOT_SRC_PKG_APP, "icon.png")):
+        return False
+
+    if checkContains(BUILD_PARAMETERS.pkgtype, "XPK"):
+        if not doCopy(
+                os.path.join(BUILD_ROOT_SRC, "manifest.json"),
+                os.path.join(BUILD_ROOT_SRC_PKG_APP, "manifest.json")):
+            return False
+    elif checkContains(BUILD_PARAMETERS.pkgtype, "WGT"):
+        if not doCopy(os.path.join(BUILD_ROOT_SRC, "config.xml"),
+                      os.path.join(BUILD_ROOT_SRC_PKG_APP, "config.xml")):
+            return False
+
+    hosted_app = False
+    if safelyGetValue(build_json, "hosted-app") == "true":
+        hosted_app = True
+    if not createIndexFile(
+            os.path.join(BUILD_ROOT_SRC_PKG_APP, "index.html"), hosted_app):
+        return False
+
+    if not hosted_app:
+        if "blacklist" not in build_json:
+            build_json.update({"blacklist": []})
+        build_json["blacklist"].extend(PKG_BLACK_LIST)
+        if not buildSRC(BUILD_ROOT_SRC, BUILD_ROOT_PKG_APP, build_json):
+            return False
+
+        if "subapp-list" in build_json:
+            for i_sub_app in build_json["subapp-list"].keys():
+                if not buildSubAPP(
+                        i_sub_app, build_json["subapp-list"][i_sub_app],
+                        BUILD_ROOT_PKG_APP):
+                    return False
+
+    if not packAPP(
+            build_json, BUILD_ROOT_SRC_PKG_APP, BUILD_ROOT_PKG, PKG_NAME):
+        return False
+
+    return True
+
+
+def buildPKG(build_json=None):
+    if "blacklist" not in build_json:
+        build_json.update({"blacklist": []})
+    build_json["blacklist"].extend(PKG_BLACK_LIST)
+    if not buildSRC(BUILD_ROOT_SRC, BUILD_ROOT_PKG, build_json):
+        return False
+
+    if "subapp-list" in build_json:
+        for i_sub_app in build_json["subapp-list"].keys():
+            if not buildSubAPP(
+                    i_sub_app, build_json["subapp-list"][i_sub_app],
+                    BUILD_ROOT_PKG):
+                return False
+
+    if "pkg-app" in build_json:
+        if not buildPKGAPP(build_json["pkg-app"]):
+            return False
+
+    return True
+
+
+def main():
+    global LOG
+    LOG = logging.getLogger("pack-tool")
+    LOG.setLevel(LOG_LEVEL)
+    stream_handler = logging.StreamHandler()
+    stream_handler.setLevel(LOG_LEVEL)
+    stream_formatter = ColorFormatter("[%(asctime)s] %(message)s")
+    stream_handler.setFormatter(stream_formatter)
+    LOG.addHandler(stream_handler)
+
+    try:
+        usage = "Usage: ./pack.py -t apk -m shared -a x86"
+        opts_parser = OptionParser(usage=usage)
+        opts_parser.add_option(
+            "-c",
+            "--cfg",
+            dest="pkgcfg",
+            help="specify the path of config json file")
+        opts_parser.add_option(
+            "-t",
+            "--type",
+            dest="pkgtype",
+            help="specify the pkg type, e.g. apk, xpk, wgt ...")
+        opts_parser.add_option(
+            "-m",
+            "--mode",
+            dest="pkgmode",
+            help="specify the apk mode, e.g. shared, embedded")
+        opts_parser.add_option(
+            "-a",
+            "--arch",
+            dest="pkgarch",
+            help="specify the apk arch, e.g. x86, arm")
+        opts_parser.add_option(
+            "-d",
+            "--dest",
+            dest="destdir",
+            help="specify the installation folder for packed package")
+        opts_parser.add_option(
+            "-s",
+            "--src",
+            dest="srcdir",
+            help="specify the path of pkg resource for packing")
+        opts_parser.add_option(
+            "--tools",
+            dest="pkgpacktools",
+            help="specify the parent folder of pack tools")
+        opts_parser.add_option(
+            "--notclean",
+            dest="bnotclean",
+            action="store_true",
+            help="disable the build root clean after the packing")
+        opts_parser.add_option(
+            "--sign",
+            dest="signature",
+            action="store_true",
+            help="signature operation will be done when packing wgt")
+        opts_parser.add_option(
+            "-v",
+            "--version",
+            dest="bversion",
+            action="store_true",
+            help="show this tool's version")
+        opts_parser.add_option(
+            "--pkg-version",
+            dest="pkgversion",
+            help="specify the pkg version, e.g. 0.0.0.1")
+
+        if len(sys.argv) == 1:
+            sys.argv.append("-h")
+
+        global BUILD_PARAMETERS
+        (BUILD_PARAMETERS, args) = opts_parser.parse_args()
+    except Exception as e:
+        LOG.error("Got wrong options: %s, exit ..." % e)
+        sys.exit(1)
+
+    if BUILD_PARAMETERS.bversion:
+        print "Version: %s" % TOOL_VERSION
+        sys.exit(0)
+
+    if not BUILD_PARAMETERS.srcdir:
+        BUILD_PARAMETERS.srcdir = os.getcwd()
+    BUILD_PARAMETERS.srcdir = os.path.expanduser(BUILD_PARAMETERS.srcdir)
+
+    if not os.path.exists(
+            os.path.join(BUILD_PARAMETERS.srcdir, "..", "..", VERSION_FILE)):
+        if not os.path.exists(
+                os.path.join(BUILD_PARAMETERS.srcdir, "..", VERSION_FILE)):
+            if not os.path.exists(
+                    os.path.join(BUILD_PARAMETERS.srcdir, VERSION_FILE)):
+                LOG.info(
+                    "Not found pkg version file, try to use option --pkg-version")
+                pkg_version_file_path = None
+            else:
+                pkg_version_file_path = os.path.join(
+                    BUILD_PARAMETERS.srcdir, VERSION_FILE)
+        else:
+            pkg_version_file_path = os.path.join(
+                BUILD_PARAMETERS.srcdir, "..", VERSION_FILE)
+    else:
+        pkg_version_file_path = os.path.join(
+            BUILD_PARAMETERS.srcdir, "..", "..", VERSION_FILE)
+
+    try:
+        pkg_main_version = 0
+        pkg_release_version = 0
+        if BUILD_PARAMETERS.pkgversion:
+            LOG.info("Using %s as pkg version " % BUILD_PARAMETERS.pkgversion)
+            pkg_main_version = BUILD_PARAMETERS.pkgversion
+        else:
+            if pkg_version_file_path is not None:
+                LOG.info("Using pkg version file: %s" % pkg_version_file_path)
+                with open(pkg_version_file_path, "rt") as pkg_version_file:
+                    pkg_version_raw = pkg_version_file.read()
+                    pkg_version_file.close()
+                    pkg_version_json = json.loads(pkg_version_raw)
+                    pkg_main_version = pkg_version_json["main-version"]
+                    pkg_release_version = pkg_version_json["release-version"]
+    except Exception as e:
+        LOG.error("Fail to read pkg version file: %s, exit ..." % e)
+        sys.exit(1)
+
+    if not BUILD_PARAMETERS.pkgtype:
+        LOG.error("No pkg type provided, exit ...")
+        sys.exit(1)
+    elif not BUILD_PARAMETERS.pkgtype in PKG_TYPES:
+        LOG.error("Wrong pkg type, only support: %s, exit ..." %
+                  PKG_TYPES)
+        sys.exit(1)
+
+    if BUILD_PARAMETERS.pkgtype == "apk" or \
+       BUILD_PARAMETERS.pkgtype == "apk-aio":
+        if not BUILD_PARAMETERS.pkgmode:
+            LOG.error("No pkg mode option provided, exit ...")
+            sys.exit(1)
+        elif not BUILD_PARAMETERS.pkgmode in PKG_MODES:
+            LOG.error(
+                "Wrong pkg mode option provided, only support:%s, exit ..." %
+                PKG_MODES)
+            sys.exit(1)
+
+        if not BUILD_PARAMETERS.pkgarch:
+            LOG.error("No pkg arch option provided, exit ...")
+            sys.exit(1)
+        elif not BUILD_PARAMETERS.pkgarch in PKG_ARCHS:
+            LOG.error(
+                "Wrong pkg arch option provided, only support:%s, exit ..." %
+                PKG_ARCHS)
+            sys.exit(1)
+
+    if BUILD_PARAMETERS.pkgtype == "apk-aio" or \
+       BUILD_PARAMETERS.pkgtype == "cordova-aio":
+        if not BUILD_PARAMETERS.destdir or not os.path.exists(
+                BUILD_PARAMETERS.destdir):
+            LOG.error("No all-in-one installation dest dir found, exit ...")
+            sys.exit(1)
+
+    elif not BUILD_PARAMETERS.destdir:
+        BUILD_PARAMETERS.destdir = BUILD_PARAMETERS.srcdir
+    BUILD_PARAMETERS.destdir = os.path.expanduser(BUILD_PARAMETERS.destdir)
+
+    if not BUILD_PARAMETERS.pkgpacktools:
+        BUILD_PARAMETERS.pkgpacktools = os.path.join(
+            BUILD_PARAMETERS.srcdir, "..", "..", "tools")
+    BUILD_PARAMETERS.pkgpacktools = os.path.expanduser(
+        BUILD_PARAMETERS.pkgpacktools)
+
+    config_json = None
+    if BUILD_PARAMETERS.pkgcfg:
+        config_json_file_path = BUILD_PARAMETERS.pkgcfg
+    else:
+        config_json_file_path = os.path.join(
+            BUILD_PARAMETERS.srcdir, "suite.json")
+    try:
+        LOG.info("Using config json file: %s" % config_json_file_path)
+        with open(config_json_file_path, "rt") as config_json_file:
+            config_raw = config_json_file.read()
+            config_json_file.close()
+            config_json = json.loads(config_raw)
+    except Exception as e:
+        LOG.error("Fail to read config json file: %s, exit ..." % e)
+        sys.exit(1)
+
+    global PKG_NAME
+    PKG_NAME = safelyGetValue(config_json, "pkg-name")
+    if not PKG_NAME:
+        PKG_NAME = os.path.basename(BUILD_PARAMETERS.srcdir)
+        LOG.warning(
+            "Fail to read pkg name from json, "
+            "using src dir name as pkg name ...")
+
+    LOG.info("================= %s (%s-%s) ================" %
+             (PKG_NAME, pkg_main_version, pkg_release_version))
+
+    if not safelyGetValue(config_json, "pkg-list"):
+        LOG.error("Fail to read pkg-list, exit ...")
+        sys.exit(1)
+
+    pkg_json = None
+    for i_pkg in config_json["pkg-list"].keys():
+        i_pkg_list = i_pkg.replace(" ", "").split(",")
+        if BUILD_PARAMETERS.pkgtype in i_pkg_list:
+            pkg_json = config_json["pkg-list"][i_pkg]
+
+    if not pkg_json:
+        LOG.error("Fail to read pkg json, exit ...")
+        sys.exit(1)
+
+    if not prepareBuildRoot():
+        exitHandler(1)
+
+    if "pkg-blacklist" in config_json:
+        PKG_BLACK_LIST.extend(config_json["pkg-blacklist"])
+
+    if not buildPKG(pkg_json):
+        exitHandler(1)
+
+    LOG.info("+Building package ...")
+    if BUILD_PARAMETERS.pkgtype == "apk-aio" or \
+       BUILD_PARAMETERS.pkgtype == "cordova-aio":
+        pkg_file_list = os.listdir(os.path.join(BUILD_ROOT, "pkg"))
+        for i_file in pkg_file_list:
+            if not doCopy(
+                    os.path.join(BUILD_ROOT, "pkg", i_file),
+                    os.path.join(BUILD_PARAMETERS.destdir, i_file)):
+                exitHandler(1)
+    else:
+        pkg_file = os.path.join(
+            BUILD_PARAMETERS.destdir,
+            "%s-%s.%s.zip" %
+            (PKG_NAME,
+             pkg_main_version,
+             pkg_release_version))
+             
+
+        if not zipDir(os.path.join(BUILD_ROOT, "pkg"), pkg_file):
+            exitHandler(1)
+
+if __name__ == "__main__":
+    main()
+    exitHandler(0)
diff --git a/common/tct-canvas-html5-tests/resources/COPYING b/common/tct-canvas-html5-tests/resources/COPYING
new file mode 100644 (file)
index 0000000..35ac8be
--- /dev/null
@@ -0,0 +1,12 @@
+The testharness files come from
+https://github.com/w3c/testharness.js (commit 2486f01bf4c58de1c1b7cb39322af7b55c6c700b)
+without any modification.
+
+These tests are copyright by W3C and/or the author listed in the test
+file. The tests are dual-licensed under the W3C Test Suite License:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+and the BSD 3-clause License:
+http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+under W3C's test suite licensing policy:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
+
diff --git a/common/tct-canvas-html5-tests/resources/testharness.css b/common/tct-canvas-html5-tests/resources/testharness.css
new file mode 100644 (file)
index 0000000..3967004
--- /dev/null
@@ -0,0 +1,107 @@
+html {
+    font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;
+}
+
+#log .warning,
+#log .warning a {
+  color: black;
+  background: yellow;
+}
+
+#log .error,
+#log .error a {
+  color: white;
+  background: red;
+}
+
+#log pre {
+  border: 1px solid black;
+  padding: 1em;
+}
+
+section#summary {
+    margin-bottom:1em;
+}
+
+table#results {
+    border-collapse:collapse;
+    table-layout:fixed;
+    width:100%;
+}
+
+table#results th:first-child,
+table#results td:first-child {
+    width:4em;
+}
+
+table#results th:last-child,
+table#results td:last-child {
+    width:50%;
+}
+
+table#results.assertions th:last-child,
+table#results.assertions td:last-child {
+    width:35%;
+}
+
+table#results th {
+    padding:0;
+    padding-bottom:0.5em;
+    border-bottom:medium solid black;
+}
+
+table#results td {
+    padding:1em;
+    padding-bottom:0.5em;
+    border-bottom:thin solid black;
+}
+
+tr.pass > td:first-child {
+    color:green;
+}
+
+tr.fail > td:first-child {
+    color:red;
+}
+
+tr.timeout > td:first-child {
+    color:red;
+}
+
+tr.notrun > td:first-child {
+    color:blue;
+}
+
+.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child {
+    font-variant:small-caps;
+}
+
+table#results span {
+    display:block;
+}
+
+table#results span.expected {
+    font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
+    white-space:pre;
+}
+
+table#results span.actual {
+    font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
+    white-space:pre;
+}
+
+span.ok {
+    color:green;
+}
+
+tr.error {
+    color:red;
+}
+
+span.timeout {
+    color:red;
+}
+
+span.ok, span.timeout, span.error {
+    font-variant:small-caps;
+}
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/resources/testharness.js b/common/tct-canvas-html5-tests/resources/testharness.js
new file mode 100644 (file)
index 0000000..ecc050c
--- /dev/null
@@ -0,0 +1,2353 @@
+/*global self*/
+/*jshint latedef: nofunc*/
+/*
+Distributed under both the W3C Test Suite License [1] and the W3C
+3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
+policies and contribution forms [3].
+
+[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+[3] http://www.w3.org/2004/10/27-testcases
+*/
+
+/* Documentation is in docs/api.md */
+
+(function ()
+{
+    var debug = false;
+    // default timeout is 10 seconds, test can override if needed
+    var settings = {
+        output:true,
+        harness_timeout:{
+            "normal":10000,
+            "long":60000
+        },
+        test_timeout:null
+    };
+
+    var xhtml_ns = "http://www.w3.org/1999/xhtml";
+
+    /*
+     * TestEnvironment is an abstraction for the environment in which the test
+     * harness is used. Each implementation of a test environment has to provide
+     * the following interface:
+     *
+     * interface TestEnvironment {
+     *   // Invoked after the global 'tests' object has been created and it's
+     *   // safe to call add_*_callback() to register event handlers.
+     *   void on_tests_ready();
+     *
+     *   // Invoked after setup() has been called to notify the test environment
+     *   // of changes to the test harness properties.
+     *   void on_new_harness_properties(object properties);
+     *
+     *   // Should return a new unique default test name.
+     *   DOMString next_default_test_name();
+     *
+     *   // Should return the test harness timeout duration in milliseconds.
+     *   float test_timeout();
+     *
+     *   // Should return the global scope object.
+     *   object global_scope();
+     * };
+     */
+
+    /*
+     * A test environment with a DOM. The global object is 'window'. By default
+     * test results are displayed in a table. Any parent windows receive
+     * callbacks or messages via postMessage() when test events occur. See
+     * apisample11.html and apisample12.html.
+     */
+    function WindowTestEnvironment() {
+        this.name_counter = 0;
+        this.window_cache = null;
+        this.output_handler = null;
+        this.all_loaded = false;
+        var this_obj = this;
+        on_event(window, 'load', function() {
+            this_obj.all_loaded = true;
+        });
+    }
+
+    WindowTestEnvironment.prototype._dispatch = function(selector, callback_args, message_arg) {
+        this._forEach_windows(
+                function(w, is_same_origin) {
+                    if (is_same_origin && selector in w) {
+                        try {
+                            w[selector].apply(undefined, callback_args);
+                        } catch (e) {
+                            if (debug) {
+                                throw e;
+                            }
+                        }
+                    }
+                    if (supports_post_message(w) && w !== self) {
+                        w.postMessage(message_arg, "*");
+                    }
+                });
+    };
+
+    WindowTestEnvironment.prototype._forEach_windows = function(callback) {
+        // Iterate of the the windows [self ... top, opener]. The callback is passed
+        // two objects, the first one is the windows object itself, the second one
+        // is a boolean indicating whether or not its on the same origin as the
+        // current window.
+        var cache = this.window_cache;
+        if (!cache) {
+            cache = [[self, true]];
+            var w = self;
+            var i = 0;
+            var so;
+            var origins = location.ancestorOrigins;
+            while (w != w.parent) {
+                w = w.parent;
+                // In WebKit, calls to parent windows' properties that aren't on the same
+                // origin cause an error message to be displayed in the error console but
+                // don't throw an exception. This is a deviation from the current HTML5
+                // spec. See: https://bugs.webkit.org/show_bug.cgi?id=43504
+                // The problem with WebKit's behavior is that it pollutes the error console
+                // with error messages that can't be caught.
+                //
+                // This issue can be mitigated by relying on the (for now) proprietary
+                // `location.ancestorOrigins` property which returns an ordered list of
+                // the origins of enclosing windows. See:
+                // http://trac.webkit.org/changeset/113945.
+                if (origins) {
+                    so = (location.origin == origins[i]);
+                } else {
+                    so = is_same_origin(w);
+                }
+                cache.push([w, so]);
+                i++;
+            }
+            w = window.opener;
+            if (w) {
+                // window.opener isn't included in the `location.ancestorOrigins` prop.
+                // We'll just have to deal with a simple check and an error msg on WebKit
+                // browsers in this case.
+                cache.push([w, is_same_origin(w)]);
+            }
+            this.window_cache = cache;
+        }
+
+        forEach(cache,
+                function(a) {
+                    callback.apply(null, a);
+                });
+    };
+
+    WindowTestEnvironment.prototype.on_tests_ready = function() {
+        var output = new Output();
+        this.output_handler = output;
+
+        var this_obj = this;
+        add_start_callback(function (properties) {
+            this_obj.output_handler.init(properties);
+            this_obj._dispatch("start_callback", [properties],
+                           { type: "start", properties: properties });
+        });
+        add_test_state_callback(function(test) {
+            this_obj.output_handler.show_status();
+            this_obj._dispatch("test_state_callback", [test],
+                               { type: "test_state", test: test.structured_clone() });
+        });
+        add_result_callback(function (test) {
+            this_obj.output_handler.show_status();
+            this_obj._dispatch("result_callback", [test],
+                               { type: "result", test: test.structured_clone() });
+        });
+        add_completion_callback(function (tests, harness_status) {
+            this_obj.output_handler.show_results(tests, harness_status);
+            var cloned_tests = map(tests, function(test) { return test.structured_clone(); });
+            this_obj._dispatch("completion_callback", [tests, harness_status],
+                               { type: "complete", tests: cloned_tests,
+                                 status: harness_status.structured_clone() });
+        });
+    };
+
+    WindowTestEnvironment.prototype.next_default_test_name = function() {
+        //Don't use document.title to work around an Opera bug in XHTML documents
+        var title = document.getElementsByTagName("title")[0];
+        var prefix = (title && title.firstChild && title.firstChild.data) || "Untitled";
+        var suffix = this.name_counter > 0 ? " " + this.name_counter : "";
+        this.name_counter++;
+        return prefix + suffix;
+    };
+
+    WindowTestEnvironment.prototype.on_new_harness_properties = function(properties) {
+        this.output_handler.setup(properties);
+    };
+
+    WindowTestEnvironment.prototype.add_on_loaded_callback = function(callback) {
+        on_event(window, 'load', callback);
+    };
+
+    WindowTestEnvironment.prototype.test_timeout = function() {
+        var metas = document.getElementsByTagName("meta");
+        for (var i = 0; i < metas.length; i++) {
+            if (metas[i].name == "timeout") {
+                if (metas[i].content == "long") {
+                    return settings.harness_timeout.long;
+                }
+                break;
+            }
+        }
+        return settings.harness_timeout.normal;
+    };
+
+    WindowTestEnvironment.prototype.global_scope = function() {
+        return window;
+    };
+
+    /*
+     * Base TestEnvironment implementation for a generic web worker.
+     *
+     * Workers accumulate test results. One or more clients can connect and
+     * retrieve results from a worker at any time.
+     *
+     * WorkerTestEnvironment supports communicating with a client via a
+     * MessagePort.  The mechanism for determining the appropriate MessagePort
+     * for communicating with a client depends on the type of worker and is
+     * implemented by the various specializations of WorkerTestEnvironment
+     * below.
+     *
+     * A client document using testharness can use fetch_tests_from_worker() to
+     * retrieve results from a worker. See apisample16.html.
+     */
+    function WorkerTestEnvironment() {
+        this.name_counter = 0;
+        this.all_loaded = true;
+        this.message_list = [];
+        this.message_ports = [];
+    }
+
+    WorkerTestEnvironment.prototype._dispatch = function(message) {
+        this.message_list.push(message);
+        for (var i = 0; i < this.message_ports.length; ++i)
+        {
+            this.message_ports[i].postMessage(message);
+        }
+    };
+
+    // The only requirement is that port has a postMessage() method. It doesn't
+    // have to be an instance of a MessagePort, and often isn't.
+    WorkerTestEnvironment.prototype._add_message_port = function(port) {
+        this.message_ports.push(port);
+        for (var i = 0; i < this.message_list.length; ++i)
+        {
+            port.postMessage(this.message_list[i]);
+        }
+    };
+
+    WorkerTestEnvironment.prototype.next_default_test_name = function() {
+        var suffix = this.name_counter > 0 ? " " + this.name_counter : "";
+        this.name_counter++;
+        return "Untitled" + suffix;
+    };
+
+    WorkerTestEnvironment.prototype.on_new_harness_properties = function() {};
+
+    WorkerTestEnvironment.prototype.on_tests_ready = function() {
+        var this_obj = this;
+        add_start_callback(
+                function(properties) {
+                    this_obj._dispatch({
+                        type: "start",
+                        properties: properties,
+                    });
+                });
+        add_test_state_callback(
+                function(test) {
+                    this_obj._dispatch({
+                        type: "test_state",
+                        test: test.structured_clone()
+                    });
+                });
+        add_result_callback(
+                function(test) {
+                    this_obj._dispatch({
+                        type: "result",
+                        test: test.structured_clone()
+                    });
+                });
+        add_completion_callback(
+                function(tests, harness_status) {
+                    this_obj._dispatch({
+                        type: "complete",
+                        tests: map(tests,
+                            function(test) {
+                                return test.structured_clone();
+                            }),
+                        status: harness_status.structured_clone()
+                    });
+                });
+    };
+
+    WorkerTestEnvironment.prototype.add_on_loaded_callback = function() {};
+
+    WorkerTestEnvironment.prototype.test_timeout = function() {
+        // Tests running in a worker don't have a default timeout. I.e. all
+        // worker tests behave as if settings.explicit_timeout is true.
+        return null;
+    };
+
+    WorkerTestEnvironment.prototype.global_scope = function() {
+        return self;
+    };
+
+    /*
+     * Dedicated web workers.
+     * https://html.spec.whatwg.org/multipage/workers.html#dedicatedworkerglobalscope
+     *
+     * This class is used as the test_environment when testharness is running
+     * inside a dedicated worker.
+     */
+    function DedicatedWorkerTestEnvironment() {
+        WorkerTestEnvironment.call(this);
+        // self is an instance of DedicatedWorkerGlobalScope which exposes
+        // a postMessage() method for communicating via the message channel
+        // established when the worker is created.
+        this._add_message_port(self);
+    }
+    DedicatedWorkerTestEnvironment.prototype = Object.create(WorkerTestEnvironment.prototype);
+
+    DedicatedWorkerTestEnvironment.prototype.on_tests_ready = function() {
+        WorkerTestEnvironment.prototype.on_tests_ready.call(this);
+        // In the absence of an onload notification, we a require dedicated
+        // workers to explicitly signal when the tests are done.
+        tests.wait_for_finish = true;
+    };
+
+    /*
+     * Shared web workers.
+     * https://html.spec.whatwg.org/multipage/workers.html#sharedworkerglobalscope
+     *
+     * This class is used as the test_environment when testharness is running
+     * inside a shared web worker.
+     */
+    function SharedWorkerTestEnvironment() {
+        WorkerTestEnvironment.call(this);
+        var this_obj = this;
+        // Shared workers receive message ports via the 'onconnect' event for
+        // each connection.
+        self.addEventListener("connect",
+                function(message_event) {
+                    this_obj._add_message_port(message_event.source);
+                });
+    }
+    SharedWorkerTestEnvironment.prototype = Object.create(WorkerTestEnvironment.prototype);
+
+    SharedWorkerTestEnvironment.prototype.on_tests_ready = function() {
+        WorkerTestEnvironment.prototype.on_tests_ready.call(this);
+        // In the absence of an onload notification, we a require shared
+        // workers to explicitly signal when the tests are done.
+        tests.wait_for_finish = true;
+    };
+
+    /*
+     * Service workers.
+     * http://www.w3.org/TR/service-workers/
+     *
+     * This class is used as the test_environment when testharness is running
+     * inside a service worker.
+     */
+    function ServiceWorkerTestEnvironment() {
+        WorkerTestEnvironment.call(this);
+        this.all_loaded = false;
+        this.on_loaded_callback = null;
+        var this_obj = this;
+        self.addEventListener("message",
+                function(event) {
+                    if (event.data.type && event.data.type === "connect") {
+                        this_obj._add_message_port(event.ports[0]);
+                        event.ports[0].start();
+                    }
+                });
+
+        // The oninstall event is received after the service worker script and
+        // all imported scripts have been fetched and executed. It's the
+        // equivalent of an onload event for a document. All tests should have
+        // been added by the time this event is received, thus it's not
+        // necessary to wait until the onactivate event.
+        on_event(self, "install",
+                function(event) {
+                    this_obj.all_loaded = true;
+                    if (this_obj.on_loaded_callback) {
+                        this_obj.on_loaded_callback();
+                    }
+                });
+    }
+    ServiceWorkerTestEnvironment.prototype = Object.create(WorkerTestEnvironment.prototype);
+
+    ServiceWorkerTestEnvironment.prototype.add_on_loaded_callback = function(callback) {
+        if (this.all_loaded) {
+            callback();
+        } else {
+            this.on_loaded_callback = callback;
+        }
+    };
+
+    function create_test_environment() {
+        if ('document' in self) {
+            return new WindowTestEnvironment();
+        }
+        if ('DedicatedWorkerGlobalScope' in self &&
+            self instanceof DedicatedWorkerGlobalScope) {
+            return new DedicatedWorkerTestEnvironment();
+        }
+        if ('SharedWorkerGlobalScope' in self &&
+            self instanceof SharedWorkerGlobalScope) {
+            return new SharedWorkerTestEnvironment();
+        }
+        if ('ServiceWorkerGlobalScope' in self &&
+            self instanceof ServiceWorkerGlobalScope) {
+            return new ServiceWorkerTestEnvironment();
+        }
+        throw new Error("Unsupported test environment");
+    }
+
+    var test_environment = create_test_environment();
+
+    function is_shared_worker(worker) {
+        return 'SharedWorker' in self && worker instanceof SharedWorker;
+    }
+
+    function is_service_worker(worker) {
+        return 'ServiceWorker' in self && worker instanceof ServiceWorker;
+    }
+
+    /*
+     * API functions
+     */
+
+    function test(func, name, properties)
+    {
+        var test_name = name ? name : test_environment.next_default_test_name();
+        properties = properties ? properties : {};
+        var test_obj = new Test(test_name, properties);
+        test_obj.step(func, test_obj, test_obj);
+        if (test_obj.phase === test_obj.phases.STARTED) {
+            test_obj.done();
+        }
+    }
+
+    function async_test(func, name, properties)
+    {
+        if (typeof func !== "function") {
+            properties = name;
+            name = func;
+            func = null;
+        }
+        var test_name = name ? name : test_environment.next_default_test_name();
+        properties = properties ? properties : {};
+        var test_obj = new Test(test_name, properties);
+        if (func) {
+            test_obj.step(func, test_obj, test_obj);
+        }
+        return test_obj;
+    }
+
+    function promise_test(func, name, properties) {
+        var test = async_test(name, properties);
+        Promise.resolve(test.step(func, test, test))
+            .then(
+                function() {
+                    test.done();
+                })
+            .catch(test.step_func(
+                function(value) {
+                    if (value instanceof AssertionError) {
+                        throw value;
+                    }
+                    assert(false, "promise_test", null,
+                           "Unhandled rejection with value: ${value}", {value:value});
+                }));
+    }
+
+    function setup(func_or_properties, maybe_properties)
+    {
+        var func = null;
+        var properties = {};
+        if (arguments.length === 2) {
+            func = func_or_properties;
+            properties = maybe_properties;
+        } else if (func_or_properties instanceof Function) {
+            func = func_or_properties;
+        } else {
+            properties = func_or_properties;
+        }
+        tests.setup(func, properties);
+        test_environment.on_new_harness_properties(properties);
+    }
+
+    function done() {
+        if (tests.tests.length === 0) {
+            tests.set_file_is_test();
+        }
+        if (tests.file_is_test) {
+            tests.tests[0].done();
+        }
+        tests.end_wait();
+    }
+
+    function generate_tests(func, args, properties) {
+        forEach(args, function(x, i)
+                {
+                    var name = x[0];
+                    test(function()
+                         {
+                             func.apply(this, x.slice(1));
+                         },
+                         name,
+                         Array.isArray(properties) ? properties[i] : properties);
+                });
+    }
+
+    function on_event(object, event, callback)
+    {
+        object.addEventListener(event, callback, false);
+    }
+
+    expose(test, 'test');
+    expose(async_test, 'async_test');
+    expose(promise_test, 'promise_test');
+    expose(generate_tests, 'generate_tests');
+    expose(setup, 'setup');
+    expose(done, 'done');
+    expose(on_event, 'on_event');
+
+    /*
+     * Return a string truncated to the given length, with ... added at the end
+     * if it was longer.
+     */
+    function truncate(s, len)
+    {
+        if (s.length > len) {
+            return s.substring(0, len - 3) + "...";
+        }
+        return s;
+    }
+
+    /*
+     * Return true if object is probably a Node object.
+     */
+    function is_node(object)
+    {
+        // I use duck-typing instead of instanceof, because
+        // instanceof doesn't work if the node is from another window (like an
+        // iframe's contentWindow):
+        // http://www.w3.org/Bugs/Public/show_bug.cgi?id=12295
+        if ("nodeType" in object &&
+            "nodeName" in object &&
+            "nodeValue" in object &&
+            "childNodes" in object) {
+            try {
+                object.nodeType;
+            } catch (e) {
+                // The object is probably Node.prototype or another prototype
+                // object that inherits from it, and not a Node instance.
+                return false;
+            }
+            return true;
+        }
+        return false;
+    }
+
+    /*
+     * Convert a value to a nice, human-readable string
+     */
+    function format_value(val, seen)
+    {
+        if (!seen) {
+            seen = [];
+        }
+        if (typeof val === "object" && val !== null) {
+            if (seen.indexOf(val) >= 0) {
+                return "[...]";
+            }
+            seen.push(val);
+        }
+        if (Array.isArray(val)) {
+            return "[" + val.map(function(x) {return format_value(x, seen);}).join(", ") + "]";
+        }
+
+        switch (typeof val) {
+        case "string":
+            val = val.replace("\\", "\\\\");
+            for (var i = 0; i < 32; i++) {
+                var replace = "\\";
+                switch (i) {
+                case 0: replace += "0"; break;
+                case 1: replace += "x01"; break;
+                case 2: replace += "x02"; break;
+                case 3: replace += "x03"; break;
+                case 4: replace += "x04"; break;
+                case 5: replace += "x05"; break;
+                case 6: replace += "x06"; break;
+                case 7: replace += "x07"; break;
+                case 8: replace += "b"; break;
+                case 9: replace += "t"; break;
+                case 10: replace += "n"; break;
+                case 11: replace += "v"; break;
+                case 12: replace += "f"; break;
+                case 13: replace += "r"; break;
+                case 14: replace += "x0e"; break;
+                case 15: replace += "x0f"; break;
+                case 16: replace += "x10"; break;
+                case 17: replace += "x11"; break;
+                case 18: replace += "x12"; break;
+                case 19: replace += "x13"; break;
+                case 20: replace += "x14"; break;
+                case 21: replace += "x15"; break;
+                case 22: replace += "x16"; break;
+                case 23: replace += "x17"; break;
+                case 24: replace += "x18"; break;
+                case 25: replace += "x19"; break;
+                case 26: replace += "x1a"; break;
+                case 27: replace += "x1b"; break;
+                case 28: replace += "x1c"; break;
+                case 29: replace += "x1d"; break;
+                case 30: replace += "x1e"; break;
+                case 31: replace += "x1f"; break;
+                }
+                val = val.replace(RegExp(String.fromCharCode(i), "g"), replace);
+            }
+            return '"' + val.replace(/"/g, '\\"') + '"';
+        case "boolean":
+        case "undefined":
+            return String(val);
+        case "number":
+            // In JavaScript, -0 === 0 and String(-0) == "0", so we have to
+            // special-case.
+            if (val === -0 && 1/val === -Infinity) {
+                return "-0";
+            }
+            return String(val);
+        case "object":
+            if (val === null) {
+                return "null";
+            }
+
+            // Special-case Node objects, since those come up a lot in my tests.  I
+            // ignore namespaces.
+            if (is_node(val)) {
+                switch (val.nodeType) {
+                case Node.ELEMENT_NODE:
+                    var ret = "<" + val.localName;
+                    for (var i = 0; i < val.attributes.length; i++) {
+                        ret += " " + val.attributes[i].name + '="' + val.attributes[i].value + '"';
+                    }
+                    ret += ">" + val.innerHTML + "</" + val.localName + ">";
+                    return "Element node " + truncate(ret, 60);
+                case Node.TEXT_NODE:
+                    return 'Text node "' + truncate(val.data, 60) + '"';
+                case Node.PROCESSING_INSTRUCTION_NODE:
+                    return "ProcessingInstruction node with target " + format_value(truncate(val.target, 60)) + " and data " + format_value(truncate(val.data, 60));
+                case Node.COMMENT_NODE:
+                    return "Comment node <!--" + truncate(val.data, 60) + "-->";
+                case Node.DOCUMENT_NODE:
+                    return "Document node with " + val.childNodes.length + (val.childNodes.length == 1 ? " child" : " children");
+                case Node.DOCUMENT_TYPE_NODE:
+                    return "DocumentType node";
+                case Node.DOCUMENT_FRAGMENT_NODE:
+                    return "DocumentFragment node with " + val.childNodes.length + (val.childNodes.length == 1 ? " child" : " children");
+                default:
+                    return "Node object of unknown type";
+                }
+            }
+
+        /* falls through */
+        default:
+            return typeof val + ' "' + truncate(String(val), 60) + '"';
+        }
+    }
+    expose(format_value, "format_value");
+
+    /*
+     * Assertions
+     */
+
+    function assert_true(actual, description)
+    {
+        assert(actual === true, "assert_true", description,
+                                "expected true got ${actual}", {actual:actual});
+    }
+    expose(assert_true, "assert_true");
+
+    function assert_false(actual, description)
+    {
+        assert(actual === false, "assert_false", description,
+                                 "expected false got ${actual}", {actual:actual});
+    }
+    expose(assert_false, "assert_false");
+
+    function same_value(x, y) {
+        if (y !== y) {
+            //NaN case
+            return x !== x;
+        }
+        if (x === 0 && y === 0) {
+            //Distinguish +0 and -0
+            return 1/x === 1/y;
+        }
+        return x === y;
+    }
+
+    function assert_equals(actual, expected, description)
+    {
+         /*
+          * Test if two primitives are equal or two objects
+          * are the same object
+          */
+        if (typeof actual != typeof expected) {
+            assert(false, "assert_equals", description,
+                          "expected (" + typeof expected + ") ${expected} but got (" + typeof actual + ") ${actual}",
+                          {expected:expected, actual:actual});
+            return;
+        }
+        assert(same_value(actual, expected), "assert_equals", description,
+                                             "expected ${expected} but got ${actual}",
+                                             {expected:expected, actual:actual});
+    }
+    expose(assert_equals, "assert_equals");
+
+    function assert_not_equals(actual, expected, description)
+    {
+         /*
+          * Test if two primitives are unequal or two objects
+          * are different objects
+          */
+        assert(!same_value(actual, expected), "assert_not_equals", description,
+                                              "got disallowed value ${actual}",
+                                              {actual:actual});
+    }
+    expose(assert_not_equals, "assert_not_equals");
+
+    function assert_in_array(actual, expected, description)
+    {
+        assert(expected.indexOf(actual) != -1, "assert_in_array", description,
+                                               "value ${actual} not in array ${expected}",
+                                               {actual:actual, expected:expected});
+    }
+    expose(assert_in_array, "assert_in_array");
+
+    function assert_object_equals(actual, expected, description)
+    {
+         //This needs to be improved a great deal
+         function check_equal(actual, expected, stack)
+         {
+             stack.push(actual);
+
+             var p;
+             for (p in actual) {
+                 assert(expected.hasOwnProperty(p), "assert_object_equals", description,
+                                                    "unexpected property ${p}", {p:p});
+
+                 if (typeof actual[p] === "object" && actual[p] !== null) {
+                     if (stack.indexOf(actual[p]) === -1) {
+                         check_equal(actual[p], expected[p], stack);
+                     }
+                 } else {
+                     assert(same_value(actual[p], expected[p]), "assert_object_equals", description,
+                                                       "property ${p} expected ${expected} got ${actual}",
+                                                       {p:p, expected:expected, actual:actual});
+                 }
+             }
+             for (p in expected) {
+                 assert(actual.hasOwnProperty(p),
+                        "assert_object_equals", description,
+                        "expected property ${p} missing", {p:p});
+             }
+             stack.pop();
+         }
+         check_equal(actual, expected, []);
+    }
+    expose(assert_object_equals, "assert_object_equals");
+
+    function assert_array_equals(actual, expected, description)
+    {
+        assert(actual.length === expected.length,
+               "assert_array_equals", description,
+               "lengths differ, expected ${expected} got ${actual}",
+               {expected:expected.length, actual:actual.length});
+
+        for (var i = 0; i < actual.length; i++) {
+            assert(actual.hasOwnProperty(i) === expected.hasOwnProperty(i),
+                   "assert_array_equals", description,
+                   "property ${i}, property expected to be ${expected} but was ${actual}",
+                   {i:i, expected:expected.hasOwnProperty(i) ? "present" : "missing",
+                   actual:actual.hasOwnProperty(i) ? "present" : "missing"});
+            assert(same_value(expected[i], actual[i]),
+                   "assert_array_equals", description,
+                   "property ${i}, expected ${expected} but got ${actual}",
+                   {i:i, expected:expected[i], actual:actual[i]});
+        }
+    }
+    expose(assert_array_equals, "assert_array_equals");
+
+    function assert_approx_equals(actual, expected, epsilon, description)
+    {
+        /*
+         * Test if two primitive numbers are equal withing +/- epsilon
+         */
+        assert(typeof actual === "number",
+               "assert_approx_equals", description,
+               "expected a number but got a ${type_actual}",
+               {type_actual:typeof actual});
+
+        assert(Math.abs(actual - expected) <= epsilon,
+               "assert_approx_equals", description,
+               "expected ${expected} +/- ${epsilon} but got ${actual}",
+               {expected:expected, actual:actual, epsilon:epsilon});
+    }
+    expose(assert_approx_equals, "assert_approx_equals");
+
+    function assert_less_than(actual, expected, description)
+    {
+        /*
+         * Test if a primitive number is less than another
+         */
+        assert(typeof actual === "number",
+               "assert_less_than", description,
+               "expected a number but got a ${type_actual}",
+               {type_actual:typeof actual});
+
+        assert(actual < expected,
+               "assert_less_than", description,
+               "expected a number less than ${expected} but got ${actual}",
+               {expected:expected, actual:actual});
+    }
+    expose(assert_less_than, "assert_less_than");
+
+    function assert_greater_than(actual, expected, description)
+    {
+        /*
+         * Test if a primitive number is greater than another
+         */
+        assert(typeof actual === "number",
+               "assert_greater_than", description,
+               "expected a number but got a ${type_actual}",
+               {type_actual:typeof actual});
+
+        assert(actual > expected,
+               "assert_greater_than", description,
+               "expected a number greater than ${expected} but got ${actual}",
+               {expected:expected, actual:actual});
+    }
+    expose(assert_greater_than, "assert_greater_than");
+
+    function assert_less_than_equal(actual, expected, description)
+    {
+        /*
+         * Test if a primitive number is less than or equal to another
+         */
+        assert(typeof actual === "number",
+               "assert_less_than_equal", description,
+               "expected a number but got a ${type_actual}",
+               {type_actual:typeof actual});
+
+        assert(actual <= expected,
+               "assert_less_than", description,
+               "expected a number less than or equal to ${expected} but got ${actual}",
+               {expected:expected, actual:actual});
+    }
+    expose(assert_less_than_equal, "assert_less_than_equal");
+
+    function assert_greater_than_equal(actual, expected, description)
+    {
+        /*
+         * Test if a primitive number is greater than or equal to another
+         */
+        assert(typeof actual === "number",
+               "assert_greater_than_equal", description,
+               "expected a number but got a ${type_actual}",
+               {type_actual:typeof actual});
+
+        assert(actual >= expected,
+               "assert_greater_than_equal", description,
+               "expected a number greater than or equal to ${expected} but got ${actual}",
+               {expected:expected, actual:actual});
+    }
+    expose(assert_greater_than_equal, "assert_greater_than_equal");
+
+    function assert_regexp_match(actual, expected, description) {
+        /*
+         * Test if a string (actual) matches a regexp (expected)
+         */
+        assert(expected.test(actual),
+               "assert_regexp_match", description,
+               "expected ${expected} but got ${actual}",
+               {expected:expected, actual:actual});
+    }
+    expose(assert_regexp_match, "assert_regexp_match");
+
+    function assert_class_string(object, class_string, description) {
+        assert_equals({}.toString.call(object), "[object " + class_string + "]",
+                      description);
+    }
+    expose(assert_class_string, "assert_class_string");
+
+
+    function _assert_own_property(name) {
+        return function(object, property_name, description)
+        {
+            assert(property_name in object,
+                   name, description,
+                   "expected property ${p} missing", {p:property_name});
+        };
+    }
+    expose(_assert_own_property("assert_exists"), "assert_exists");
+    expose(_assert_own_property("assert_own_property"), "assert_own_property");
+
+    function assert_not_exists(object, property_name, description)
+    {
+        assert(!object.hasOwnProperty(property_name),
+               "assert_not_exists", description,
+               "unexpected property ${p} found", {p:property_name});
+    }
+    expose(assert_not_exists, "assert_not_exists");
+
+    function _assert_inherits(name) {
+        return function (object, property_name, description)
+        {
+            assert(typeof object === "object",
+                   name, description,
+                   "provided value is not an object");
+
+            assert("hasOwnProperty" in object,
+                   name, description,
+                   "provided value is an object but has no hasOwnProperty method");
+
+            assert(!object.hasOwnProperty(property_name),
+                   name, description,
+                   "property ${p} found on object expected in prototype chain",
+                   {p:property_name});
+
+            assert(property_name in object,
+                   name, description,
+                   "property ${p} not found in prototype chain",
+                   {p:property_name});
+        };
+    }
+    expose(_assert_inherits("assert_inherits"), "assert_inherits");
+    expose(_assert_inherits("assert_idl_attribute"), "assert_idl_attribute");
+
+    function assert_readonly(object, property_name, description)
+    {
+         var initial_value = object[property_name];
+         try {
+             //Note that this can have side effects in the case where
+             //the property has PutForwards
+             object[property_name] = initial_value + "a"; //XXX use some other value here?
+             assert(same_value(object[property_name], initial_value),
+                    "assert_readonly", description,
+                    "changing property ${p} succeeded",
+                    {p:property_name});
+         } finally {
+             object[property_name] = initial_value;
+         }
+    }
+    expose(assert_readonly, "assert_readonly");
+
+    function assert_throws(code, func, description)
+    {
+        try {
+            func.call(this);
+            assert(false, "assert_throws", description,
+                   "${func} did not throw", {func:func});
+        } catch (e) {
+            if (e instanceof AssertionError) {
+                throw e;
+            }
+            if (code === null) {
+                return;
+            }
+            if (typeof code === "object") {
+                assert(typeof e == "object" && "name" in e && e.name == code.name,
+                       "assert_throws", description,
+                       "${func} threw ${actual} (${actual_name}) expected ${expected} (${expected_name})",
+                                    {func:func, actual:e, actual_name:e.name,
+                                     expected:code,
+                                     expected_name:code.name});
+                return;
+            }
+
+            var code_name_map = {
+                INDEX_SIZE_ERR: 'IndexSizeError',
+                HIERARCHY_REQUEST_ERR: 'HierarchyRequestError',
+                WRONG_DOCUMENT_ERR: 'WrongDocumentError',
+                INVALID_CHARACTER_ERR: 'InvalidCharacterError',
+                NO_MODIFICATION_ALLOWED_ERR: 'NoModificationAllowedError',
+                NOT_FOUND_ERR: 'NotFoundError',
+                NOT_SUPPORTED_ERR: 'NotSupportedError',
+                INVALID_STATE_ERR: 'InvalidStateError',
+                SYNTAX_ERR: 'SyntaxError',
+                INVALID_MODIFICATION_ERR: 'InvalidModificationError',
+                NAMESPACE_ERR: 'NamespaceError',
+                INVALID_ACCESS_ERR: 'InvalidAccessError',
+                TYPE_MISMATCH_ERR: 'TypeMismatchError',
+                SECURITY_ERR: 'SecurityError',
+                NETWORK_ERR: 'NetworkError',
+                ABORT_ERR: 'AbortError',
+                URL_MISMATCH_ERR: 'URLMismatchError',
+                QUOTA_EXCEEDED_ERR: 'QuotaExceededError',
+                TIMEOUT_ERR: 'TimeoutError',
+                INVALID_NODE_TYPE_ERR: 'InvalidNodeTypeError',
+                DATA_CLONE_ERR: 'DataCloneError'
+            };
+
+            var name = code in code_name_map ? code_name_map[code] : code;
+
+            var name_code_map = {
+                IndexSizeError: 1,
+                HierarchyRequestError: 3,
+                WrongDocumentError: 4,
+                InvalidCharacterError: 5,
+                NoModificationAllowedError: 7,
+                NotFoundError: 8,
+                NotSupportedError: 9,
+                InvalidStateError: 11,
+                SyntaxError: 12,
+                InvalidModificationError: 13,
+                NamespaceError: 14,
+                InvalidAccessError: 15,
+                TypeMismatchError: 17,
+                SecurityError: 18,
+                NetworkError: 19,
+                AbortError: 20,
+                URLMismatchError: 21,
+                QuotaExceededError: 22,
+                TimeoutError: 23,
+                InvalidNodeTypeError: 24,
+                DataCloneError: 25,
+
+                UnknownError: 0,
+                ConstraintError: 0,
+                DataError: 0,
+                TransactionInactiveError: 0,
+                ReadOnlyError: 0,
+                VersionError: 0
+            };
+
+            if (!(name in name_code_map)) {
+                throw new AssertionError('Test bug: unrecognized DOMException code "' + code + '" passed to assert_throws()');
+            }
+
+            var required_props = { code: name_code_map[name] };
+
+            if (required_props.code === 0 ||
+               ("name" in e && e.name !== e.name.toUpperCase() && e.name !== "DOMException")) {
+                // New style exception: also test the name property.
+                required_props.name = name;
+            }
+
+            //We'd like to test that e instanceof the appropriate interface,
+            //but we can't, because we don't know what window it was created
+            //in.  It might be an instanceof the appropriate interface on some
+            //unknown other window.  TODO: Work around this somehow?
+
+            assert(typeof e == "object",
+                   "assert_throws", description,
+                   "${func} threw ${e} with type ${type}, not an object",
+                   {func:func, e:e, type:typeof e});
+
+            for (var prop in required_props) {
+                assert(typeof e == "object" && prop in e && e[prop] == required_props[prop],
+                       "assert_throws", description,
+                       "${func} threw ${e} that is not a DOMException " + code + ": property ${prop} is equal to ${actual}, expected ${expected}",
+                       {func:func, e:e, prop:prop, actual:e[prop], expected:required_props[prop]});
+            }
+        }
+    }
+    expose(assert_throws, "assert_throws");
+
+    function assert_unreached(description) {
+         assert(false, "assert_unreached", description,
+                "Reached unreachable code");
+    }
+    expose(assert_unreached, "assert_unreached");
+
+    function assert_any(assert_func, actual, expected_array)
+    {
+        var args = [].slice.call(arguments, 3);
+        var errors = [];
+        var passed = false;
+        forEach(expected_array,
+                function(expected)
+                {
+                    try {
+                        assert_func.apply(this, [actual, expected].concat(args));
+                        passed = true;
+                    } catch (e) {
+                        errors.push(e.message);
+                    }
+                });
+        if (!passed) {
+            throw new AssertionError(errors.join("\n\n"));
+        }
+    }
+    expose(assert_any, "assert_any");
+
+    function Test(name, properties)
+    {
+        if (tests.file_is_test && tests.tests.length) {
+            throw new Error("Tried to create a test with file_is_test");
+        }
+        this.name = name;
+
+        this.phase = this.phases.INITIAL;
+
+        this.status = this.NOTRUN;
+        this.timeout_id = null;
+        this.index = null;
+
+        this.properties = properties;
+        var timeout = properties.timeout ? properties.timeout : settings.test_timeout;
+        if (timeout !== null) {
+            this.timeout_length = timeout * tests.timeout_multiplier;
+        } else {
+            this.timeout_length = null;
+        }
+
+        this.message = null;
+
+        this.steps = [];
+
+        this.cleanup_callbacks = [];
+
+        tests.push(this);
+    }
+
+    Test.statuses = {
+        PASS:0,
+        FAIL:1,
+        TIMEOUT:2,
+        NOTRUN:3
+    };
+
+    Test.prototype = merge({}, Test.statuses);
+
+    Test.prototype.phases = {
+        INITIAL:0,
+        STARTED:1,
+        HAS_RESULT:2,
+        COMPLETE:3
+    };
+
+    Test.prototype.structured_clone = function()
+    {
+        if (!this._structured_clone) {
+            var msg = this.message;
+            msg = msg ? String(msg) : msg;
+            this._structured_clone = merge({
+                name:String(this.name),
+                properties:merge({}, this.properties),
+            }, Test.statuses);
+        }
+        this._structured_clone.status = this.status;
+        this._structured_clone.message = this.message;
+        this._structured_clone.index = this.index;
+        return this._structured_clone;
+    };
+
+    Test.prototype.step = function(func, this_obj)
+    {
+        if (this.phase > this.phases.STARTED) {
+            return;
+        }
+        this.phase = this.phases.STARTED;
+        //If we don't get a result before the harness times out that will be a test timout
+        this.set_status(this.TIMEOUT, "Test timed out");
+
+        tests.started = true;
+        tests.notify_test_state(this);
+
+        if (this.timeout_id === null) {
+            this.set_timeout();
+        }
+
+        this.steps.push(func);
+
+        if (arguments.length === 1) {
+            this_obj = this;
+        }
+
+        try {
+            return func.apply(this_obj, Array.prototype.slice.call(arguments, 2));
+        } catch (e) {
+            if (this.phase >= this.phases.HAS_RESULT) {
+                return;
+            }
+            var message = (typeof e === "object" && e !== null) ? e.message : e;
+            if (typeof e.stack != "undefined" && typeof e.message == "string") {
+                //Try to make it more informative for some exceptions, at least
+                //in Gecko and WebKit.  This results in a stack dump instead of
+                //just errors like "Cannot read property 'parentNode' of null"
+                //or "root is null".  Makes it a lot longer, of course.
+                message += "(stack: " + e.stack + ")";
+            }
+            this.set_status(this.FAIL, message);
+            this.phase = this.phases.HAS_RESULT;
+            this.done();
+        }
+    };
+
+    Test.prototype.step_func = function(func, this_obj)
+    {
+        var test_this = this;
+
+        if (arguments.length === 1) {
+            this_obj = test_this;
+        }
+
+        return function()
+        {
+            return test_this.step.apply(test_this, [func, this_obj].concat(
+                Array.prototype.slice.call(arguments)));
+        };
+    };
+
+    Test.prototype.step_func_done = function(func, this_obj)
+    {
+        var test_this = this;
+
+        if (arguments.length === 1) {
+            this_obj = test_this;
+        }
+
+        return function()
+        {
+            if (func) {
+                test_this.step.apply(test_this, [func, this_obj].concat(
+                    Array.prototype.slice.call(arguments)));
+            }
+            test_this.done();
+        };
+    };
+
+    Test.prototype.unreached_func = function(description)
+    {
+        return this.step_func(function() {
+            assert_unreached(description);
+        });
+    };
+
+    Test.prototype.add_cleanup = function(callback) {
+        this.cleanup_callbacks.push(callback);
+    };
+
+    Test.prototype.force_timeout = function() {
+        this.set_status(this.TIMEOUT);
+        this.phase = this.phases.HAS_RESULT;
+    };
+
+    Test.prototype.set_timeout = function()
+    {
+        if (this.timeout_length !== null) {
+            var this_obj = this;
+            this.timeout_id = setTimeout(function()
+                                         {
+                                             this_obj.timeout();
+                                         }, this.timeout_length);
+        }
+    };
+
+    Test.prototype.set_status = function(status, message)
+    {
+        this.status = status;
+        this.message = message;
+    };
+
+    Test.prototype.timeout = function()
+    {
+        this.timeout_id = null;
+        this.set_status(this.TIMEOUT, "Test timed out");
+        this.phase = this.phases.HAS_RESULT;
+        this.done();
+    };
+
+    Test.prototype.done = function()
+    {
+        if (this.phase == this.phases.COMPLETE) {
+            return;
+        }
+
+        if (this.phase <= this.phases.STARTED) {
+            this.set_status(this.PASS, null);
+        }
+
+        this.phase = this.phases.COMPLETE;
+
+        clearTimeout(this.timeout_id);
+        tests.result(this);
+        this.cleanup();
+    };
+
+    Test.prototype.cleanup = function() {
+        forEach(this.cleanup_callbacks,
+                function(cleanup_callback) {
+                    cleanup_callback();
+                });
+    };
+
+    /*
+     * A RemoteTest object mirrors a Test object on a remote worker. The
+     * associated RemoteWorker updates the RemoteTest object in response to
+     * received events. In turn, the RemoteTest object replicates these events
+     * on the local document. This allows listeners (test result reporting
+     * etc..) to transparently handle local and remote events.
+     */
+    function RemoteTest(clone) {
+        var this_obj = this;
+        Object.keys(clone).forEach(
+                function(key) {
+                    this_obj[key] = clone[key];
+                });
+        this.index = null;
+        this.phase = this.phases.INITIAL;
+        this.update_state_from(clone);
+        tests.push(this);
+    }
+
+    RemoteTest.prototype.structured_clone = function() {
+        var clone = {};
+        Object.keys(this).forEach(
+                function(key) {
+                    if (typeof(this[key]) === "object") {
+                        clone[key] = merge({}, this[key]);
+                    } else {
+                        clone[key] = this[key];
+                    }
+                });
+        clone.phases = merge({}, this.phases);
+        return clone;
+    };
+
+    RemoteTest.prototype.cleanup = function() {};
+    RemoteTest.prototype.phases = Test.prototype.phases;
+    RemoteTest.prototype.update_state_from = function(clone) {
+        this.status = clone.status;
+        this.message = clone.message;
+        if (this.phase === this.phases.INITIAL) {
+            this.phase = this.phases.STARTED;
+        }
+    };
+    RemoteTest.prototype.done = function() {
+        this.phase = this.phases.COMPLETE;
+    }
+
+    /*
+     * A RemoteWorker listens for test events from a worker. These events are
+     * then used to construct and maintain RemoteTest objects that mirror the
+     * tests running on the remote worker.
+     */
+    function RemoteWorker(worker) {
+        this.running = true;
+        this.tests = new Array();
+
+        var this_obj = this;
+        worker.onerror = function(error) { this_obj.worker_error(error); };
+
+        var message_port;
+
+        if (is_service_worker(worker)) {
+            // The ServiceWorker's implicit MessagePort is currently not
+            // reliably accessible from the ServiceWorkerGlobalScope due to
+            // Blink setting MessageEvent.source to null for messages sent via
+            // ServiceWorker.postMessage(). Until that's resolved, create an
+            // explicit MessageChannel and pass one end to the worker.
+            var message_channel = new MessageChannel();
+            message_port = message_channel.port1;
+            message_port.start();
+            worker.postMessage({type: "connect"}, [message_channel.port2]);
+        } else if (is_shared_worker(worker)) {
+            message_port = worker.port;
+        } else {
+            message_port = worker;
+        }
+
+        // Keeping a reference to the worker until worker_done() is seen
+        // prevents the Worker object and its MessageChannel from going away
+        // before all the messages are dispatched.
+        this.worker = worker;
+
+        message_port.onmessage =
+            function(message) {
+                if (this_obj.running && (message.data.type in this_obj.message_handlers)) {
+                    this_obj.message_handlers[message.data.type].call(this_obj, message.data);
+                }
+            };
+    }
+
+    RemoteWorker.prototype.worker_error = function(error) {
+        var message = error.message || String(error);
+        var filename = (error.filename ? " " + error.filename: "");
+        // FIXME: Display worker error states separately from main document
+        // error state.
+        this.worker_done({
+            status: {
+                status: tests.status.ERROR,
+                message: "Error in worker" + filename + ": " + message
+            }
+        });
+        error.preventDefault();
+    };
+
+    RemoteWorker.prototype.test_state = function(data) {
+        var remote_test = this.tests[data.test.index];
+        if (!remote_test) {
+            remote_test = new RemoteTest(data.test);
+            this.tests[data.test.index] = remote_test;
+        }
+        remote_test.update_state_from(data.test);
+        tests.notify_test_state(remote_test);
+    };
+
+    RemoteWorker.prototype.test_done = function(data) {
+        var remote_test = this.tests[data.test.index];
+        remote_test.update_state_from(data.test);
+        remote_test.done();
+        tests.result(remote_test);
+    };
+
+    RemoteWorker.prototype.worker_done = function(data) {
+        if (tests.status.status === null &&
+            data.status.status !== data.status.OK) {
+            tests.status.status = data.status.status;
+            tests.status.message = data.status.message;
+        }
+        this.running = false;
+        this.worker = null;
+        if (tests.all_done()) {
+            tests.complete();
+        }
+    };
+
+    RemoteWorker.prototype.message_handlers = {
+        test_state: RemoteWorker.prototype.test_state,
+        result: RemoteWorker.prototype.test_done,
+        complete: RemoteWorker.prototype.worker_done
+    };
+
+    /*
+     * Harness
+     */
+
+    function TestsStatus()
+    {
+        this.status = null;
+        this.message = null;
+    }
+
+    TestsStatus.statuses = {
+        OK:0,
+        ERROR:1,
+        TIMEOUT:2
+    };
+
+    TestsStatus.prototype = merge({}, TestsStatus.statuses);
+
+    TestsStatus.prototype.structured_clone = function()
+    {
+        if (!this._structured_clone) {
+            var msg = this.message;
+            msg = msg ? String(msg) : msg;
+            this._structured_clone = merge({
+                status:this.status,
+                message:msg
+            }, TestsStatus.statuses);
+        }
+        return this._structured_clone;
+    };
+
+    function Tests()
+    {
+        this.tests = [];
+        this.num_pending = 0;
+
+        this.phases = {
+            INITIAL:0,
+            SETUP:1,
+            HAVE_TESTS:2,
+            HAVE_RESULTS:3,
+            COMPLETE:4
+        };
+        this.phase = this.phases.INITIAL;
+
+        this.properties = {};
+
+        this.wait_for_finish = false;
+        this.processing_callbacks = false;
+
+        this.allow_uncaught_exception = false;
+
+        this.file_is_test = false;
+
+        this.timeout_multiplier = 1;
+        this.timeout_length = test_environment.test_timeout();
+        this.timeout_id = null;
+
+        this.start_callbacks = [];
+        this.test_state_callbacks = [];
+        this.test_done_callbacks = [];
+        this.all_done_callbacks = [];
+
+        this.pending_workers = [];
+
+        this.status = new TestsStatus();
+
+        var this_obj = this;
+
+        test_environment.add_on_loaded_callback(function() {
+            if (this_obj.all_done()) {
+                this_obj.complete();
+            }
+        });
+
+        this.set_timeout();
+    }
+
+    Tests.prototype.setup = function(func, properties)
+    {
+        if (this.phase >= this.phases.HAVE_RESULTS) {
+            return;
+        }
+
+        if (this.phase < this.phases.SETUP) {
+            this.phase = this.phases.SETUP;
+        }
+
+        this.properties = properties;
+
+        for (var p in properties) {
+            if (properties.hasOwnProperty(p)) {
+                var value = properties[p];
+                if (p == "allow_uncaught_exception") {
+                    this.allow_uncaught_exception = value;
+                } else if (p == "explicit_done" && value) {
+                    this.wait_for_finish = true;
+                } else if (p == "explicit_timeout" && value) {
+                    this.timeout_length = null;
+                    if (this.timeout_id)
+                    {
+                        clearTimeout(this.timeout_id);
+                    }
+                } else if (p == "timeout_multiplier") {
+                    this.timeout_multiplier = value;
+                }
+            }
+        }
+
+        if (func) {
+            try {
+                func();
+            } catch (e) {
+                this.status.status = this.status.ERROR;
+                this.status.message = String(e);
+            }
+        }
+        this.set_timeout();
+    };
+
+    Tests.prototype.set_file_is_test = function() {
+        if (this.tests.length > 0) {
+            throw new Error("Tried to set file as test after creating a test");
+        }
+        this.wait_for_finish = true;
+        this.file_is_test = true;
+        // Create the test, which will add it to the list of tests
+        async_test();
+    };
+
+    Tests.prototype.set_timeout = function() {
+        var this_obj = this;
+        clearTimeout(this.timeout_id);
+        if (this.timeout_length !== null) {
+            this.timeout_id = setTimeout(function() {
+                                             this_obj.timeout();
+                                         }, this.timeout_length);
+        }
+    };
+
+    Tests.prototype.timeout = function() {
+        if (this.status.status === null) {
+            this.status.status = this.status.TIMEOUT;
+        }
+        this.complete();
+    };
+
+    Tests.prototype.end_wait = function()
+    {
+        this.wait_for_finish = false;
+        if (this.all_done()) {
+            this.complete();
+        }
+    };
+
+    Tests.prototype.push = function(test)
+    {
+        if (this.phase < this.phases.HAVE_TESTS) {
+            this.start();
+        }
+        this.num_pending++;
+        test.index = this.tests.push(test);
+        this.notify_test_state(test);
+    };
+
+    Tests.prototype.notify_test_state = function(test) {
+        var this_obj = this;
+        forEach(this.test_state_callbacks,
+                function(callback) {
+                    callback(test, this_obj);
+                });
+    };
+
+    Tests.prototype.all_done = function() {
+        return (this.tests.length > 0 && test_environment.all_loaded &&
+                this.num_pending === 0 && !this.wait_for_finish &&
+                !this.processing_callbacks &&
+                !this.pending_workers.some(function(w) { return w.running; }));
+    };
+
+    Tests.prototype.start = function() {
+        this.phase = this.phases.HAVE_TESTS;
+        this.notify_start();
+    };
+
+    Tests.prototype.notify_start = function() {
+        var this_obj = this;
+        forEach (this.start_callbacks,
+                 function(callback)
+                 {
+                     callback(this_obj.properties);
+                 });
+    };
+
+    Tests.prototype.result = function(test)
+    {
+        if (this.phase > this.phases.HAVE_RESULTS) {
+            return;
+        }
+        this.phase = this.phases.HAVE_RESULTS;
+        this.num_pending--;
+        this.notify_result(test);
+    };
+
+    Tests.prototype.notify_result = function(test) {
+        var this_obj = this;
+        this.processing_callbacks = true;
+        forEach(this.test_done_callbacks,
+                function(callback)
+                {
+                    callback(test, this_obj);
+                });
+        this.processing_callbacks = false;
+        if (this_obj.all_done()) {
+            this_obj.complete();
+        }
+    };
+
+    Tests.prototype.complete = function() {
+        if (this.phase === this.phases.COMPLETE) {
+            return;
+        }
+        this.phase = this.phases.COMPLETE;
+        var this_obj = this;
+        this.tests.forEach(
+            function(x)
+            {
+                if (x.phase < x.phases.COMPLETE) {
+                    this_obj.notify_result(x);
+                    x.cleanup();
+                    x.phase = x.phases.COMPLETE;
+                }
+            }
+        );
+        this.notify_complete();
+    };
+
+    Tests.prototype.notify_complete = function() {
+        var this_obj = this;
+        if (this.status.status === null) {
+            this.status.status = this.status.OK;
+        }
+
+        forEach (this.all_done_callbacks,
+                 function(callback)
+                 {
+                     callback(this_obj.tests, this_obj.status);
+                 });
+    };
+
+    Tests.prototype.fetch_tests_from_worker = function(worker) {
+        if (this.phase >= this.phases.COMPLETE) {
+            return;
+        }
+
+        this.pending_workers.push(new RemoteWorker(worker));
+    };
+
+    function fetch_tests_from_worker(port) {
+        tests.fetch_tests_from_worker(port);
+    }
+    expose(fetch_tests_from_worker, 'fetch_tests_from_worker');
+
+    function timeout() {
+        if (tests.timeout_length === null) {
+            tests.timeout();
+        }
+    }
+    expose(timeout, 'timeout');
+
+    function add_start_callback(callback) {
+        tests.start_callbacks.push(callback);
+    }
+
+    function add_test_state_callback(callback) {
+        tests.test_state_callbacks.push(callback);
+    }
+
+    function add_result_callback(callback)
+    {
+        tests.test_done_callbacks.push(callback);
+    }
+
+    function add_completion_callback(callback)
+    {
+       tests.all_done_callbacks.push(callback);
+    }
+
+    expose(add_start_callback, 'add_start_callback');
+    expose(add_test_state_callback, 'add_test_state_callback');
+    expose(add_result_callback, 'add_result_callback');
+    expose(add_completion_callback, 'add_completion_callback');
+
+    /*
+     * Output listener
+    */
+
+    function Output() {
+        this.output_document = document;
+        this.output_node = null;
+        this.enabled = settings.output;
+        this.phase = this.INITIAL;
+    }
+
+    Output.prototype.INITIAL = 0;
+    Output.prototype.STARTED = 1;
+    Output.prototype.HAVE_RESULTS = 2;
+    Output.prototype.COMPLETE = 3;
+
+    Output.prototype.setup = function(properties) {
+        if (this.phase > this.INITIAL) {
+            return;
+        }
+
+        //If output is disabled in testharnessreport.js the test shouldn't be
+        //able to override that
+        this.enabled = this.enabled && (properties.hasOwnProperty("output") ?
+                                        properties.output : settings.output);
+    };
+
+    Output.prototype.init = function(properties) {
+        if (this.phase >= this.STARTED) {
+            return;
+        }
+        if (properties.output_document) {
+            this.output_document = properties.output_document;
+        } else {
+            this.output_document = document;
+        }
+        this.phase = this.STARTED;
+    };
+
+    Output.prototype.resolve_log = function() {
+        var output_document;
+        if (typeof this.output_document === "function") {
+            output_document = this.output_document.apply(undefined);
+        } else {
+            output_document = this.output_document;
+        }
+        if (!output_document) {
+            return;
+        }
+        var node = output_document.getElementById("log");
+        if (!node) {
+            if (!document.body || document.readyState == "loading") {
+                return;
+            }
+            node = output_document.createElement("div");
+            node.id = "log";
+            output_document.body.appendChild(node);
+        }
+        this.output_document = output_document;
+        this.output_node = node;
+    };
+
+    Output.prototype.show_status = function() {
+        if (this.phase < this.STARTED) {
+            this.init();
+        }
+        if (!this.enabled) {
+            return;
+        }
+        if (this.phase < this.HAVE_RESULTS) {
+            this.resolve_log();
+            this.phase = this.HAVE_RESULTS;
+        }
+        var done_count = tests.tests.length - tests.num_pending;
+        if (this.output_node) {
+            if (done_count < 100 ||
+                (done_count < 1000 && done_count % 100 === 0) ||
+                done_count % 1000 === 0) {
+                this.output_node.textContent = "Running, " +
+                    done_count + " complete, " +
+                    tests.num_pending + " remain";
+            }
+        }
+    };
+
+    Output.prototype.show_results = function (tests, harness_status) {
+        if (this.phase >= this.COMPLETE) {
+            return;
+        }
+        if (!this.enabled) {
+            return;
+        }
+        if (!this.output_node) {
+            this.resolve_log();
+        }
+        this.phase = this.COMPLETE;
+
+        var log = this.output_node;
+        if (!log) {
+            return;
+        }
+        var output_document = this.output_document;
+
+        while (log.lastChild) {
+            log.removeChild(log.lastChild);
+        }
+
+        var script_prefix = null;
+        var scripts = document.getElementsByTagName("script");
+        for (var i = 0; i < scripts.length; i++) {
+            var src;
+            if (scripts[i].src) {
+                src = scripts[i].src;
+            } else if (scripts[i].href) {
+                //SVG case
+                src = scripts[i].href.baseVal;
+            }
+
+            var matches = src && src.match(/^(.*\/|)testharness\.js$/);
+            if (matches) {
+                script_prefix = matches[1];
+                break;
+            }
+        }
+
+        if (script_prefix !== null) {
+            var stylesheet = output_document.createElementNS(xhtml_ns, "link");
+            stylesheet.setAttribute("rel", "stylesheet");
+            stylesheet.setAttribute("href", script_prefix + "testharness.css");
+            var heads = output_document.getElementsByTagName("head");
+            if (heads.length) {
+                heads[0].appendChild(stylesheet);
+            }
+        }
+
+        var status_text_harness = {};
+        status_text_harness[harness_status.OK] = "OK";
+        status_text_harness[harness_status.ERROR] = "Error";
+        status_text_harness[harness_status.TIMEOUT] = "Timeout";
+
+        var status_text = {};
+        status_text[Test.prototype.PASS] = "Pass";
+        status_text[Test.prototype.FAIL] = "Fail";
+        status_text[Test.prototype.TIMEOUT] = "Timeout";
+        status_text[Test.prototype.NOTRUN] = "Not Run";
+
+        var status_number = {};
+        forEach(tests,
+                function(test) {
+                    var status = status_text[test.status];
+                    if (status_number.hasOwnProperty(status)) {
+                        status_number[status] += 1;
+                    } else {
+                        status_number[status] = 1;
+                    }
+                });
+
+        function status_class(status)
+        {
+            return status.replace(/\s/g, '').toLowerCase();
+        }
+
+        var summary_template = ["section", {"id":"summary"},
+                                ["h2", {}, "Summary"],
+                                function()
+                                {
+
+                                    var status = status_text_harness[harness_status.status];
+                                    var rv = [["section", {},
+                                               ["p", {},
+                                                "Harness status: ",
+                                                ["span", {"class":status_class(status)},
+                                                 status
+                                                ],
+                                               ]
+                                              ]];
+
+                                    if (harness_status.status === harness_status.ERROR) {
+                                        rv[0].push(["pre", {}, harness_status.message]);
+                                    }
+                                    return rv;
+                                },
+                                ["p", {}, "Found ${num_tests} tests"],
+                                function() {
+                                    var rv = [["div", {}]];
+                                    var i = 0;
+                                    while (status_text.hasOwnProperty(i)) {
+                                        if (status_number.hasOwnProperty(status_text[i])) {
+                                            var status = status_text[i];
+                                            rv[0].push(["div", {"class":status_class(status)},
+                                                        ["label", {},
+                                                         ["input", {type:"checkbox", checked:"checked"}],
+                                                         status_number[status] + " " + status]]);
+                                        }
+                                        i++;
+                                    }
+                                    return rv;
+                                },
+                               ];
+
+        log.appendChild(render(summary_template, {num_tests:tests.length}, output_document));
+
+        forEach(output_document.querySelectorAll("section#summary label"),
+                function(element)
+                {
+                    on_event(element, "click",
+                             function(e)
+                             {
+                                 if (output_document.getElementById("results") === null) {
+                                     e.preventDefault();
+                                     return;
+                                 }
+                                 var result_class = element.parentNode.getAttribute("class");
+                                 var style_element = output_document.querySelector("style#hide-" + result_class);
+                                 var input_element = element.querySelector("input");
+                                 if (!style_element && !input_element.checked) {
+                                     style_element = output_document.createElementNS(xhtml_ns, "style");
+                                     style_element.id = "hide-" + result_class;
+                                     style_element.textContent = "table#results > tbody > tr."+result_class+"{display:none}";
+                                     output_document.body.appendChild(style_element);
+                                 } else if (style_element && input_element.checked) {
+                                     style_element.parentNode.removeChild(style_element);
+                                 }
+                             });
+                });
+
+        // This use of innerHTML plus manual escaping is not recommended in
+        // general, but is necessary here for performance.  Using textContent
+        // on each individual <td> adds tens of seconds of execution time for
+        // large test suites (tens of thousands of tests).
+        function escape_html(s)
+        {
+            return s.replace(/\&/g, "&amp;")
+                .replace(/</g, "&lt;")
+                .replace(/"/g, "&quot;")
+                .replace(/'/g, "&#39;");
+        }
+
+        function has_assertions()
+        {
+            for (var i = 0; i < tests.length; i++) {
+                if (tests[i].properties.hasOwnProperty("assert")) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        function get_assertion(test)
+        {
+            if (test.properties.hasOwnProperty("assert")) {
+                if (Array.isArray(test.properties.assert)) {
+                    return test.properties.assert.join(' ');
+                }
+                return test.properties.assert;
+            }
+            return '';
+        }
+
+        log.appendChild(document.createElementNS(xhtml_ns, "section"));
+        var assertions = has_assertions();
+        var html = "<h2>Details</h2><table id='results' " + (assertions ? "class='assertions'" : "" ) + ">" +
+            "<thead><tr><th>Result</th><th>Test Name</th>" +
+            (assertions ? "<th>Assertion</th>" : "") +
+            "<th>Message</th></tr></thead>" +
+            "<tbody>";
+        for (var i = 0; i < tests.length; i++) {
+            html += '<tr class="' +
+                escape_html(status_class(status_text[tests[i].status])) +
+                '"><td>' +
+                escape_html(status_text[tests[i].status]) +
+                "</td><td>" +
+                escape_html(tests[i].name) +
+                "</td><td>" +
+                (assertions ? escape_html(get_assertion(tests[i])) + "</td><td>" : "") +
+                escape_html(tests[i].message ? tests[i].message : " ") +
+                "</td></tr>";
+        }
+        html += "</tbody></table>";
+        try {
+            log.lastChild.innerHTML = html;
+        } catch (e) {
+            log.appendChild(document.createElementNS(xhtml_ns, "p"))
+               .textContent = "Setting innerHTML for the log threw an exception.";
+            log.appendChild(document.createElementNS(xhtml_ns, "pre"))
+               .textContent = html;
+        }
+    };
+
+    /*
+     * Template code
+     *
+     * A template is just a javascript structure. An element is represented as:
+     *
+     * [tag_name, {attr_name:attr_value}, child1, child2]
+     *
+     * the children can either be strings (which act like text nodes), other templates or
+     * functions (see below)
+     *
+     * A text node is represented as
+     *
+     * ["{text}", value]
+     *
+     * String values have a simple substitution syntax; ${foo} represents a variable foo.
+     *
+     * It is possible to embed logic in templates by using a function in a place where a
+     * node would usually go. The function must either return part of a template or null.
+     *
+     * In cases where a set of nodes are required as output rather than a single node
+     * with children it is possible to just use a list
+     * [node1, node2, node3]
+     *
+     * Usage:
+     *
+     * render(template, substitutions) - take a template and an object mapping
+     * variable names to parameters and return either a DOM node or a list of DOM nodes
+     *
+     * substitute(template, substitutions) - take a template and variable mapping object,
+     * make the variable substitutions and return the substituted template
+     *
+     */
+
+    function is_single_node(template)
+    {
+        return typeof template[0] === "string";
+    }
+
+    function substitute(template, substitutions)
+    {
+        if (typeof template === "function") {
+            var replacement = template(substitutions);
+            if (!replacement) {
+                return null;
+            }
+
+            return substitute(replacement, substitutions);
+        }
+
+        if (is_single_node(template)) {
+            return substitute_single(template, substitutions);
+        }
+
+        return filter(map(template, function(x) {
+                              return substitute(x, substitutions);
+                          }), function(x) {return x !== null;});
+    }
+
+    function substitute_single(template, substitutions)
+    {
+        var substitution_re = /\$\{([^ }]*)\}/g;
+
+        function do_substitution(input) {
+            var components = input.split(substitution_re);
+            var rv = [];
+            for (var i = 0; i < components.length; i += 2) {
+                rv.push(components[i]);
+                if (components[i + 1]) {
+                    rv.push(String(substitutions[components[i + 1]]));
+                }
+            }
+            return rv;
+        }
+
+        function substitute_attrs(attrs, rv)
+        {
+            rv[1] = {};
+            for (var name in template[1]) {
+                if (attrs.hasOwnProperty(name)) {
+                    var new_name = do_substitution(name).join("");
+                    var new_value = do_substitution(attrs[name]).join("");
+                    rv[1][new_name] = new_value;
+                }
+            }
+        }
+
+        function substitute_children(children, rv)
+        {
+            for (var i = 0; i < children.length; i++) {
+                if (children[i] instanceof Object) {
+                    var replacement = substitute(children[i], substitutions);
+                    if (replacement !== null) {
+                        if (is_single_node(replacement)) {
+                            rv.push(replacement);
+                        } else {
+                            extend(rv, replacement);
+                        }
+                    }
+                } else {
+                    extend(rv, do_substitution(String(children[i])));
+                }
+            }
+            return rv;
+        }
+
+        var rv = [];
+        rv.push(do_substitution(String(template[0])).join(""));
+
+        if (template[0] === "{text}") {
+            substitute_children(template.slice(1), rv);
+        } else {
+            substitute_attrs(template[1], rv);
+            substitute_children(template.slice(2), rv);
+        }
+
+        return rv;
+    }
+
+    function make_dom_single(template, doc)
+    {
+        var output_document = doc || document;
+        var element;
+        if (template[0] === "{text}") {
+            element = output_document.createTextNode("");
+            for (var i = 1; i < template.length; i++) {
+                element.data += template[i];
+            }
+        } else {
+            element = output_document.createElementNS(xhtml_ns, template[0]);
+            for (var name in template[1]) {
+                if (template[1].hasOwnProperty(name)) {
+                    element.setAttribute(name, template[1][name]);
+                }
+            }
+            for (var i = 2; i < template.length; i++) {
+                if (template[i] instanceof Object) {
+                    var sub_element = make_dom(template[i]);
+                    element.appendChild(sub_element);
+                } else {
+                    var text_node = output_document.createTextNode(template[i]);
+                    element.appendChild(text_node);
+                }
+            }
+        }
+
+        return element;
+    }
+
+    function make_dom(template, substitutions, output_document)
+    {
+        if (is_single_node(template)) {
+            return make_dom_single(template, output_document);
+        }
+
+        return map(template, function(x) {
+                       return make_dom_single(x, output_document);
+                   });
+    }
+
+    function render(template, substitutions, output_document)
+    {
+        return make_dom(substitute(template, substitutions), output_document);
+    }
+
+    /*
+     * Utility funcions
+     */
+    function assert(expected_true, function_name, description, error, substitutions)
+    {
+        if (tests.tests.length === 0) {
+            tests.set_file_is_test();
+        }
+        if (expected_true !== true) {
+            var msg = make_message(function_name, description,
+                                   error, substitutions);
+            throw new AssertionError(msg);
+        }
+    }
+
+    function AssertionError(message)
+    {
+        this.message = message;
+    }
+
+    AssertionError.prototype.toString = function() {
+        return this.message;
+    };
+
+    function make_message(function_name, description, error, substitutions)
+    {
+        for (var p in substitutions) {
+            if (substitutions.hasOwnProperty(p)) {
+                substitutions[p] = format_value(substitutions[p]);
+            }
+        }
+        var node_form = substitute(["{text}", "${function_name}: ${description}" + error],
+                                   merge({function_name:function_name,
+                                          description:(description?description + " ":"")},
+                                          substitutions));
+        return node_form.slice(1).join("");
+    }
+
+    function filter(array, callable, thisObj) {
+        var rv = [];
+        for (var i = 0; i < array.length; i++) {
+            if (array.hasOwnProperty(i)) {
+                var pass = callable.call(thisObj, array[i], i, array);
+                if (pass) {
+                    rv.push(array[i]);
+                }
+            }
+        }
+        return rv;
+    }
+
+    function map(array, callable, thisObj)
+    {
+        var rv = [];
+        rv.length = array.length;
+        for (var i = 0; i < array.length; i++) {
+            if (array.hasOwnProperty(i)) {
+                rv[i] = callable.call(thisObj, array[i], i, array);
+            }
+        }
+        return rv;
+    }
+
+    function extend(array, items)
+    {
+        Array.prototype.push.apply(array, items);
+    }
+
+    function forEach (array, callback, thisObj)
+    {
+        for (var i = 0; i < array.length; i++) {
+            if (array.hasOwnProperty(i)) {
+                callback.call(thisObj, array[i], i, array);
+            }
+        }
+    }
+
+    function merge(a,b)
+    {
+        var rv = {};
+        var p;
+        for (p in a) {
+            rv[p] = a[p];
+        }
+        for (p in b) {
+            rv[p] = b[p];
+        }
+        return rv;
+    }
+
+    function expose(object, name)
+    {
+        var components = name.split(".");
+        var target = test_environment.global_scope();
+        for (var i = 0; i < components.length - 1; i++) {
+            if (!(components[i] in target)) {
+                target[components[i]] = {};
+            }
+            target = target[components[i]];
+        }
+        target[components[components.length - 1]] = object;
+    }
+
+    function is_same_origin(w) {
+        try {
+            'random_prop' in w;
+            return true;
+        } catch (e) {
+            return false;
+        }
+    }
+
+    function supports_post_message(w)
+    {
+        var supports;
+        var type;
+        // Given IE  implements postMessage across nested iframes but not across
+        // windows or tabs, you can't infer cross-origin communication from the presence
+        // of postMessage on the current window object only.
+        //
+        // Touching the postMessage prop on a window can throw if the window is
+        // not from the same origin AND post message is not supported in that
+        // browser. So just doing an existence test here won't do, you also need
+        // to wrap it in a try..cacth block.
+        try {
+            type = typeof w.postMessage;
+            if (type === "function") {
+                supports = true;
+            }
+
+            // IE8 supports postMessage, but implements it as a host object which
+            // returns "object" as its `typeof`.
+            else if (type === "object") {
+                supports = true;
+            }
+
+            // This is the case where postMessage isn't supported AND accessing a
+            // window property across origins does NOT throw (e.g. old Safari browser).
+            else {
+                supports = false;
+            }
+        } catch (e) {
+            // This is the case where postMessage isn't supported AND accessing a
+            // window property across origins throws (e.g. old Firefox browser).
+            supports = false;
+        }
+        return supports;
+    }
+
+    /**
+     * Setup globals
+     */
+
+    var tests = new Tests();
+
+    addEventListener("error", function(e) {
+        if (tests.file_is_test) {
+            var test = tests.tests[0];
+            if (test.phase >= test.phases.HAS_RESULT) {
+                return;
+            }
+            var message = e.message;
+            test.set_status(test.FAIL, message);
+            test.phase = test.phases.HAS_RESULT;
+            test.done();
+            done();
+        } else if (!tests.allow_uncaught_exception) {
+            tests.status.status = tests.status.ERROR;
+            tests.status.message = e.message;
+        }
+    });
+
+    test_environment.on_tests_ready();
+
+})();
+// vim: set expandtab shiftwidth=4 tabstop=4:
diff --git a/common/tct-canvas-html5-tests/resources/testharnessreport.js b/common/tct-canvas-html5-tests/resources/testharnessreport.js
new file mode 100644 (file)
index 0000000..d7df7e2
--- /dev/null
@@ -0,0 +1,397 @@
+/*global add_completion_callback, setup */
+/*
+ * This file is intended for vendors to implement
+ * code needed to integrate testharness.js tests with their own test systems.
+ *
+ * The default implementation extracts metadata from the tests and validates
+ * it against the cached version that should be present in the test source
+ * file. If the cache is not found or is out of sync, source code suitable for
+ * caching the metadata is optionally generated.
+ *
+ * The cached metadata is present for extraction by test processing tools that
+ * are unable to execute javascript.
+ *
+ * Metadata is attached to tests via the properties parameter in the test
+ * constructor. See testharness.js for details.
+ *
+ * Typically test system integration will attach callbacks when each test has
+ * run, using add_result_callback(callback(test)), or when the whole test file
+ * has completed, using
+ * add_completion_callback(callback(tests, harness_status)).
+ *
+ * For more documentation about the callback functions and the
+ * parameters they are called with see testharness.js
+ */
+
+
+
+var metadata_generator = {
+
+    currentMetadata: {},
+    cachedMetadata: false,
+    metadataProperties: ['help', 'assert', 'author'],
+
+    error: function(message) {
+        var messageElement = document.createElement('p');
+        messageElement.setAttribute('class', 'error');
+        this.appendText(messageElement, message);
+
+        var summary = document.getElementById('summary');
+        if (summary) {
+            summary.parentNode.insertBefore(messageElement, summary);
+        }
+        else {
+            document.body.appendChild(messageElement);
+        }
+    },
+
+    /**
+     * Ensure property value has contact information
+     */
+    validateContact: function(test, propertyName) {
+        var result = true;
+        var value = test.properties[propertyName];
+        var values = Array.isArray(value) ? value : [value];
+        for (var index = 0; index < values.length; index++) {
+            value = values[index];
+            var re = /(\S+)(\s*)<(.*)>(.*)/;
+            if (! re.test(value)) {
+                re = /(\S+)(\s+)(http[s]?:\/\/)(.*)/;
+                if (! re.test(value)) {
+                    this.error('Metadata property "' + propertyName +
+                        '" for test: "' + test.name +
+                        '" must have name and contact information ' +
+                        '("name <email>" or "name http(s)://")');
+                    result = false;
+                }
+            }
+        }
+        return result;
+    },
+
+    /**
+     * Extract metadata from test object
+     */
+    extractFromTest: function(test) {
+        var testMetadata = {};
+        // filter out metadata from other properties in test
+        for (var metaIndex = 0; metaIndex < this.metadataProperties.length;
+             metaIndex++) {
+            var meta = this.metadataProperties[metaIndex];
+            if (test.properties.hasOwnProperty(meta)) {
+                if ('author' == meta) {
+                    this.validateContact(test, meta);
+                }
+                testMetadata[meta] = test.properties[meta];
+            }
+        }
+        return testMetadata;
+    },
+
+    /**
+     * Compare cached metadata to extracted metadata
+     */
+    validateCache: function() {
+        for (var testName in this.currentMetadata) {
+            if (! this.cachedMetadata.hasOwnProperty(testName)) {
+                return false;
+            }
+            var testMetadata = this.currentMetadata[testName];
+            var cachedTestMetadata = this.cachedMetadata[testName];
+            delete this.cachedMetadata[testName];
+
+            for (var metaIndex = 0; metaIndex < this.metadataProperties.length;
+                 metaIndex++) {
+                var meta = this.metadataProperties[metaIndex];
+                if (cachedTestMetadata.hasOwnProperty(meta) &&
+                    testMetadata.hasOwnProperty(meta)) {
+                    if (Array.isArray(cachedTestMetadata[meta])) {
+                      if (! Array.isArray(testMetadata[meta])) {
+                          return false;
+                      }
+                      if (cachedTestMetadata[meta].length ==
+                          testMetadata[meta].length) {
+                          for (var index = 0;
+                               index < cachedTestMetadata[meta].length;
+                               index++) {
+                              if (cachedTestMetadata[meta][index] !=
+                                  testMetadata[meta][index]) {
+                                  return false;
+                              }
+                          }
+                      }
+                      else {
+                          return false;
+                      }
+                    }
+                    else {
+                      if (Array.isArray(testMetadata[meta])) {
+                        return false;
+                      }
+                      if (cachedTestMetadata[meta] != testMetadata[meta]) {
+                        return false;
+                      }
+                    }
+                }
+                else if (cachedTestMetadata.hasOwnProperty(meta) ||
+                         testMetadata.hasOwnProperty(meta)) {
+                    return false;
+                }
+            }
+        }
+        for (var testName in this.cachedMetadata) {
+            return false;
+        }
+        return true;
+    },
+
+    appendText: function(elemement, text) {
+        elemement.appendChild(document.createTextNode(text));
+    },
+
+    jsonifyArray: function(arrayValue, indent) {
+        var output = '[';
+
+        if (1 == arrayValue.length) {
+            output += JSON.stringify(arrayValue[0]);
+        }
+        else {
+            for (var index = 0; index < arrayValue.length; index++) {
+                if (0 < index) {
+                    output += ',\n  ' + indent;
+                }
+                output += JSON.stringify(arrayValue[index]);
+            }
+        }
+        output += ']';
+        return output;
+    },
+
+    jsonifyObject: function(objectValue, indent) {
+        var output = '{';
+        var value;
+
+        var count = 0;
+        for (var property in objectValue) {
+            ++count;
+            if (Array.isArray(objectValue[property]) ||
+                ('object' == typeof(value))) {
+                ++count;
+            }
+        }
+        if (1 == count) {
+            for (var property in objectValue) {
+                output += ' "' + property + '": ' +
+                    JSON.stringify(objectValue[property]) +
+                    ' ';
+            }
+        }
+        else {
+            var first = true;
+            for (var property in objectValue) {
+                if (! first) {
+                    output += ',';
+                }
+                first = false;
+                output += '\n  ' + indent + '"' + property + '": ';
+                value = objectValue[property];
+                if (Array.isArray(value)) {
+                    output += this.jsonifyArray(value, indent +
+                        '                '.substr(0, 5 + property.length));
+                }
+                else if ('object' == typeof(value)) {
+                    output += this.jsonifyObject(value, indent + '  ');
+                }
+                else {
+                    output += JSON.stringify(value);
+                }
+            }
+            if (1 < output.length) {
+                output += '\n' + indent;
+            }
+        }
+        output += '}';
+        return output;
+    },
+
+    /**
+     * Generate javascript source code for captured metadata
+     * Metadata is in pretty-printed JSON format
+     */
+    generateSource: function() {
+        var source =
+            '<script id="metadata_cache">/*\n' +
+            this.jsonifyObject(this.currentMetadata, '') + '\n' +
+            '*/</script>\n';
+        return source;
+    },
+
+    /**
+     * Add element containing metadata source code
+     */
+    addSourceElement: function(event) {
+        var sourceWrapper = document.createElement('div');
+        sourceWrapper.setAttribute('id', 'metadata_source');
+
+        var instructions = document.createElement('p');
+        if (this.cachedMetadata) {
+            this.appendText(instructions,
+                'Replace the existing <script id="metadata_cache"> element ' +
+                'in the test\'s <head> with the following:');
+        }
+        else {
+            this.appendText(instructions,
+                'Copy the following into the <head> element of the test ' +
+                'or the test\'s metadata sidecar file:');
+        }
+        sourceWrapper.appendChild(instructions);
+
+        var sourceElement = document.createElement('pre');
+        this.appendText(sourceElement, this.generateSource());
+
+        sourceWrapper.appendChild(sourceElement);
+
+        var messageElement = document.getElementById('metadata_issue');
+        messageElement.parentNode.insertBefore(sourceWrapper,
+                                               messageElement.nextSibling);
+        messageElement.parentNode.removeChild(messageElement);
+
+        (event.preventDefault) ? event.preventDefault() :
+                                 event.returnValue = false;
+    },
+
+    /**
+     * Extract the metadata cache from the cache element if present
+     */
+    getCachedMetadata: function() {
+        var cacheElement = document.getElementById('metadata_cache');
+
+        if (cacheElement) {
+            var cacheText = cacheElement.firstChild.nodeValue;
+            var openBrace = cacheText.indexOf('{');
+            var closeBrace = cacheText.lastIndexOf('}');
+            if ((-1 < openBrace) && (-1 < closeBrace)) {
+                cacheText = cacheText.slice(openBrace, closeBrace + 1);
+                try {
+                    this.cachedMetadata = JSON.parse(cacheText);
+                }
+                catch (exc) {
+                    this.cachedMetadata = 'Invalid JSON in Cached metadata. ';
+                }
+            }
+            else {
+                this.cachedMetadata = 'Metadata not found in cache element. ';
+            }
+        }
+    },
+
+    /**
+     * Main entry point, extract metadata from tests, compare to cached version
+     * if present.
+     * If cache not present or differs from extrated metadata, generate an error
+     */
+    process: function(tests) {
+        for (var index = 0; index < tests.length; index++) {
+            var test = tests[index];
+            if (this.currentMetadata.hasOwnProperty(test.name)) {
+                this.error('Duplicate test name: ' + test.name);
+            }
+            else {
+                this.currentMetadata[test.name] = this.extractFromTest(test);
+            }
+        }
+
+        this.getCachedMetadata();
+
+        var message = null;
+        var messageClass = 'warning';
+        var showSource = false;
+
+        if (0 === tests.length) {
+            if (this.cachedMetadata) {
+                message = 'Cached metadata present but no tests. ';
+            }
+        }
+        else if (1 === tests.length) {
+            if (this.cachedMetadata) {
+                message = 'Single test files should not have cached metadata. ';
+            }
+            else {
+                var testMetadata = this.currentMetadata[tests[0].name];
+                for (var meta in testMetadata) {
+                    if (testMetadata.hasOwnProperty(meta)) {
+                        message = 'Single tests should not have metadata. ' +
+                                  'Move metadata to <head>. ';
+                        break;
+                    }
+                }
+            }
+        }
+        else {
+            if (this.cachedMetadata) {
+                messageClass = 'error';
+                if ('string' == typeof(this.cachedMetadata)) {
+                    message = this.cachedMetadata;
+                    showSource = true;
+                }
+                else if (! this.validateCache()) {
+                    message = 'Cached metadata out of sync. ';
+                    showSource = true;
+                }
+            }
+        }
+
+        if (message) {
+            var messageElement = document.createElement('p');
+            messageElement.setAttribute('id', 'metadata_issue');
+            messageElement.setAttribute('class', messageClass);
+            this.appendText(messageElement, message);
+
+            if (showSource) {
+                var link = document.createElement('a');
+                this.appendText(link, 'Click for source code.');
+                link.setAttribute('href', '#');
+                link.setAttribute('onclick',
+                                  'metadata_generator.addSourceElement(event)');
+                messageElement.appendChild(link);
+            }
+
+            var summary = document.getElementById('summary');
+            if (summary) {
+                summary.parentNode.insertBefore(messageElement, summary);
+            }
+            else {
+                var log = document.getElementById('log');
+                if (log) {
+                    log.appendChild(messageElement);
+                }
+            }
+        }
+    },
+
+    setup: function() {
+        add_completion_callback(
+            function (tests, harness_status) {
+                metadata_generator.process(tests, harness_status);
+            });
+    }
+};
+
+metadata_generator.setup();
+
+/* If the parent window has a testharness_properties object,
+ * we use this to provide the test settings. This is used by the
+ * default in-browser runner to configure the timeout and the
+ * rendering of results
+ */
+try {
+    if (window.opener && "testharness_properties" in window.opener) {
+        /* If we pass the testharness_properties object as-is here without
+         * JSON stringifying and reparsing it, IE fails & emits the message
+         * "Could not complete the operation due to error 80700019".
+         */
+        setup(JSON.parse(JSON.stringify(window.opener.testharness_properties)));
+    }
+} catch (e) {
+}
+// vim: set expandtab shiftwidth=4 tabstop=4:
diff --git a/common/tct-canvas-html5-tests/suite.json b/common/tct-canvas-html5-tests/suite.json
new file mode 100644 (file)
index 0000000..56fad04
--- /dev/null
@@ -0,0 +1,60 @@
+{
+    "pkg-blacklist": [
+        "config.xml",
+        "config.xml.*",
+        "pack.py",
+        "testcase.xsl",
+        "testresult.xsl",
+        "tests.css",
+        "icon.png",
+        "manifest.json",
+        "suite.json",
+        "*-py",
+        "inst.*"
+    ],
+    "pkg-list": {
+        "apk,cordova": {
+            "blacklist": [
+                "*"
+            ],
+            "copylist": {
+                "inst.apk.py": "inst.py",
+                "tests.full.xml": "tests.full.xml",
+                "tests.xml": "tests.xml"
+            },
+            "pkg-app": {\r
+                "sign-flag": "true"\r
+            }
+        },
+        "apk-aio, cordova-aio": {
+            "blacklist": []
+        },
+        "wgt": {
+            "blacklist": [
+                "*"
+            ],
+            "copylist": {
+                "inst.wgt.py": "inst.py",
+                "tests.full.xml": "tests.full.xml",
+                "tests.xml": "tests.xml"
+            },
+            "pkg-app": {\r
+                "sign-flag": "true"\r
+            }
+        },
+        "xpk": {
+            "blacklist": [],
+            "copylist": {
+                "inst.xpk.py": "inst.py",
+                "tests.full.xml": "tests.full.xml",
+                "tests.xml": "tests.xml"
+            },
+            "pkg-app": {
+                "blacklist": [],
+                "sign-flag": "true",
+                "hosted-app": "true"
+            }
+        }
+    },
+    "pkg-name": "tct-canvas-html5-tests"
+}
diff --git a/common/tct-canvas-html5-tests/testcase.xsl b/common/tct-canvas-html5-tests/testcase.xsl
new file mode 100644 (file)
index 0000000..fb32685
--- /dev/null
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+  <xsl:template match="/">
+    <html>
+      <STYLE type="text/css">
+        @import "tests.css";
+      </STYLE>
+      <head>
+        <script type="text/javascript" src="jquery.min.js"/>
+      </head>
+      <body>
+        <div id="testcasepage">
+          <div id="title">
+            <table>
+              <tr>
+                <td>
+                  <h1>Test Cases</h1>
+                </td>
+              </tr>
+            </table>
+          </div>
+          <div id="suites">
+            <a name="contents"/>
+            <table>
+              <tr>
+                <th>Test Suite</th>
+                <th>Total</th>
+                <th>Auto</th>
+                <th>Manual</th>
+              </tr>
+              <tr>
+                <td>
+                  Total
+                </td>
+                <td>
+                  <xsl:value-of select="count(test_definition/suite/set//testcase)"/>
+                </td>
+                <td>
+                  <xsl:value-of select="count(test_definition/suite/set//testcase[@execution_type = 'auto'])"/>
+                </td>
+                <td>
+                  <xsl:value-of select="count(test_definition/suite/set//testcase[@execution_type != 'auto'])"/>
+                </td>
+              </tr>
+              <xsl:for-each select="test_definition/suite">
+                <tr>
+                  <td>
+                    <a>
+                      <xsl:attribute name="href">
+                        #<xsl:value-of select="@name"/>
+                      </xsl:attribute>
+                      <xsl:value-of select="@name"/>
+                    </a>
+                  </td>
+                  <td>
+                    <xsl:value-of select="count(set//testcase)"/>
+                  </td>
+                  <td>
+                    <xsl:value-of select="count(set/testcase[@execution_type = 'auto'])"/>
+                  </td>
+                  <td>
+                    <xsl:value-of select="count(set/testcase[@execution_type != 'auto'])"/>
+                  </td>
+                </tr>
+              </xsl:for-each>
+            </table>
+          </div>
+          <div id="title">
+            <table>
+              <tr>
+                <td class="title">
+                  <h1>Detailed Test Cases</h1>
+                </td>
+              </tr>
+            </table>
+          </div>
+          <div id="cases">
+            <xsl:for-each select="test_definition/suite">
+              <xsl:sort select="@name"/>
+              <div id="btc">
+                <a href="#contents">Back to Contents</a>
+              </div>
+              <div id="suite_title">
+                Test Suite:
+                <xsl:value-of select="@name"/>
+                <a><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></a>
+              </div>
+              <table>
+                <tr>
+                  <th>Case_ID</th>
+                  <th>Purpose</th>
+                  <th>Type</th>
+                  <th>Component</th>
+                  <th>Execution Type</th>
+                  <th>Description</th>
+                  <th>Specification</th>
+                </tr>
+                <xsl:for-each select=".//set">
+                  <xsl:sort select="@name"/>
+                  <tr>
+                    <td colspan="7">
+                      Test Set:
+                      <xsl:value-of select="@name"/>
+                    </td>
+                  </tr>
+                  <xsl:for-each select=".//testcase">
+                    <!-- xsl:sort select="@id" /> -->
+                    <tr>
+                      <td>
+                        <xsl:value-of select="@id"/>
+                      </td>
+                      <td>
+                        <xsl:value-of select="@purpose"/>
+                      </td>
+                      <td>
+                        <xsl:value-of select="@type"/>
+                      </td>
+                      <td>
+                        <xsl:value-of select="@component"/>
+                      </td>
+                      <td>
+                        <xsl:value-of select="@execution_type"/>
+                      </td>
+                      <td>
+                        <p>
+                          Pre_condition:
+                          <xsl:value-of select=".//description/pre_condition"/>
+                        </p>
+                        <p>
+                          Post_condition:
+                          <xsl:value-of select=".//description/post_condition"/>
+                        </p>
+                        <p>
+                          Test Script Entry:
+                          <xsl:value-of select=".//description/test_script_entry"/>
+                        </p>
+                        <p>
+                          Steps:
+                          <p/>
+                          <xsl:for-each select=".//description/steps/step"><xsl:sort select="@order"/>
+                            Step
+                            <xsl:value-of select="@order"/>
+                            :
+                            <xsl:value-of select="./step_desc"/>
+                            ;
+                            <p/>
+                            Expected Result:
+                            <xsl:value-of select="./expected"/>
+                            <p/>
+                          </xsl:for-each>
+                        </p>
+                      </td>
+                      <td>
+                        <xsl:for-each select=".//specs/spec"><b>[Spec_Assertion]:</b><br/>
+                          [Category]:
+                          <xsl:value-of select="./spec_assertion/@category"/>
+                          <br/>
+                          [Section]:
+                          <xsl:value-of select="./spec_assertion/@section"/>
+                          <br/>
+                          [Specification]:
+                          <xsl:value-of select="./spec_assertion/@specification"/>
+                          <br/>
+                          [Interface]:
+                          <xsl:value-of select="./spec_assertion/@interface"/>
+                          <br/>
+                          <xsl:choose><xsl:when test="./spec_assertion/@element_name">
+                              [<xsl:value-of select="./spec_assertion/@element_type"/>]:
+                              <xsl:value-of select="./spec_assertion/@element_name"/>
+                              <br/>
+                            </xsl:when></xsl:choose>
+                          [URL]:
+                          <xsl:value-of select="./spec_url"/>
+                          <br/>
+                          [Statement]:
+                          <xsl:value-of select="./spec_statement"/>
+                          <br/>
+                        </xsl:for-each>
+                      </td>
+                    </tr>
+                  </xsl:for-each>
+                </xsl:for-each>
+              </table>
+            </xsl:for-each>
+          </div>
+        </div>
+        <div id="goTopBtn">
+          <img border="0" src="./back_top.png"/>
+        </div>
+        <script type="text/javascript" src="application.js"/>
+        <script language="javascript" type="text/javascript">
+          $(document).ready(function(){
+            goTopEx();
+          });
+        </script>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/common/tct-canvas-html5-tests/testresult.xsl b/common/tct-canvas-html5-tests/testresult.xsl
new file mode 100644 (file)
index 0000000..c5199c0
--- /dev/null
@@ -0,0 +1,491 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+  <xsl:template match="/">
+    <html>
+      <STYLE type="text/css">
+        @import "tests.css";
+      </STYLE>
+      <head>
+        <script type="text/javascript" src="jquery.min.js"/>
+      </head>
+      <body>
+        <div id="testcasepage">
+          <div id="title">
+            <table>
+              <tr>
+                <td>
+                  <h1>Test Report</h1>
+                </td>
+              </tr>
+            </table>
+          </div>
+          <div id="device">
+            <table>
+              <tr>
+                <th colspan="2">Device Information</th>
+              </tr>
+              <tr>
+                <td>Device Name</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@device_name">
+                      <xsl:if test="test_definition/environment/@device_name = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@device_name"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>Device Model</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@device_model">
+                      <xsl:if test="test_definition/environment/@device_model = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@device_model"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>OS Version</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@os_version">
+                      <xsl:if test="test_definition/environment/@os_version = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@os_version"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>Device ID</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@device_id">
+                      <xsl:if test="test_definition/environment/@device_id = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@device_id"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>Firmware Version</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@firmware_version">
+                      <xsl:if test="test_definition/environment/@firmware_version = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@firmware_version"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>Build ID</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@build_id">
+                      <xsl:if test="test_definition/environment/@build_id = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@build_id"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>Screen Size</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@screen_size">
+                      <xsl:if test="test_definition/environment/@screen_size = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@screen_size"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>Resolution</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@resolution">
+                      <xsl:if test="test_definition/environment/@resolution = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@resolution"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>Host Info</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@host">
+                      <xsl:if test="test_definition/environment/@host = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@host"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>CTS Version</td>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="test_definition/environment/@cts_version">
+                      <xsl:if test="test_definition/environment/@cts_version = ''">
+                        N/A
+                      </xsl:if>
+                      <xsl:value-of select="test_definition/environment/@cts_version"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      N/A
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+              </tr>
+              <tr>
+                <td>Others</td>
+                <td>
+                  <xsl:if test="test_definition/environment/other = ''">
+                    N/A
+                  </xsl:if>
+                  <xsl:call-template name="br-replace">
+                    <xsl:with-param name="word" select="test_definition/environment/other"/>
+                  </xsl:call-template>
+                </td>
+              </tr>
+            </table>
+          </div>
+          <div id="summary">
+            <table>
+              <tr>
+                <th colspan="2">Test Summary</th>
+              </tr>
+              <tr>
+                <td>Test Plan Name</td>
+                <td>
+                  <xsl:value-of select="test_definition/summary/@test_plan_name"/>
+                </td>
+              </tr>
+              <tr>
+                <td>Tests Total</td>
+                <td>
+                  <xsl:value-of select="count(test_definition//suite/set/testcase)"/>
+                </td>
+              </tr>
+              <tr>
+                <td>Test Passed</td>
+                <td>
+                  <xsl:value-of select="count(test_definition//suite/set/testcase[@result = 'PASS'])"/>
+                </td>
+              </tr>
+              <tr>
+                <td>Test Failed</td>
+                <td>
+                  <xsl:value-of select="count(test_definition//suite/set/testcase[@result = 'FAIL'])"/>
+                </td>
+              </tr>
+              <tr>
+                <td>Test Block</td>
+                <td>
+                  <xsl:value-of select="count(test_definition//suite/set/testcase[@result = 'BLOCK'])"/>
+                </td>
+              </tr>
+              <tr>
+                <td>Test Not Run</td>
+                <td>
+                  <xsl:value-of select="count(test_definition//suite/set/testcase) - count(test_definition//suite/set/testcase[@result = 'PASS']) - count(test_definition//suite/set/testcase[@result = 'FAIL']) - count(test_definition//suite/set/testcase[@result = 'BLOCK'])"/>
+                </td>
+              </tr>
+              <tr>
+                <td>Start time</td>
+                <td>
+                  <xsl:value-of select="test_definition/summary/start_at"/>
+                </td>
+              </tr>
+              <tr>
+                <td>End time</td>
+                <td>
+                  <xsl:value-of select="test_definition/summary/end_at"/>
+                </td>
+              </tr>
+            </table>
+          </div>
+          <div id="suite_summary">
+            <div id="title">
+              <a name="contents"/>
+              <table>
+                <tr>
+                  <td class="title">
+                    <h1>Test Summary by Suite</h1>
+                  </td>
+                </tr>
+              </table>
+            </div>
+            <table>
+              <tr>
+                <th>Suite</th>
+                <th>Passed</th>
+                <th>Failed</th>
+                <th>Blocked</th>
+                <th>Not Run</th>
+                <th>Total</th>
+              </tr>
+              <xsl:for-each select="test_definition/suite">
+                <xsl:sort select="@name"/>
+                <tr>
+                  <td>
+                    <a>
+                      <xsl:attribute name="href">
+                        #<xsl:value-of select="@name"/>
+                      </xsl:attribute>
+                      <xsl:value-of select="@name"/>
+                    </a>
+                  </td>
+                  <td>
+                    <xsl:value-of select="count(set//testcase[@result = 'PASS'])"/>
+                  </td>
+                  <td>
+                    <xsl:value-of select="count(set//testcase[@result = 'FAIL'])"/>
+                  </td>
+                  <td>
+                    <xsl:value-of select="count(set//testcase[@result = 'BLOCK'])"/>
+                  </td>
+                  <td>
+                    <xsl:value-of select="count(set//testcase) - count(set//testcase[@result = 'PASS']) - count(set//testcase[@result = 'FAIL']) - count(set//testcase[@result = 'BLOCK'])"/>
+                  </td>
+                  <td>
+                    <xsl:value-of select="count(set//testcase)"/>
+                  </td>
+                </tr>
+              </xsl:for-each>
+            </table>
+          </div>
+          <div id="fail_cases">
+            <div id="title">
+              <table>
+                <tr>
+                  <td class="title">
+                    <h1 align="center">
+                      Test Failures (
+                        <xsl:value-of select="count(test_definition/suite/set//testcase[@result = 'FAIL'])"/>
+                      )
+                    </h1>
+                  </td>
+                </tr>
+              </table>
+            </div>
+            <xsl:for-each select="test_definition/suite">
+              <xsl:sort select="@name"/>
+              <div id="btc">
+                <a href="#contents">Back to Contents</a>
+              </div>
+              <div id="suite_title">
+                Test Suite:
+                <xsl:value-of select="@name"/>
+                <a><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></a>
+              </div>
+              <table>
+                <tr>
+                  <th>Case_ID</th>
+                  <th>Purpose</th>
+                  <th>Result</th>
+                  <th>Stdout</th>
+                </tr>
+                <xsl:for-each select=".//set">
+                  <xsl:sort select="@name"/>
+                  <tr>
+                    <td colspan="4">
+                      Test Set:
+                      <xsl:value-of select="@name"/>
+                    </td>
+                  </tr>
+                  <xsl:for-each select=".//testcase">
+                    <xsl:sort select="@id"/>
+                    <xsl:choose>
+                      <xsl:when test="@result">
+                        <xsl:if test="@result = 'FAIL'">
+                          <tr>
+                            <td>
+                              <xsl:value-of select="@id"/>
+                            </td>
+                            <td>
+                              <xsl:value-of select="@purpose"/>
+                            </td>
+                            <td class="red_rate">
+                              <xsl:value-of select="@result"/>
+                            </td>
+                            <td>
+                              <xsl:value-of select=".//result_info/stdout"/>
+                              <xsl:if test=".//result_info/stdout = ''">
+                                N/A
+                              </xsl:if>
+                            </td>
+                          </tr>
+                        </xsl:if>
+                      </xsl:when>
+                    </xsl:choose>
+                  </xsl:for-each>
+                </xsl:for-each>
+              </table>
+            </xsl:for-each>
+          </div>
+          <div id="cases">
+            <div id="title">
+              <table>
+                <tr>
+                  <td class="title">
+                    <h1 align="center">Detailed Test Results</h1>
+                  </td>
+                </tr>
+              </table>
+            </div>
+            <xsl:for-each select="test_definition/suite">
+              <xsl:sort select="@name"/>
+              <div id="btc">
+                <a href="#contents">Back to Contents</a>
+              </div>
+              <div id="suite_title">
+                Test Suite:
+                <xsl:value-of select="@name"/>
+                <a><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></a>
+              </div>
+              <table>
+                <tr>
+                  <th>Case_ID</th>
+                  <th>Purpose</th>
+                  <th>Result</th>
+                  <th>Stdout</th>
+                </tr>
+                <xsl:for-each select=".//set">
+                  <xsl:sort select="@name"/>
+                  <tr>
+                    <td colspan="4">
+                      Test Set:
+                      <xsl:value-of select="@name"/>
+                    </td>
+                  </tr>
+                  <xsl:for-each select=".//testcase">
+                    <xsl:sort select="@id"/>
+                    <tr>
+                      <td>
+                        <xsl:value-of select="@id"/>
+                      </td>
+                      <td>
+                        <xsl:value-of select="@purpose"/>
+                      </td>
+                      <xsl:choose>
+                        <xsl:when test="@result">
+                          <xsl:if test="@result = 'FAIL'">
+                            <td class="red_rate">
+                              <xsl:value-of select="@result"/>
+                            </td>
+                          </xsl:if>
+                          <xsl:if test="@result = 'PASS'">
+                            <td class="green_rate">
+                              <xsl:value-of select="@result"/>
+                            </td>
+                          </xsl:if>
+                          <xsl:if test="@result = 'BLOCK' ">
+                            <td>
+                              BLOCK
+                            </td>
+                          </xsl:if>
+                          <xsl:if test="@result != 'BLOCK' and @result != 'FAIL' and @result != 'PASS' ">
+                            <td>
+                              Not Run
+                            </td>
+                          </xsl:if>
+                        </xsl:when>
+                        <xsl:otherwise>
+                          <td>
+                          </td>
+                        </xsl:otherwise>
+                      </xsl:choose>
+                      <td>
+                        <xsl:value-of select=".//result_info/stdout"/>
+                        <xsl:if test=".//result_info/stdout = ''">
+                          N/A
+                        </xsl:if>
+                      </td>
+                    </tr>
+                  </xsl:for-each>
+                </xsl:for-each>
+              </table>
+            </xsl:for-each>
+          </div>
+        </div>
+        <div id="goTopBtn">
+          <img border="0" src="./back_top.png"/>
+        </div>
+        <script type="text/javascript" src="application.js"/>
+        <script language="javascript" type="text/javascript">
+          $(document).ready(function(){
+            goTopEx();
+          });
+        </script>
+      </body>
+    </html>
+  </xsl:template>
+  <xsl:template name="br-replace">
+    <xsl:param name="word"/>
+    <xsl:variable name="cr">
+      <xsl:text>
+      </xsl:text>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="contains($word,$cr)">
+        <xsl:value-of select="substring-before($word,$cr)"/>
+        <br/>
+        <xsl:call-template name="br-replace">
+          <xsl:with-param name="word" select="substring-after($word,$cr)"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$word"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/common/tct-canvas-html5-tests/tests.css b/common/tct-canvas-html5-tests/tests.css
new file mode 100644 (file)
index 0000000..c2ba69b
--- /dev/null
@@ -0,0 +1,132 @@
+@charset "UTF-8";\r
+/* CSS Document */\r
+#testcasepage div,\r
+#testcasepage h1,\r
+#testcasepage p,\r
+#testcasepage table,\r
+#testcasepage tr,\r
+#testcasepage th,\r
+#testcasepage td {\r
+  margin: 0;\r
+  padding: 0;\r
+  border: 0;\r
+  font-weight: inherit;\r
+  font-style: inherit;\r
+  font-size: 0.96em;\r
+  font-family: arial;\r
+  vertical-align: baseline;\r
+}\r
+\r
+#testcasepage p {\r
+  text-align: left;\r
+}\r
+\r
+#suite_title {\r
+  text-align: left;\r
+}\r
+\r
+#btc {\r
+  text-align: right;\r
+}\r
+\r
+#testcasepage table {\r
+  border-collapse: separate;\r
+  border-spacing: 0;\r
+  margin-bottom: 1.4em;\r
+  vertical-align: middle;\r
+}\r
+\r
+#testcasepage th,\r
+#testcasepage td {\r
+  text-align: left;\r
+  font-weight: normal;\r
+  padding: 4px 10px 4px 5px;\r
+  vertical-align: middle;\r
+}\r
+\r
+#cases table {\r
+  width: 101%;\r
+}\r
+\r
+#fail_cases table {\r
+  width: 101%;\r
+}\r
+\r
+#title table {\r
+  width: 101%;\r
+}\r
+\r
+#device table {\r
+  width: 50%;\r
+}\r
+\r
+#summary table {\r
+  width: 50%;\r
+}\r
+\r
+#testcasepage th {\r
+  border-bottom: 1px solid #000;\r
+  background-color: #AAAAAA;\r
+  border-left: 1px solid #000;\r
+  border-top: 1px solid #000;\r
+  color: #000;\r
+  font-weight: bold;\r
+  vertical-align: bottom;\r
+}\r
+\r
+#testcasepage th:last-child,\r
+#testcasepage td:last-child {\r
+  border-right: 1px solid #000;\r
+}\r
+\r
+#testcasepage td {\r
+  border-left: 1px solid;\r
+  font-weight: normal;\r
+  border-bottom: 1px solid;\r
+}\r
+\r
+#testcasepage td.yellow_rate {\r
+  background-color: #ffcc00;\r
+}\r
+\r
+#testcasepage td.green_rate {\r
+  background-color: #33cc33;\r
+}\r
+\r
+#testcasepage td.dgreen_rate {\r
+  background-color: #339933;\r
+}\r
+\r
+#testcasepage td.red_rate {\r
+  background-color: #FF3333;\r
+}\r
+\r
+#title table,\r
+#title tr,\r
+#title td {\r
+  border-left: none;\r
+  border-bottom: none;\r
+  text-align: center;\r
+}\r
+\r
+#title td:last-child {\r
+  border-right: none;\r
+}\r
+\r
+#testcasepage h1 {\r
+  font-size: 2em;\r
+  font-family: Arial, sans-serif;\r
+  font-weight: bold;\r
+  line-height: 1;\r
+  color: #000;\r
+  margin-bottom: 0.75em;\r
+  padding-top: 0.25em;\r
+  font-weight: bold;\r
+}\r
+\r
+#goTopBtn {\r
+  right: 0px;\r
+  bottom: 0px;\r
+  position: fixed; +position: absolute;\r
+  top: expression(parseInt(document.body.scrollTop) + document.body.clientHeight - 40);\r
+}\r
diff --git a/common/tct-canvas-html5-tests/tests.full.xml b/common/tct-canvas-html5-tests/tests.full.xml
new file mode 100644 (file)
index 0000000..9cf50da
--- /dev/null
@@ -0,0 +1,11247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl"  href="./testcase.xsl"?>
+<test_definition>
+  <suite name="tct-canvas-html5-tests" category="W3C/HTML5 APIs">
+    <set name="Canvas1" type="js">
+      <testcase purpose="Check if ellipse() correctly draws the ellipse." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasPathMethods_ellipse">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasPathMethods" element_type="method" element_name="ellipse" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method ellipse() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasPathMethods_ellipse_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasPathMethods" element_type="method" element_name="ellipse" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ellipse() method throws exception when argument is missing." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasPathMethods_ellipse_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasPathMethods" element_type="method" element_name="ellipse" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ellipse() correctly draws the ellipse with anticlockwise." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasPathMethods_ellipse_with_anticlockwise">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_with_anticlockwise.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasPathMethods" element_type="method" element_name="ellipse" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <!--      <testcase purpose="Check if addHitRegion() correctly adds hit region." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_addHitRegion">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="addHitRegion" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method addHitRegion() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_addHitRegion_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="addHitRegion" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if addHitRegion() method throws exception when argument is missing." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasRenderingContext2D_addHitRegion_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="addHitRegion" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearHitRegions() correctly clears hit region." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_clearHitRegions">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="clearHitRegions" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method clearHitRegions() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_clearHitRegions_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="clearHitRegions" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check using clearHitRegions() with extra argument." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_clearHitRegions_extra_argument">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_extra_argument.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="clearHitRegions" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if createImageData() correctly creates image data." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_createImageData">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="createImageData" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method createImageData() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_createImageData_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="createImageData" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData() method throws exception when argument is missing." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasRenderingContext2D_createImageData_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="createImageData" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <!--      <testcase purpose="Check if attribute currentTransform of CanvasRenderingContext2D exists, has type object." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_currentTransform_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_currentTransform_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="attribute" element_name="currentTransform" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute direction of CanvasRenderingContext2D exists, has type string." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_direction_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_direction_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="attribute" element_name="direction" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute filter of CanvasRenderingContext2D exists, has type string." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_filter_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_filter_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="attribute" element_name="filter" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if getContextAttributes() correctly gets context attributes." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_getContextAttributes">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="getContextAttributes" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method getContextAttributes() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_getContextAttributes_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="getContextAttributes" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check using getContextAttributes() with extra argument." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_getContextAttributes_extra_argument">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_extra_argument.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="getContextAttributes" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute imageSmoothingEnabled of CanvasRenderingContext2D exists, has type boolean." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_imageSmoothingEnabled_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_imageSmoothingEnabled_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="attribute" element_name="imageSmoothingEnabled" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <!--      <testcase purpose="Check if isContextLost() method shows whether context is lost." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_isContextLost">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="isContextLost" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method isContextLost() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_isContextLost_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="isContextLost" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check using isContextLost() with extra argument." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_isContextLost_extra_argument">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_extra_argument.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="isContextLost" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if isPointInStroke() correctly returns whether point is in stroke." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_isPointInStroke">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="isPointInStroke" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method isPointInStroke() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_isPointInStroke_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="isPointInStroke" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInStroke() method throws exception when argument is missing." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasRenderingContext2D_isPointInStroke_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="isPointInStroke" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInStroke() correctly returns whether point is in stroke with path." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_isPointInStroke_with_path">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_with_path.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="isPointInStroke" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <!--      <testcase purpose="Check if clearHitRegions() correctly removes hit region." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_removeHitRegion">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="removeHitRegion" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method removeHitRegion() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_removeHitRegion_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="removeHitRegion" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if removeHitRegion() method throws exception when argument is missing." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasRenderingContext2D_removeHitRegion_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="removeHitRegion" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if resetTransform() correctly resets transform." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_resetTransform">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="resetTransform" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method resetTransform() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_resetTransform_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="resetTransform" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check using resetTransform() with extra argument." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_resetTransform_extra_argument">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_extra_argument.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="resetTransform" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <!--      <testcase purpose="Check if scrollPathIntoView() correctly scrolls path into view." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_scrollPathIntoView">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="scrollPathIntoView" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method scrollPathIntoView() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_scrollPathIntoView_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="scrollPathIntoView" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if scrollPathIntoView() correctly scrolls path into view with path." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_scrollPathIntoView_with_path">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_with_path.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="method" element_name="scrollPathIntoView" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if attribute webkitImageSmoothingEnabled of CanvasRenderingContext2D exists, has type boolean." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_webkitImageSmoothingEnabled_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_webkitImageSmoothingEnabled_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="CanvasRenderingContext2D" element_type="attribute" element_name="webkitImageSmoothingEnabled" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <!--      <testcase purpose="Check if toBlob() correctly callbacks a Blob object." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="HTMLCanvasElement_toBlob">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="HTMLCanvasElement" element_type="method" element_name="toBlob" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#the-canvas-element</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method toBlob() exists." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="HTMLCanvasElement_toBlob_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="HTMLCanvasElement" element_type="method" element_name="toBlob" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#the-canvas-element</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toBlob() method throws exception when argument is missing." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="HTMLCanvasElement_toBlob_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="HTMLCanvasElement" element_type="method" element_name="toBlob" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#the-canvas-element</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toBlob() correctly callbacks a Blob object with type." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="HTMLCanvasElement_toBlob_with_arguments">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_with_arguments.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="HTMLCanvasElement" element_type="method" element_name="toBlob" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#the-canvas-element</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute region of MouseEvent exists, has type string." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="MouseEvent_region_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/MouseEvent_region_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="MouseEvent" element_type="attribute" element_name="region" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#MouseEvent-partial</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute actualBoundingBoxAscent of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_actualBoundingBoxAscent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxAscent_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="actualBoundingBoxAscent" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute actualBoundingBoxDescent of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_actualBoundingBoxDescent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxDescent_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="actualBoundingBoxDescent" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute actualBoundingBoxLeft of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_actualBoundingBoxLeft_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxLeft_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="actualBoundingBoxLeft" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute actualBoundingBoxRight of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_actualBoundingBoxRight_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxRight_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="actualBoundingBoxRight" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute alphabeticBaseline of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_alphabeticBaseline_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_alphabeticBaseline_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="alphabeticBaseline" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute emHeightAscent of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_emHeightAscent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_emHeightAscent_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="emHeightAscent" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute emHeightDescent of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_emHeightDescent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_emHeightDescent_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="emHeightDescent" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute fontBoundingBoxAscent of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_fontBoundingBoxAscent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxAscent_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="fontBoundingBoxAscent" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute fontBoundingBoxDescent of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_fontBoundingBoxDescent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxDescent_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="fontBoundingBoxDescent" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute hangingBaseline of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_hangingBaseline_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_hangingBaseline_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="hangingBaseline" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if attribute ideographicBaseline of TextMetrics exists, has type double." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_ideographicBaseline_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_ideographicBaseline_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TextMetrics" element_type="attribute" element_name="ideographicBaseline" specification="Canvas" section="Graphics" category="Tizen Device API Specifications"/>
+            <spec_url>https://html.spec.whatwg.org/#textmetrics</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check the type of attribute and method in CanvasRenderingContext2D interface" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_attributes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_attributes.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the imagedata.data is readonly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="imagedata_data_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_data_readonly.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-data</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the imagedata.data's type" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="imagedata_data_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_data_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-data</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the imagedata.width is readonly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="imagedata_width_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_width_readonly.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="width" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-width</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the imagedata.width's type" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="imagedata_width_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_width_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="width" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-width</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the imagedata.height is readonly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="imagedata_height_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_height_readonly.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="height" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-height</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the imagedata.height's type" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="imagedata_height_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_height_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="height" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-imagedata-height</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the TextMetrics.width is readonly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="textmetrics_width_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/textmetrics_width_readonly.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="height" interface="TextMetrics" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-textmetrics-width-0</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvasgradient.addColorStop is exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="canvasgradient_addColorStop_exsit">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_exsit.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="addColorStop" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-canvasgradient-addcolorstop</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the color cannot be parsed as a CSS color value, then a SyntaxError exception must be thrown." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="canvasgradient_addColorStop_SYNTAX_ERR">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_SYNTAX_ERR.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-canvasgradient-addcolorstop</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createLinearGradient works normal" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_createLinearGradient_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-createLinearGradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createPattern works normal" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_createPattern_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_createPattern_basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-createPattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createRadialGradient works normal" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_createRadialGradient_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-createRadialGradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createRadialGradient return CanvasGradient" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_createRadialGradient_return_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_return_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-createRadialGradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowBlur default value is 0" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_shadowBlur_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="shadowBlur" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-shadowBlur</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowOffsetX default value is 0" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_shadowOffsetX_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetX" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-shadowOffsetX</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowOffsetY default value is 0" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_shadowOffsetY_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetY" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-shadowOffsetY</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowColor default value is black" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_shadowColor_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-shadowColor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.drawFocusIfNeeded with element object works normaly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="canvas2d_drawFocusIfNeeded_element">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_element.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawfocusifneeded" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-drawfocusifneeded</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.drawFocusIfNeeded existed" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="canvas2d_drawFocusIfNeeded_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawfocusifneeded" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-drawfocusifneeded</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.getlinedash works normaly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="canvas2d_getlinedash_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getlinedash" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-getlinedash</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.getlinedash existed" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="Canvas Test: canvas2d_getlinedash_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getlinedash" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-getlinedash</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineDashOffset exists" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="canvas2d_lineDashOffset_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineDashOffset" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-linedashoffset</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineDashOffset type is number" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_lineDashOffset_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineDashOffset" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-linedashoffset</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineDashOffset is writable" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_lineDashOffset_value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_value.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineDashOffset" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-linedashoffset</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.measureText works normaly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="canvas2d_measureText_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_measureText_basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="measureText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-measuretext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.setlinedash works normaly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="canvas2d_setlinedash_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="setlinedash" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-setlinedash</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.setlinedash existed" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="canvas2d_setlinedash_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="setlinedash" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-setlinedash</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if CanvasPattern exists" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="CanvasPattern_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/CanvasPattern_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="interface" element_name="CanvasPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#canvaspattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.getlinedash method return type is object" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="canvas2d_getlinedash_checktype">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_checktype.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="interface" element_name="CanvasPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-getlinedash</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.setlinedash method return type is undefined" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="canvas2d_setlinedash_checktype">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_checktype.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="interface" element_name="CanvasPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-setlinedash</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.textAlign default value is start" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="canvas2d_textAlign_defaultvalue">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_textAlign_defaultvalue.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="interface" element_name="CanvasPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.textBaseline default value is alphabetic" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="canvas2d_textBaseline_defaultvalue">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_defaultvalue.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="interface" element_name="CanvasPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2014/CR-2dcontext-20140821/#dom-context-2d-textbaseline</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(imgdata) exists and returns something" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="2d.imageData.create1.basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if HTMLCanvasElement is a property of window" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="type.exists">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.exists.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if transform() multiplies the CTM" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_transformation_transform_multiply">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.multiply.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="transform" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-transform</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check fillStyle with pattern of canvas works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_pattern_basic_canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.canvas.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill function works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_fill_closed_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fill" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with the rotate()-clockwise" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_transformation_rotate_direction">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.direction.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rotate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rotate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if can draw a image of canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_drawImage_canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.canvas.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Linear gradient coordinates are relative to the  coordinates pace at the time of filling" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_gradient_linear_transform_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_strokeRect_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if can add the given point to the current subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_bezierCurveTo_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="bezierCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beziercurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check beginPath() method works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_beginPath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.beginPath.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="beginPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beginpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if scale method works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_transformation_scale_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="scale" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-scale</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check strokes in opposite directions are union, not subtracted" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_stroke_union">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.union.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if rect function works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_rect_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if  fillRect function works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_fillRect_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillText method handles maxWidth based on line size, not bounding box size" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_text_draw_fill_maxWidth_bound">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.bound.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Radial gradient transformations do not experience broken caching effects" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_gradient_radial_3transform">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with measureText.width setted as basic values" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_text_measure_width_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="measureText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-measuretext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if whether isPointInPath() detects the point is inside the path or not" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_isPointInPath_1basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if closePath.newline works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_closePath_newline">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.newline.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="closePath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-closepath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if translate method works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_transformation_translate_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="translate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-translate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if quadraticCurveTo function works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_quadraticCurveTo_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="quadraticCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-quadraticcurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the default value of arc() when missing last argument is clockwise" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_arc_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clip() method creates a new clipping region " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_clip_basic_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearRect clears all pixels on the canvas in the given rectangle to transparent black" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_clearRect_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if image can be displayed correctly with basic setting of moveTo()" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_moveTo_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="moveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-moveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() affect the current bitmap" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_state_saverestore_bitmap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.bitmap.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check drawImage function with five arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_drawImage_5arg">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.5arg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setTransform() with multiple values can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_transformation_setTransform_multiple">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.multiple.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="setTransform" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-settransform</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check drawImage function  with nine arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_drawImage_9arg_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with image pattern works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_pattern_basic_image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.image.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo scales the curve, not just the control points" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_arcTo_scale">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.scale.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if image can be displayed correctly with basic setting of lineTo()" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_path_lineTo_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="lineTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-lineto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeText method does not start a new path or subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P0" id="2d_text_draw_stroke_unaffected">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.unaffected.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroketext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.arcTo exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_arcTo_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_arcTo_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.arc exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_arc_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_arc_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.beginPath exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_beginPath_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_beginPath_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="beginPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beginpath</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.bezierCurveTo exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_bezierCurveTo_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_bezierCurveTo_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="bezierCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beziercurveto</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.canvas exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_canvas_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_canvas_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.clearRect exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_clearRect_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_clearRect_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.clip exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_clip_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_clip_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.closePath exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_closePath_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_closePath_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="closePath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-closepath</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createLinearGradient exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_createLinearGradient_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.creatPattern exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_createPattern_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_createPattern_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createRadialGradient exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_createRadialGradient_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.drawImage exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_drawImage_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_drawImage_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.fillRect exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_fillRect_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_fillRect_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.FillStyle exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_fillStyle_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_fillStyle_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.fillText exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_fillText_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_fillText_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.fill exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_fill_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_fill_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fill" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.font exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_font_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_font_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.getImageData exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_getImageData_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_getImageData_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.globalAlpha exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_globalAlpha_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_globalAlpha_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalAlpha" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.globalCompositeOperation exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_globalCompositeOperation_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.isPointInPath exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_isPointInPath_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_isPointInPath_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineCap exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_lineCap_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineCap_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineJoin exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_lineJoin_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineJoin_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineTo exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_lineTo_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineTo_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="lineTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-lineto</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineWidth exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_lineWidth_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineWidth" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linewidth</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.measureText exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_measureText_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_measureText_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="measureText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-measuretext</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if prototype are not Writable and not Configurable, and its methods are Configurable" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.type.prototype">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.prototype.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arguments of context is missing" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="context.arguments.missing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.arguments.missing.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if probablySupportsContext and probablySupportsContext are not supported" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="historical">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/historical.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="This test uses drawFocusIfNeeded does nothing if the element is not in focus but comparing ImageData from before and after" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="drawFocusIfNeeded_002">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_002.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="This test uses drawFocusIfNeeded does nothing if the element is not a descendant but comparing ImageData from before and after" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="drawFocusIfNeeded_003">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_003.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="When the CanvasRenderingContext2D object is created, the attribute must be set to true." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="imagesmoothing_1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/imagesmoothing.html?total_num=3&amp;locator_key=id&amp;value=1</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="On getting the imageSmoothingEnabled attribute, the user agent must return the last value it was set to." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="imagesmoothing_2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/imagesmoothing.html?total_num=3&amp;locator_key=id&amp;value=2</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="On setting the imageSmoothingEnabled attribute, it must be set to the new value." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="imagesmoothing_3">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/imagesmoothing.html?total_num=3&amp;locator_key=id&amp;value=3</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas2" type="js">
+      <testcase purpose="Check if canvas2d.miterLimit exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_miterLimit_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_miterLimit_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="miterLimit" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-miterlimit</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.moveTo exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_moveTo_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_moveTo_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="moveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-moveto</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.putImageData exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_putImageData_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_putImageData_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.quadraticCurveTo exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_quadraticCurveTo_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_quadraticCurveTo_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="quadraticCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-quadraticcurveto</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.rect exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_rect_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_rect_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.restore exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_restore_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_restore_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.rotate exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_rotate_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_rotate_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rotate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rotate</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.save exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_save_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_save_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.scale exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_scale_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_scale_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="scale" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-scale</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.setTransform exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_setTransform_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_setTransform_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="setTransform" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-settransform</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowBlur exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_shadowBlur_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowBlur" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowblur</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowColor exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_shadowColor_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowOffsetX exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_shadowOffsetX_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetX" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsetx</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowOffsetY exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_shadowOffsetY_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetY" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsety</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.strokeRect exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_strokeRect_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_strokeRect_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.strokeStyle exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_strokeStyle_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_strokeStyle_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="strokeStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokestyle</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.strokeText exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_strokeText_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_strokeText_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroketext</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.stroke exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_stroke_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_stroke_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.textAlign exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_textAlign_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_textAlign_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.textBaseline exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_textBaseline_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textBaseline" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textbaseline</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.transform exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_transform_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_transform_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="transform" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-transform</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas2d.translate exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas2d_translate_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_translate_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="translate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-translate</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas.height exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas_height_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_height_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="height" interface="HTMLCanvasElement" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas.toDataURL exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas_toDataURL_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_toDataURL_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="toDataURL" interface="HTMLCanvasElement" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if canvas.width exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas_width_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="width" interface="HTMLCanvasElement" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if imagedata.data exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="imagedata_data_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_data_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-data</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if imagedata.height exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="imagedata_height_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_height_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="height" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-height</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if imagedata.width exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="imagedata_width_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_width_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="width" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-width</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if textmetrics.width exists" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="textmetrics_width_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/textmetrics_width_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="width" interface="TextMetrics" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-textmetrics-width</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='rntx0c100'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.whitespace">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.whitespace.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width=' 100#!?'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.trailingjunk">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.trailingjunk.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='+100px'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.plus">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.plus.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='100%'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.percent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.percent.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='0100'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.octal">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.octal.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='-100'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.minus">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.minus.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='#!?'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.junk">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.junk.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='0x100'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.hex">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.hex.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='100e1'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.exp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.exp.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width=''" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='100em'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.em">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.em.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse non-negative integers in setAttribute if set width='100.999'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.decimal">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.decimal.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='100#!?' can be set as a canvas control value" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.trailingjunk">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.trailingjunk.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the width with space can be set as a canvas control value" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.space">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.space.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='+100' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.plus">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.plus.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='100%' can be set as a canvas control value" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.percent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.percent.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='  ' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.onlyspace">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.onlyspace.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='0100' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.octal">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.octal.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='-100' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.minus">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.minus.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='#!?' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.junk">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.junk.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='0x100' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.hex">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.hex.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='100e1' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.exp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.exp.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.empty.html">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='100em' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.em">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.em.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='100.999' can be set as a canvas control value" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.parse.decimal">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.decimal.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width/height IDL attributes can be set to 0" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.idl.set.zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.set.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if can get/set width/height IDL attributes" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.idl">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if can get width/height IDL/content attributes" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.get">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.get.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if it is default width/height when attributes are missing" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Parsing of non-negative integers in setAttribute" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="size.attributes.setAttribute.onlyspace">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.onlyspace.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas3" type="js">
+      <testcase purpose="Check that toDataURL ignores extra arguments if set the three parameters" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="toDataURL.arguments.2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the value of initial.reset.2dstate" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="initial.reset.2dstate">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.2dstate.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the value of initial.reset.clip" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="initial.reset.clip">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.clip.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the value of initial.reset.different" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="initial.reset.different">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.different.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the value of initial.reset.gradient" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="initial.reset.gradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.gradient.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the value of initial.reset.path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="initial.reset.path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.path.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the value of initial.reset.pattern" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="initial.reset.pattern">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.pattern.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the value of initial.reset.same" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="initial.reset.same">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.same.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the value of initial.reset.transform" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="initial.reset.transform">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.transform.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ImageData objects' properties are read-only" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="2d_imageData_object_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.readonly.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#imagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ImageData objects have the right properties" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="2d_imageData_object_properties">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.properties.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#imagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can display the line with default sets correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="2d_line_defaults">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.defaults.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if CanvasRenderingContext2D.canvas refers back to its canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="2d_canvas_reference">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.canvas.reference.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the cross line can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="2d_line_cross">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cross.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if CanvasRenderingContext2D.canvas is readonly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="2d_canvas_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.canvas.readonly.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+<!--      <testcase purpose="Check if ImageData does not have a usable constructor" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P3" id="2d_imageData_object_ctor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.ctor.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#imagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check the addColorStop method of CanvasGradient interface." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="canvas_colorsandstyles_addcolorstop_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_addcolorstop_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="addColorStop" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the isPointInPath attribute of CanvasRenderingContext2D interface." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="canvas_complexshapes_ispointInpath_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_ispointInpath_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if textAlign center is in the center of the em squares (not the bounding box)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_align_center">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.center.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if textAlign left is on the left of the first em square" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_align_left">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.left.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if textAlign end with rtl is the left edge" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_align_end_rtl">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.rtl.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the textAlign end with ltr is the right edge" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_align_end_ltr">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.ltr.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if lineWidth can determine the width of line strokes" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_width_basic">
+        <description>
+          <test_script_entry test_script_expected_result="actual output is the same with expected result, check if it's acceptable with your eyes.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineWidth" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linewidth</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if textAlign start with ltr is the left edge" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_align_start_ltr">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.ltr.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if textAlign start with rtl is the right edge" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_align_start_rtl">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.rtl.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if textAlign right is on the right of the last em square (not the bounding box)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_align_right">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.right.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if line stroke widths are affected by scale transformations" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_width_transformed">
+        <description>
+          <test_script_entry test_script_expected_result="actual output is the same with expected result, check if it's acceptable with your eyes.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.transformed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineWidth" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linewidth</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(imgdata) returns transparent black data of the right size" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.imageData.create1.initial">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.initial.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(imgdata) returns an ImageData object containing a CanvasPixelArray object" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.imageData.create1.type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(sw, sh) returns an ImageData object containing a CanvasPixelArray object" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.imageData.create2.type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getContext('2d') returns the same object" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.getcontext.unique">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.unique.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if scale() with a scale factor of zero works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.transformation.scale.zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="scale" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-scale</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if void methods return undefined" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.voidreturn">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.voidreturn.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if HTMLCanvasElement methods can be replaced, and the replacement methods are used by canvases" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="type.replace">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.replace.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the type.name is HTMLCanvasElement" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="type.name">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.name.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if HTMLCanvasElement methods can be added, and the new methods are used by canvases" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="type.extend">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.extend.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL on zero-size canvas returns 'data:,'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.zerosize">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerosize.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with an unhandled type returns a PNG" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.unrecognised">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.unrecognised.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with PNG handles simple colours correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.png.primarycolours">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.primarycolours.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with image/png returns a PNG" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.png">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with PNG handles non-primary and non-solid colours correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.png.complexcolours">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.complexcolours.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL works before any context has been got" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.nocontext">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.nocontext.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL type is ASCII-case-insensitive" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.lowercase.unicode">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.unicode.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL type is case-insensitive" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.lowercase.ascii">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.ascii.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with JPEG handles out-of-range quality parameters" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.jpeg.quality.outsiderange">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.outsiderange.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with JPEG handles non-numeric quality parameters" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.jpeg.quality.notnumber">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.notnumber.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with JPEG uses the quality parameter" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.jpeg.quality.basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with JPEG handles simple colours correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.jpeg.primarycolours">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.primarycolours.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with JPEG composites onto black" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.jpeg.alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.alpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL with no arguments returns a PNG" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arcTo_shape_curve_two" priority="P2" purpose="Check if the arcTo() method curves in the right kind of shape" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="actual output is the same with expected result, check if it's acceptable with your eyes.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="arcTo" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arcTo_shape_curve_one" priority="P2" purpose="check if arcTo() curves in the right kind of shape" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="actual output is the same with expected result, check if it's acceptable with your eyes.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="arcTo" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="security.pattern.canvas.timing.sub" priority="P3" purpose="Pattern safety depends on whether the source was origin-clean, not on whether it still is clean" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/security.pattern.canvas.timing.sub.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element" usage="true"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="security.pattern.create.sub" onload_delay="15" priority="P3" purpose="Creating an unclean pattern does not make the canvas origin-unclean" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/security.pattern.create.sub.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element" usage="true"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="toDataURL with image/jpg is invalid type hence returns a PNG" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.jpg">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="toDataURL on zero-size canvas returns 'data:,'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.zeroheight">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.zeroheight.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="toDataURL on zero-size canvas returns 'data:,'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.zerowidth">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerowidth.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="window.HTMLCanvasElement interface object is [[Configurable]]" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="type.delete">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.delete.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="window.HTMLCanvasElement has prototype, which is { ReadOnly, DontDelete }. prototype has getContext, which is not" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="type.prototype">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.prototype.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="createImageData(imgdata) should throw when called with the wrong |this|." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.imageData.create1.this">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.this.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="createImageData(null) throws TypeError." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.imageData.create1.zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="createImageData(sw, sh) should throw when called with the wrong |this|." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.imageData.create2.this">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.this.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas4" type="js">
+      <testcase purpose="Check if toDataURL with a syntactically invalid type returns a PNG" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.bogustype">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.bogustype.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if toDataURL ignores extra arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.arguments.3">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that toDataURL ignores extra arguments if set the two parameters" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="toDataURL.arguments.1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Canvas size is independent of CSS resizing" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="size.attributes.style">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.style.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parse of non-negative integers in setAttribute if set width='0px'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="size.attributes.setAttribute.zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that parsing of non-negative integers in setAttribute if set width=' 100px'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="size.attributes.setAttribute.space">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.space.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if removing content attributes reverts to default size" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="size.attributes.removed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.removed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setting IDL attributes to 0 updates IDL and content attributes" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="size.attributes.reflect.setidlzero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidlzero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setting IDL attributes updates IDL and content attributes" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="size.attributes.reflect.setidl">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidl.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setting content attributes updates IDL and content attributes" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="size.attributes.reflect.setcontent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setcontent.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if width='0' can be set as a canvas control value " type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="size.attributes.parse.zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the width with widthspace can be set as a canvas control value" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="size.attributes.parse.whitespace">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.whitespace.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.drawImage.wrongtype">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.wrongtype.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the createPattern of interface is CanvasRenderingContext2D." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.pattern.image.string">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.string.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is context.casesensitive" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="context.casesensitive">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.casesensitive.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is context.emptystring" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="context.emptystring">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.emptystring.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is context.unrecognised.badname" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="context.unrecognised.badname">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badname.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is context.unrecognised.badsuffix" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="context.unrecognised.badsuffix">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badsuffix.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is context.unrecognised.nullsuffix" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="context.unrecognised.nullsuffix">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.nullsuffix.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is context.unrecognised.unicode" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="context.unrecognised.unicode">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.unicode.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is fallback.basic" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="fallback.basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/fallback.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is fallback.multiple" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="fallback.multiple">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/fallback.multiple.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is fallback.nested" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="fallback.nested">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/fallback.nested.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is initial.colour" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="initial.colour">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.colour.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the fillstyle can be displayed correctly after setting hsla(120, 100%, 50%, 0.499)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsla_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if areas outside shadows are drawn correctly with destination-out" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_composite_destination_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if lineJoin 'miter' is rendered correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_join_miter">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.miter.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(255, 0, 0, 100%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgba_four">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation ='destination-over'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_destination_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for fillStyle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.state.saverestore.fillStyle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.fillStyle.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is transformation basic" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_transformation_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="translate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-translate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that shadows are drawn if shadowBlur is set" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_enable_blur">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.blur.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowBlur" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowblur</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for lineWidth" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_linewidth">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineWidth.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if rotate() by 0 does nothing" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_rotate_zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rotate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rotate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() wraps angles mod 2pi when anticlockwise and end greater than start+2pi" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_angle_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ImageData.data wraps numbers modulo 256" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_object_clamp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.clamp.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-data</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if shadow colour alpha components are used" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_2alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(100%, 0, 0, 1)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgba_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if restore() with an empty stack has no effect" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_underflow">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.underflow.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows drawn for stroke joins can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_stroke_join">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with multiple gradient" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_interpolate_multiple">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.multiple.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fillStyle = 'gray'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_svg_gray">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed successfully with overlap gradient" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_interpolate_2overlap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'xor'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_xor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.xor.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() affects pixels outside the clip region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_lighter">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.lighter.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if currentColor is computed from the canvas element" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_current_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for strokeStyle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_strokeStyle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.strokeStyle.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn correctly for partially-transparent images" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_image_alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.alpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() handles negative-sized dirty rectangles correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_dirty_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if image can be displayed correctly after setting the createRadialGradient's value" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_inside_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if imagepattern with composite globleAlpha works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_globalAlpha_imagepattern">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.imagepattern.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalAlpha" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Linear gradient coordinates are relative to the coordinated space at the time of the filling" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_linear_transform_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if baseline with valid value" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_baseline_valid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.valid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textBaseline" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textbaseline</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the first control point is added when there is not any subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_ensuresubpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() function affects pixels outside the clip region." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_destination_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fillstyle=invalid name" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_name_four">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if union is two line" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_union">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.union.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if globalAlpha.fill can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_globalAlpha_fill">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.fill.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalAlpha" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="security.dataURI" priority="P2" purpose="Check if URIs is not counted as different-origin, and do not taint the canvas" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/security.dataURI.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="canvas" element_type="attribute" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  createPattern() with empty image source." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.pattern.image.incomplete.emptysrc">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.emptysrc.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  createPattern() with immediate image." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.pattern.image.incomplete.immediate">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.immediate.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  createPattern() with no image source." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.pattern.image.incomplete.nosrc">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.nosrc.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  createPattern() with reload image." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.pattern.image.incomplete.reload">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.reload.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  createPattern() with reload image." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.pattern.image.incomplete.removedsrc">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.removedsrc.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  createPattern() with null image." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.pattern.image.null">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.null.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas5" type="js">
+      <testcase purpose="Check if fillStyle parse rgba solid" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgba_4solid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if rect with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can display transparent image with globalCompositeOperation = source-over correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_source_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase purpose="Check if putImageData() throws NOT_SUPPORTED_ERR if arguments are not finite" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if fillStyle function parse invalid red score of rgb" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgb_r">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if invalid string filestyle can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_invalidstring">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidstring.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is rect path end" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_1end">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fillStyle = rgba(0,  255,  0,  0.499)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgba_num_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if it is pattern modify canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_modify_canvas1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setting lineJoin to valid values works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_join_valid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.valid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage function of an animated GIF draws the first frame" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_animated_gif">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.gif.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is composite globalAlpha range" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_globalAlpha_range">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.range.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalAlpha" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Line caps are drawn at the corners of an unclosed rectangle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_cap_open">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.open.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Pattern fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_pattern_source_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if currentColor is solid black when the canvas element is not in a document" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_current_removed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.removed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'destination-in'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_destination_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() works on arcs" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_arc">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.arc.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that Shadows are drawn if shadowOffsetX is set" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_enable_x">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.x.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetX" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsetx</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setTransform method works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_setTransform_skewed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.skewed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="setTransform" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-settransform</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the different of two gradient object" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_object_compare">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.compare.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting fillStyle = 'hsla(120, 100%, 50%, 2)'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsla_clamp_five">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are not drawn outside the clipping region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_clip_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check composite with 'destination-over'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_destination_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correclty after setting an invalid shadow color" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_attributes_shadowColor_invalid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the shadow can be displayed correctly as shadowOffset=valid values" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_attributes_shadowOffset_valid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.valid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetY" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsety</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Stroked subpaths are combined before being drawn" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_overlap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.overlap.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the rect can be displayed correctly with newsubpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_newsubpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.newsubpath.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting the hsl(360120, 100%, 50%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsl_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correcly after repeatting a null pattern" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_repeat_null">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.null.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if a transparent image can be displayed correctly with globalCompositeOperation = 'lighter'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_lighter">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.lighter.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check fill with winding subtract" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_fill_winding_3subtract">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fill" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if draw with the fontface" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_fontface_repeat">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.repeat.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if moveTo() with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_moveTo_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="moveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-moveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() with negative radius throws an exception" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the semitransparent image can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_get_semitransparent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.semitransparent.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if linkto nextpoint after closePath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_closePath_nextpoint">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.nextpoint.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="closePath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-closepath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle.get.transparent works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_get_transparent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.transparent.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if image can be displayed correctly with moveTo() multiple setted" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_moveTo_multiple">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.multiple.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="moveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-moveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ImageData.data converts undefined to 0" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_object_undefined">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.undefined.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-data</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(w, h) is rounded the same as getImageData(0, 0, w, h)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_create2_round">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.round.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if 2D context ignores extra getContext arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_getcontext_extraargs">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.extraargs.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearRect of zero pixels has no effect" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_clearRect_zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if create a cone in cylinder" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_cone_cylinder">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.cylinder.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Negative source width/height represents the correct rectangle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_negativesource">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativesource.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillRect function with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillRect_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if shadowBlur with shadow attributes works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_attributes_shadowBlur_initial">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.initial.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowBlur" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowblur</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if rotate() wraps large negative values correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_rotate_wrapnegative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrapnegative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rotate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rotate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if font method parse size percentage by default" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_font_parse_size_percentage_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() throws INDEX_SIZE_ERR if size is zero" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() wraps angles mod 2pi when clockwise and start greater than end+2pi" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_angle_angles">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for shadowColor" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_shadowColor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowColor.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle parses rgba number" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgba_num_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() accepts image data got from a different canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_cross">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.cross.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if draw image with composite 'source-in' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_source_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if can create a cone at front" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_cone_front">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.front.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for lineCap" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_lineCap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineCap.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if empty string has zero width" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_measure_width_empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="measureText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-measuretext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() only modifies areas inside the dirty rectangle, using width and height" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_dirty_rect_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting the rect's width=0" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_zero_width_6">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.6.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle function with hsla works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_2hsla">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="currentColor is computed from the canvas element even when element is not rendered" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.fillStyle.parse.current.notrendered">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.notrendered.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas6" type="js">
+      <testcase purpose="Check if Miter joins are drawn correctly with obtuse angles" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_miter_obtuse">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.obtuse.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="miterLimit" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-miterlimit</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with Assumes colours clamped to [0,255] after setting the rgb(-2147483649, 4294967298, -18446744073709551619)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgb_clamp_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() method with lineWidth greater than 2*radius can draw sensibly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_selfintersect_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check drawImage with composite 'lighter'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_lighter">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.lighter.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with end circle inside the start circle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_inside_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check interpolate gradient with createLinearGradient" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_interpolate_solid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.solid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle parse invalid 5 hex numbers" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_5hex">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly set fillstyle as hex(fillStyle = '#0f0';)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hex_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with overlap gradient;" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_interpolate_overlap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if U+0020 is rendered the correct size (1em wide)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_space_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if crosscanvas gradient can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_object_crosscanvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.crosscanvas.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() is not affected by context state" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_unaffected">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.unaffected.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with start circle touching end circle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_touch_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting the hsl(+120, +100%, +50%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsl_six">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-6.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage() of an APNG with no poster frame draws the first frame" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_animated_apng">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.apng.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are affected by globalAlpha" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_alpha_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check composite operation unrecognised" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_operation_unrecognised">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.unrecognised.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with invalid name '&quot;red' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_name_red">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows with alpha components are correctly affected by globalAlpha" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_alpha_globalAlpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Setting miterLimit to invalid values is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_linemiter_invalid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="miterLimit" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-miterlimit</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check pattern_basic_nocontext" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_basic_nocontext">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.nocontext.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with Assumes colours clamped to [0,255] after setting the rgb" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgb_clamp_four">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the rect with leight, width=0 can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_width_leight_zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgb(255, - 1, 0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgb_six">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-6.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'destination-atop'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_destination_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_fill_copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.copy.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle.get.solid works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_get_solid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.solid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() does not affect the current path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.path.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() counts points on the path as inside" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_edge">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.edge.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if  clearRect function is affected by clipping regions" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_clearRect_clip">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.clip.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Stroking starts a new path or subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_unaffected">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.unaffected.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for miterLimit" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_miterLimit">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.miterLimit.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if shadows are not drawn for areas outside stroke caps" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_stroke_1cap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Zero-leight line segments from lineTo are removed before stroking" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_prune_line">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.line.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() works for sizes smaller than one pixel" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_tiny">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.tiny.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() puts modified image data correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_modified">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.modified.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearRect affects the current path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_clearRect_path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.path.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns non-premultiplied colours" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_nonpremul">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonpremul.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with invalid name 'firebrick1' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_name_firebrick1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalAlpha=0" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.alpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image van be displayed correctly after setting the fillstyle as an invalid hex number" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hex_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the transformations are applied while building paths, not drawing" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_transformation_changing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.changing.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="translate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-translate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for shadowOffsetX" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.state.saverestore.shadowOffsetX">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetX.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() handles transformations correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_transform_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill function does not affect pixels outside the clip region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_source_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image van be displayed correctly after setting the fillstyle with six invalid hex numbers" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hex6">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex6.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillRect of negative sizes works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillRect_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgb(255, 0, 0, 1)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgb_seven">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-7.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for shadowBlur" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_shadowBlur">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowBlur.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fillStyle = 'ThreeDDarkShadow'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_system">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.system.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with 'pattern' width=0/leight=0/width=leight=0" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_basic_zerocanvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.zerocanvas.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'source-out'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_source_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillRect draws shadows" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillRect_shadow">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.shadow.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() method does not affect pixels outside the clip region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_destination_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'lighter'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_lighter">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.lighter.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check shadows of clipped shapes are still drawn within the clipping region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_clip_1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the quadraticCurveTo_shape works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_quadraticCurveTo_shape">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.shape.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="quadraticCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-quadraticcurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if image can be displayed correctly with moveTo() newsubpath setted" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_moveTo_newsubpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.newsubpath.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="moveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-moveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_scale_one" priority="P2" purpose="Check if Non-uniformly scaled arcs are the right shape" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="arc" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="putImageData() with null imagedata throws TypeError." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.imageData.put.null">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.null.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="putImageData() does not accept non-ImageData objects." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.imageData.put.wrongtype">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.wrongtype.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas7" type="js">
+      <testcase purpose="Check if arc() draws nothing when end = start + 2pi-e and anticlockwise" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_twopie_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the point is added and nothing is drawn when there is no subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_lineTo_ensuresubpath_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="lineTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-lineto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clip is unaffected" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_clip_unaffected">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.unaffected.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill does not affect pixels outside the clip region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_source_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if radial gradient coordinates are relative to the coordinated space at the time of filling" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_transform_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() handles dirty rectangles outside the canvas correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_dirty_outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.outside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if transformations are applied in the right order" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_order">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.order.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rotate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rotate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the incomplete(omitted) drawImange image can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_image_incomplete_omitted">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.omitted.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() puts non-solid image data correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.alpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setting miterLimit to valid values works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_miter_valid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.valid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="miterLimit" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-miterlimit</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase purpose="Check if createImageData() throws NOT_SUPPORTED_ERR if arguments are infinite" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_create_two_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'xor'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_xor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.xor.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if can create a cone beside" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_cone_beside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.beside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() draws a straight line from P0 to P1" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_shape_start">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.start.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle works with radial gradient" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_cone_top">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.top.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Line joins are drawn at the corner of a closed rectangle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_join_closed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.closed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() draws nothing when startAngle = endAngle and anticlockwise" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_zero_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalAlpha = 0.01" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_globalAlpha_image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.image.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalAlpha" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed successfully with start circle touching end circle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_touch_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with strokeStyle setted as default" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeStyle_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeStyle.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="strokeStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokestyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for textAlign" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_textAlign">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textAlign.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() works with negative width and height, and returns top-to-bottom left-to-right" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_source_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the undefined image can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_image_undefined">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.undefined.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with invalid 7 hex number works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_7hex">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex7.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(sw, sh) exists and returns something" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="2d_imageData_create2_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if addColorStop method with color argument works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_interpolate_colour">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.colour.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="addColorStop" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'destination-atop'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_destination_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() draws nothing when startAngle = endAngle and clockwise" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_zero_endAngle_clockwise">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Default lineWidth strokes are affected by scale transformations" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_width_scaledefault">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.scaledefault.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineWidth" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linewidth</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if valid shadowBlur of shadow attributes works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.shadow.attributes.shadowBlur.valid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.valid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowBlur" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowblur</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method draws shadows" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_shadow">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.shadow.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase purpose="Check if drawImage with zero-sized source rectangle throws INDEX_SIZE_ERR" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_zerosource">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerosource.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if Pattern method fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_pattern_source_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent supports Multiple scale()s combined" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_scale_multiple">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.multiple.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="scale" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-scale</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Miter joins are drawn correctly with acute angles" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_miter_acute">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.acute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if scale() with large scale factors works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_scale_large">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.large.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="scale" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-scale</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn using globalCompositeOperation" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_composite_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn for stroke joins respecting miter limit" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_stroke_join_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() with zero radius draws a straight line from P0 to P1" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_zero_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() only modifies areas inside the dirty rectangle, using x and y" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_dirty_rect2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Stroke line widths are scaled by the current transformation matrix" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_scale_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Miter joins are not drawn when the miter limit is exceeded at the corners of a zero-height rectangle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_miter_lineedge">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.lineedge.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="miterLimit" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-miterlimit</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createRadialGradient() throws INDEX_SIZE_ERR with negative radius" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if lineJoin 'round' is rendered correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_join_round">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.round.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the solid can be displayed correctly after setting the globalCompositeOperation = destination-out" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_destination_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns R then G then B" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_order_rgb">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rgb.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'destination-out'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_destination_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() from 0 to pi draws stuff in the right half" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_2shape">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if lineCap 'round' is rendered correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_cap_round">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.round.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if pic can be rotated correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_rotate_radians">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.radians.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rotate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rotate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the clip.winding can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_clip_2winding">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with valid shadowColor" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_attributes_shadowColor_valid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.valid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if if scale() with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_scale_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="scale" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-scale</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Line joins are not drawn at the corner of an unclosed rectangle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_join_open">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.open.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_nocontext_source_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the hsl(0, 100%, 100%, 1)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hsl_five">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_angle_anticlockwise" priority="P2" purpose="Check if arc() draws pi/2 .. -pi anticlockwise correctly" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="arc" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_6angle" priority="P2" purpose="Check if arc() draws a full circle when anticlockwise and starts greater than end+2pi" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.6.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="arc" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas8" type="js">
+      <testcase purpose="Check if Zero-leight line segments are removed before stroking with miters" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_prune_corner">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.corner.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with zero-length line" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_interpolate_zerosize">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setting lineWidth to invalid values is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_width_invalid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineWidth" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linewidth</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting fillStyle = hsla(120, 200%, 50%, 1)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsla_clamp_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if scale method with negative scale factors works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_scale_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="scale" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-scale</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Zero-length line segments from closed paths are removed before stroking" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_prune_closed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.closed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fillStyle = 'transparent'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_1transparent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Miter joins are drawn when the miter limit is not quite exceeded" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_miter_within">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.within.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="miterLimit" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-miterlimit</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the solid can be displayed correctly with globalCompositeOperation = 'source-in'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_source_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createPattern() of an animated GIF draws the first frame" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_animated_gif">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.animated.gif.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the hsl(0, 100.%, 50%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hsl_six">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-6.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_create2_zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() with all points on a line, and P1 between P0/P2, draws a straight line to P1" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_collinear_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'destination-over'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_destination_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the gradient radial cone" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_cone_shape2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with empty gradient" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the first control point is added (and nothing is drawn up to it)when there is no subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_bezierCurveTo_ensuresubpath_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="bezierCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beziercurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if bezierCurveTo() with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_bezierCurveTo_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="bezierCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beziercurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo joins up to the last subpath point correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_transformation">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.transformation.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if transform() with the identity matrix does nothing" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_transform_identity">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.identity.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="transform" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-transform</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() puts image data from getImageData() onto the canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with the initial path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_initial">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.initial.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fill" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillRect with zero pixels has no effect" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillRect_zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with rgba clamp works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgba_clamp_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase purpose="Check if createRadialGradient() throws NOT_SUPPORTED_ERR with infinite arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if the image can be displayed correctly when this item is set to repeatx.outside" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_repeatx_outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.outside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check get composite operation" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_operation_get">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.get.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() affects pixels outside the clip region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_source_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if shadow offsets are not affected by transformations" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_2transform">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can display transparent image with globalCompositeOperation = destination-over correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_destination_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if globalAlpha with invalid value works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_globalAlpha_invalid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalAlpha" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows can be offset with positive y" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_offset_positiveY">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveY.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetY" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsety</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  the value of rect_closed" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_closed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.closed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if composite with 'lighter' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_lighter">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.lighter.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method fill() does not affect pixels outside the clip region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_source_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn for canvases" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_canvas_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can display the imge drawing with floatsource correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_floatsource">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.floatsource.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() method handles transformations correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_transform_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method is affected by transforms" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_transform">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.transform.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are not drawn for areas outside stroke joins" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_stroke_join_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle parse invalid rgb" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_2rgb">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_image_copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.copy.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check rect function with lineWidth" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_selfintersect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.selfintersect.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() method detects whether the point is inside the path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_2basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearRect is not affected by globalAlpha" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_clearRect_globalalpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalalpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for globalAlpha" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.state.saverestore.globalAlpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalAlpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn for transparent canvases" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_canvas_transparent_canvases">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Pattern fill() function draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_pattern_destination_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the changed of border's color has no affect on the filled color" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_fill_closed_unaffected">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.unaffected.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fill" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if it can be displayed correctly with fillStyle = 'hsla(0, 0, 50%, 1)'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hsla_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn for images" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_image_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ImageData.data converts strings to numbers with ToNumber" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_object_string">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.string.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-data</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setting lineWidth to valid values works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_width_valid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.valid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineWidth" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linewidth</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check shadows are drawn for gradient fills" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_gradient_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting the hsl(-360240, 100%, 50%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsl_four">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image pattern can be displayed correclty after repeating unrecognized image" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_repeat_unrecognised">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognised.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_empty" priority="P2" purpose="Check if arc() with an empty path does not draw a straight line to the start point" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="arc" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_angle_full_circle" priority="P2" purpose="Check if arc() draws a full circle when clockwise and end is greater than start+2pi" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="arc" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_angle_two" priority="P2" purpose="Check if arc() draws -3pi/2 .. -pi anticlockwise correctly" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="arc" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fill() with zerosize" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.gradient.interpolate.zerosize.fill">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fill.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fillRect() with zerosize" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.gradient.interpolate.zerosize.fillRect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillRect.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fillText() with zerosize" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.gradient.interpolate.zerosize.fillText">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillText.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with stroke() with zerosize" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.gradient.interpolate.zerosize.stroke">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.stroke.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with strokeRect() with zerosize" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.gradient.interpolate.zerosize.strokeRect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeRect.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with strokeText() with zerosize" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.gradient.interpolate.zerosize.strokeText">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeText.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas9" type="js">
+      <testcase purpose="Check if the drawImage.path works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.path.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if text can be displayed correctly when setting font=invalid values" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_font_parse_invalid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with invalid name 'darkbrown' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_name_darkbrown">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the solid can be displayed correctly after setting globalCompositeOperation = 'copy'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_destination_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage function with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage with composite 'xor' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_xor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.xor.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'destination-in'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_destination_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with invalid 4 hex number works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_4hex">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correcly after repeatting an empty pattern" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_repeat_empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method drawImage of a canvas with no context draws pixels as (0,0,0,0) and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_nocontext_source_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if lineCap 'butt' is rendered correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_cap_butt">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.butt.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the solid can be displayed correctly with rgba(  0  ,  255  ,  0  ,  1.0  )" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgba_solid_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if shadows are not drawn for transparent parts of canvases" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_canvas_2transparent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase purpose="Check if the canvas can be displayed correctly with 'drawimage' width=0/leight=0/width=leight=0" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_zerocanvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerocanvas.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if the image can be displayed correctly after setting the hsl(120.0, 100.0%, 50.0%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_5hsl">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows of clipped shapes are still drawn within the clipping region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_clip_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with 6 hex number works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_6hex">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex6.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillRect function is affected by transforms" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillRect_transform">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.transform.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  rect with negative" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns a correctly-sized CanvasPixelArray" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_length">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.length.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase purpose="Check if the image can be displayed with invalidoffset in addColorStop" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_object_invalidoffset">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidoffset.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="addColorStop" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop</spec_url>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if drawImage() method draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_image_source_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed before stroking" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_prune_curve">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.curve.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting the drawImage 5 times" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_9arg_destsize">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destsize.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for lineJoin" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_lineJoin">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineJoin.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check pattern of canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_basic_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with outside gradient" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_interpolate_outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.outside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with 8 hex numbers works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hex8">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex8.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() is not affected by context state" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_unaffected">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unaffected.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with the end circle outside the start circle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_outside_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with Assumes colours clamped to [0,255] after setting the rgb(-200%, 200%, -200%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgb_clamp_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn for filling patterns" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_pattern_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() is not affected by clipping regions" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_clip">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.clip.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with paint pattern 'no-repeat' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_norepeat_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed when argument be updated in addColorStop" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_object_update">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.update.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="addColorStop" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Miter joins are not drawn when the miter limit is exceeded, on exact right angles" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_miter_rightangle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.rightangle.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="miterLimit" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-miterlimit</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() works on unclosed subpaths" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_unclosed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.unclosed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fillStyle = 'grey'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_svg_grey">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle function with hsl works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_2hsl">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be diaplayed correclty with globalCompositeOperation = 'Source-over'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_operation_casesensitive">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.casesensitive.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if rotate() wraps large positive values correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_rotate_wrap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrap.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rotate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rotate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Pattern fill draws pixels and is not covered by the source object as (0,0,0,0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_pattern_copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.copy.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed successfully with norepeat horizontal and vertical" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_norepeat_coord_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle function  parse invalid number" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgba_a">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly after modified canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_modify_canvas_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() uses the non-zero winding number rule" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_winding">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.winding.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can display transparent image with globalCompositeOperation = destination-atop correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_destination_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() works on Bezier curves" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_bezier">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bezier.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle parse with hsl works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsl_1clamp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the caseline can be displayed correctly with default settings" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_baseline_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textBaseline" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textbaseline</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage function with composite 'copy' of canvas works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.copy.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows take account of transformations" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_transform_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="translate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-translate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if globalAlpha.canvaspattern can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_globalAlpha_canvaspattern">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvaspattern.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalAlpha" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check shadows can be offset with positive x" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_offset_positiveX">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveX.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetX" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsetx</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn correctly for partially-transparent gradient fills" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_gradient_alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.alpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are not drawn when only the shadowColor is set" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_enable_off_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if it can be displayed correctly with clip intersecting" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_clip_intersect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.intersect.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly when repeaty.outside is set" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_repeaty_outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.outside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method is affected by globalAlpha" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_globalalpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalalpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if create a cone at bottom" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_cone_bottom">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.bottom.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="drawImage() with null argument" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.drawImage.null">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.null.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="drawImage() of an SVG image" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.drawImage.svg">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.svg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas10" type="js">
+      <testcase purpose="Check  if the image can be displayed correctly after setting fillStyle = 'hsla(120, 100%, 200%, 1)'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsla_clamp_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting fillStyle = hsl(120, -200%, 49.9%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsl_clamp_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() works when there is no path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() draws nothing when end = start + 2pi+e and clockwise" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_twopie_four">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createPattern function with 'Repeat' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_repeat_case">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.case.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the drawImage.clip can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_clip">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.clip.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() draws a full circle when end = start + 2pi-e and clockwise" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_twopie_full_circle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with invalid rgba data works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_5rgba">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image van be displayed correctly after setting the fillstyle as three invalid hex numbers" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hex_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with invalidcolour in addColorStop" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_object_invalidcolour">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidcolour.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="addColorStop" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() returns false for non-finite arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with start circle touching end circle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_touch_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'highlight'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_operation_highlight">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.highlight.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if  fillStyle parses invalid rgb" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgb_five">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows of shapes outside the visible area can be offset onto the visible area" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.outside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetY" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsety</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if can draw a 2d image with 9arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_9arg_sourcepos">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcepos.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if crosscanvas pattern can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_crosscanvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.crosscanvas.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if  fillStyle function works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting the hsl(120, 100%, 50%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsl_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method of Nx0 pixels draws a straight line" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_zero_straight_line">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after modified image" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_modify_image_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for shadowOffsetY" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_shadowOffsetY">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetY.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if method fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_fill_source_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() from 0 to pi does not draw anything in the wrong half" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_shape1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after repeatting the image" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_repeat_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() from 0 to -pi/2 draws stuff in the right quadrant" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_shape_four">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle parses rgb num" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgb_num">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-num.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() function draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_fill_destination_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if system fonts is computed to explicit values" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_font_parse_system">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.system.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() uses the current path, not just the subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.subpath.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows of shapes with alpha components are drawn correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_alpha_five">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn correctly for partially-transparent fill patterns" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_pattern_alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.alpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if  fillStyle parses invalid name 'red blue'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_name_redblue">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for textBaseline" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_textBaseline">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textBaseline.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the solid can be displayed correctly after setting globalCompositeOperation = 'copy'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.copy.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the imange can be displayed correctly with createPattern(img, 'repeat-x')" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_repeatx_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if bezierCurveTo() method works successfully" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_bezierCurveTo_scaled">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.scaled.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="bezierCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beziercurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if there is no subpath, the first control point is added" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_quadraticCurveTo_ensuresubpath1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="quadraticCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-quadraticcurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Pattern fill() method draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_pattern_destination_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearRect() with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_clearRect_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check rect with end" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_2end">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method can be nested as a stack" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_stack">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stack.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Negative destination width/height represents the correct rectangle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_negativedest">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedest.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the point is added and used for subsequent drawing when there is no subpath," type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_lineTo_ensuresubpath_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="lineTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-lineto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with parse rgb clamped works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgb_1clamp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can displayed the solid with globalCompositeOperation = destination-in correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_destination_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the source-out" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_source_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting fillStyle = hsla(120, 100%, 0%, -2)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsla_clamp_six">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-6.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Non-space characters are not converted to U+0020 and collapsed" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_space_collapse_nonspace">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.collapse.nonspace.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the first control point is added when there is no subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_bezierCurveTo_ensuresubpath_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="bezierCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beziercurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle parse invalid rgba" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_7rgba">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-7.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() works on paths outside the canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.outside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the hsl(z, 100%, 50%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hsl_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadow colour alpha components are used successfully" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_alpha_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the drawImage function with nine argumnets destpos works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_9arg_destpos">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destpos.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check rect with winding works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_winding">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.winding.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() method affects pixels outside the clip region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_xor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.xor.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with the start circle inside the end circle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_1inside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Line joins are drawn at 180-degree joins" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_join_parallel">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.parallel.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="fillStyle() with rgb-eof" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.fillStyle.parse.rgb-eof">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-eof.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="fillStyle() with rgba-eof" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.fillStyle.parse.rgba-eof">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-eof.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas11" type="js">
+      <testcase purpose="Check shadows can be offset with negative x" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_offset_negativeX">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeX.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetX" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsetx</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check bezierCurveTo() method" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_bezierCurveTo_shape">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.shape.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="bezierCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beziercurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'destination-out'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_destination_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Setting lineCap to valid values works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_cap_valid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.valid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() clamps colours to the range [0, 255]" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_clamp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.clamp.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns topmost rows first" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_order_rows">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rows.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the text can be displayed correctly with textBaseline = 'alphabetic'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_baseline_alphabetic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.baseline.alphabetic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textBaseline" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textbaseline</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() from 0 to -pi/2 does not draw anything in the wrong quadrant" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_shape_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() has no effect if P0 = P1" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_coincide_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage with self works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_2self">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ImageData.data converts NaN to 0" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_object_nan">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.nan.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-data</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if lineCap 'square' is rendered correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_cap_square">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.square.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill function  affect pixels outside the transparent region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_source_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if text is align by default" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_align_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.align.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the value is composite transparent 'copy'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.copy.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() with lineWidth greater than 2*radius is drawn sensibly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_1selfintersect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with equal start circle to end circle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_equal">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.equal.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage() method of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_nocontext_copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.copy.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'source-over'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_source_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() adds the end point of the arc to the subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_end">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.end.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  invalid shadowBlur of shadow attributes works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_attributes_shadowBlur_invalid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowBlur" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowblur</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearRect is affected by transforms" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_clearRect_transform">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.transform.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Miter joins are not drawn when the miter limit is exceeded" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_miter_exceeded">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.exceeded.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="miterLimit" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-miterlimit</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for globalCompositeOperation" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_globalCompositeOperation">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalCompositeOperation.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if radial gradient coordinates are relative to the coordinate space at the time of the filling" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_transform_translate">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if isPointInPath() function handles transformations correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_isPointInPath_transform_scale">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() with all points on a line, and P2 between P0/P1, draws a straight line to P1" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_2collinear">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the text can be displayed correctly as set the align a valid value" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_align_valid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.align.valid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage() function of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_nocontext_destination_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage by self works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_self_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage method draws pixels and is not covered by the source object as (0,0,0,0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_image_source_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method works for font" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_font">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.font.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if stretch images get pixels wrapping around the edges" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_nowrap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nowrap.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method affects the clipping path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_clip">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.clip.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase purpose="Check if getImageData() throws NOT_SUPPORTED_ERR if arguments are not finite" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if rotate() with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_rotate_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rotate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rotate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method of Nx0 pixels draws a closed line with joins" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_5zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() with zero radius draws a straight line from P0 to P1, even when all points are collinear" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_2zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check zero-length line segments from arcTo and arc are removed before stroking" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_prune_arc">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.arc.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  rect function with zero width works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_zero_width_2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with current color." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_object_current">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.current.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the hsl(0, 100%, 0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hsl_four">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() with a non-empty path does draw a straight line to the start point" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_nonempty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonempty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle function with invalid 'a' score of rgba works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgba_a">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-6.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are not drawn for transparent fill patterns" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_pattern_transparent_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if create a cone at behind" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_cone_behind">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.behind.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if  fillStyle parses solid rgba" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgba_1solid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() method draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_fill_destination_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle parse invalid 2 hex number" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_2hex">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn by using globalCompositeOperation" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_composite_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillRect is affected by clipping regions" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillRect_clip">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.clip.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="chek if the pattern can be diaplayed correctly when repeating vertical only" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_repeaty_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method does not affect the current path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.path.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check composite operation 'source-over'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_source_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() function does not affect pixels outside the clip region" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_destination_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check rect zero with height and width works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_zero_height_width">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  if the user agent can display the winding correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_fill_winding_add">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.add.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fill" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if function fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_fill_source_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can displayed the solid with globalCompositeOperation = source-atop correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_source_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns transparent black outside the canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_source_outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.outside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas12" type="js">
+      <testcase purpose="Check if lineJoin 'bevel' is rendered correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_join_bevel">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.bevel.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if font size parses percentage" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_font_parse_size_percentage">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the text can be displayed correctly as setting font as basic values" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_font_parse_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillText method does not start a new path or subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_fill_unaffected">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.unaffected.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the user agent can display the winding correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_fill_winding_subtract_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fill" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are not drawn for transparent parts of fill patterns" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_pattern_transparent_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the text can be displayed correctly with complex font settings" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_font_parse_complex">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.complex.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalAlpha" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_globalAlpha_canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvas.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalAlpha" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if invalid fillstyle can be displayed correctly after setting the rgb(255.0, 0, 0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgb_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearRect draws shadows" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_clearRect_shadow">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.shadow.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check fillStyle parses html4" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_html4">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.html4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed successfully after repeaded both x and y" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_repeat_coord_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  if fill function overlaps" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_fill_overlap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.overlap.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fill" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(100%, 0, 0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgb_four">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle paser with hsla works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsla_2clamp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Highly scaled arcs are the right shape" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_2scale">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage of a canvas with no context draws pixels as (0,0,0,0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_nocontext_destination_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if transform function with skewy matrix transforms correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_transform_skewed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.skewed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="transform" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-transform</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn for strokes" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_stroke_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ImageData.data can be modified" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_object_set">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.set.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-data</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if translate with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_translate_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="translate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-translate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Line caps are not drawn at the corners of an unclosed rectangle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_line_cap_closed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.closed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the scaled imange can be displayed correctly with quadraticCurveTo(0, -1, 1.2, 1.05)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_quadraticCurveTo_scaled">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.scaled.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="quadraticCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-quadraticcurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill()  affect pixels outside the clip region." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.copy.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting the hsl" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hsl_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with rgba clamped works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgba_1clamp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the existence of 2D context method" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="2d_getcontext_exists">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.exists.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with the start circle outside the end circle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_2outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed after repeaded both x and y" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_repeat_coord1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'source-in'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_source_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image pattern can be displayed corrctly with rgb(0% ,100% ,0%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgb_percent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-percent.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Linear gradient transforms do not experience broken caching effects" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_linear_3transform">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if create a new clipping region by clip() method successfully" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_clip_basic_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() with all points on a line, and P0 between P1/P2, draws a straight line to P1" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_collinear_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle function with pattern of 'no-repeat' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_norepeat_coord2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns values in the range [0, 255]" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_range">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.range.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(sw, sh) works for sizes much larger than the canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_create2_large">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.large.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getContext('2d') returns objects which share canvas state" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_getcontext_shared">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.shared.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage function draws pixels and is not covered by the source object as (0,0,0,0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_image_destination_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() with negative radius throws INDEX_SIZE_ERR" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can displayed invalid fillstyle correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_invalidtype">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidtype.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() exists and returns something" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="2d_imageData_get_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the value of composite operation default" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_operation_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Canvas patterns do not get flipped when painted" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_orientation_canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.canvas.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(255, 0, 0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_rgba_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Zero-leight line segments from rect and strokeRect are removed before stroking" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_prune_rect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.rect.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the text can be displayed correctly with font default settings" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_font_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check shadows are not drawn for transparent images" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_image_1transparent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn correctly for partially-transparent canvases" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_canvas_alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.alpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'source-atop'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_canvas_source_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if path.lineTo.nextpoint works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_lineTo_nextpoint">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nextpoint.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="lineTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-lineto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting fillStyle = hsl(120, 100%, -200%)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsl_clamp_four">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns leftmost columns first" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_order_cols">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.cols.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createLinearGradient() and createRadialGradient() return objects implementing CanvasGradient" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_object_return">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.return.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="addColorStop" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if paint pattern with 'no-repeat' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_norepeat_outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.outside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method is not affected by globalCompositeOperation" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_globalcomposite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalcomposite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if  fillStyle function with hsla works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsla_4clamp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData(getImageData(...), ...) has no effect" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unchanged.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(0%,100%,0%,0.499)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgba_percent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-percent.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_shape_five" priority="P2" purpose="Check if arc() from 0 to 5pi does not draw crazy things" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="arc" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas13" type="js">
+      <testcase purpose="Check if negative dimensions do not affect the direction of the image" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_negativedir">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedir.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(sw, sh) takes the absolute magnitude of the size arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_create2_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if cone with createRadialGradient can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_radial_cone_shape_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createRadialGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createradialgradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Transformations are applied while building paths, not drawing" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_transformation_multiple">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.multiple.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="translate" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-translate</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with assertSame(globalAlpha(default), 1.0, &quot;globalAlpha(default)&quot;, &quot;1.0&quot;)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_globalAlpha_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.default.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalAlpha" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalalpha</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createPattern with undefined works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_repeat_undefined">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.undefined.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check shadows are drawn correctly for scaled images" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_image_scale">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.scale.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokes lines are skewed by the current transformation matrix" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_skew">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.skew.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle parse invalid colour number does not range [0, 255]" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_rgb_5clamp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-5.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method stack depth is not unreasonably limited" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_stackdepth">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stackdepth.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() puts image data from createImageData() onto the canvas" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_created">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.created.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after repeating the image outside of the image" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_repeat_outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.outside.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if empty subpaths are not stroked" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if  the first control point is added when there is no subpath" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_quadraticCurveTo_ensuresubpath_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="quadraticCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-quadraticcurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method is affected by clipping regions" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_clip">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.clip.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly after setting fillStyle = 'hsl(0, 0, 50%)'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hsl_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are drawn when shadowOffsetY is set" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_enable_y">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.y.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetY" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsety</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method of 0x0 pixels draws nothing, including caps and joins" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_2zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if shadows are not drawn when only shadowColor is set" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_enable_off">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if setTransform() with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_setTransform_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="setTransform" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-settransform</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'source-atop'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_source_atop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-atop.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns A in the fourth component" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_order_alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.alpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method affects the current transformation matrix" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_transformation">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.transformation.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check modify pattern 'no-repeat'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_modify_image1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns an ImageData object containing a CanvasPixelArray object" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are not drawn for transparent gradient fills" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_gradient_transparent_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if a transparent image can be displayed correctly with globalCompositeOperation = 'source-in" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_source_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  if the rect with width=0 can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_width_zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if putImageData() with zero-sized dirty rectangle puts nothing" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_put_dirty_zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="putImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-putimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() does not draw anything from P1 to P2" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_shape_end">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.end.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be diaplayed correclty with globalCompositeOperation = 'over';" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_operation_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getImageData() returns bigger ImageData for bigger source rectangle" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_get_source_size">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.size.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-getimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage.9arg.sourcesize works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_9arg_sourcesize">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcesize.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillRect  affects the current path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillRect_path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.path.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase purpose="Check if createLinearGradient() throws NOT_SUPPORTED_ERR with infinite arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_linear_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>-->
+      <testcase purpose="Check if the text can be displayed correctly after setting text.draw.fontface" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_fontface">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="font" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-font</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() draws a full circle when end = start + 2pi+e and anticlockwise" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_twopie_three">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can displayed the solid with globalCompositeOperation = source-out correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_source_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with fillStyle = 'TrAnSpArEnT';" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_TrAnSpArEnT">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check fillStyle pattern with 'repeat'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_repeat_coord2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(sw, sh) works for sizes smaller than one pixel" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_create2_tiny">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.tiny.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill with winding subtract" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_fill_winding_1subtract">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fill" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fill</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the solid can be displayed correclty as globalCompositeOperation = 'xor'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_solid_xor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.xor.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arcTo() draws a straight line to P1 if P1 = P2" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_coincide_tow">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearRect of negative sizes works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_clearRect_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Stroke line widths are scaled successfully by the current transformation matrix" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_stroke_scale_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="stroke" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroke</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalCompositeOperation = copy" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.copy.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillText method works on @font-face fonts" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_text_draw_fill_maxWidth_fontface">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.fontface.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check rect function with zero width and height works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_rect_zero_width_height">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="rect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-rect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the clip.winding can be displayed successfully" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_clip_winding_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can displayed transparent image with globalCompositeOperation = destination-out correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_destination_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  if Shadows can be offset with negative y" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_offset_negativeY">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeY.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetY" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsety</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if transform function with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_transformation_transform_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="transform" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-transform</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are not drawn for transparent parts of gradient fills" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_gradient_transparent_two">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  drawImage function with 3 arguments" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_3arg">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.3arg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fill() does not affect pixels outside the clip region." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_clip_destination_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method of 0x0 pixels draws nothing" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_zero_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_isPointInPath_bigarc" priority="P2" purpose="Check if isPointInPath() works on unclosed arcs larger than 2pi" status="approved" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bigarc.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="isPointInPath" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correcly after repeatting a nullsuffix pattern." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.pattern.repeat.nullsuffix">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.nullsuffix.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correcly after repeatting a unrecognisednull pattern." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.pattern.repeat.unrecognisednull">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognisednull.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas14" type="js">
+      <testcase purpose="Check if the empty clip can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_clip_empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clip" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clip</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage() of an APNG draws the poster frame" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_animated_poster">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.poster.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the first control point is added (and nothing is drawn up to it)  when there is no subpath," type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arcTo_ensuresubpath_radius">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the incomplete empty 'drawimage' image can be displayed correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_image_incomplete_empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with hsl works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_hsl_3clamp">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-3.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check quadraticCurveTo with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_quadraticCurveTo_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="quadraticCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-quadraticcurveto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if lineTo() with Infinity/NaN is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_lineTo_nonfinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nonfinite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="lineTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-lineto</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check invalid shadowOffset of shadow attributes" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_attributes_shadowOffset_invalid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetX" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsetx</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if createImageData(sw, sh) returns transparent black data of the right size" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_imageData_create_two_initial">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.initial.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createImageData" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createimagedata</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'source-over'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_source_over">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-over.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Shadows are not drawn for areas outside image source rectangles" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_image_section">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.section.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage with composite 'destination-over' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_composite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.composite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage with composite 'source-out' works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_image_source_out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-out.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if user agent can display transparent image with globalCompositeOperation = destination-in correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_transparent_destination_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if arc() with zero radius draws a line to the start point" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_arc_zeroradius">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zeroradius.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arc" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arc</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage draws pixels and is not covered by the source object as (0,0,0,0)" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_composite_uncovered_image_destination_in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-in.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if it can be displayed correctly with fillStyle = 'hsla(0%, 100%, 50%, 1) invalid hsla" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_hsla_one">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-1.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if addColorStop method works with alpha argument" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_interpolate_alpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.alpha.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="addColorStop" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if currentColor is computed when the attribute is set, not painted" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_current_changed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.changed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check  if Shadows are not drawn for transparent parts of images" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_image_transparent_part_of_image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if drawImage is affected by transforms" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_drawImage_transform">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.transform.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if shadows are drawn for stroke caps" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_stroke_2cap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the shadow can be displayed correctly as shadowOffset=initial values" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_attributes_shadowOffset_initial">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.initial.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowOffsetX" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowoffsetx</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if Image patterns do not get flipped when painted" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_pattern_paint_orientation_image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.image.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createPattern" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createpattern</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if clearRect is affected by globalCompositeOperation" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_clearRect_globalcomposite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalcomposite.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="clearRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-clearrect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillStyle with invalid rgba works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_fillStyle_parse_invalid_2rgba">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-2.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="fillStyle" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-fillstyle</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if strokeRect() method of negative sizes works" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_strokeRect_negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if save()/restore() method does not affect the current path" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_state_saverestore_path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.path.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="save" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-save</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed correclty after setting an initial shadow color" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_shadow_attributes_shadowColor_initial">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.initial.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowColor" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowcolor</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the image can be displayed with vertical gradient" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_gradient_interpolate_vertical">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.vertical.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if it can be displayed correctly with closePath empty" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d_path_closePath_empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.empty.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="closePath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-closepath</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that ctx.globalCompositeOperation is not changed when set to nullsuffix" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.composite.operation.nullsuffix">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.nullsuffix.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the drawImage method when the image is broken" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.drawImage.broken">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.broken.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the drawImage method when the image is not available. Error should be thrown" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.drawImage.errorCheck">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.errorCheck.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the drawImage method with image is empty string" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.drawImage.incomplete.emptysrc">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.emptysrc.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the drawImage method with image is no src" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.drawImage.incomplete.nosrc">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.nosrc.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the drawImage method with image is reload" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.drawImage.incomplete.reload">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.reload.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the drawImage method with image src is removed" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.drawImage.incomplete.removedsrc">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.removedsrc.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="drawImage" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-drawimage</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that window.CanvasGradient exists and has the right properties" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="2d.gradient.object.type">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="addColorStop" interface="CanvasGradient" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that ImageData.data rounds numbers with round-to-zero" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.imageData.object.round">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.round.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="data" interface="ImageData" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-data</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that setting lineCap to invalid values is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.line.cap.invalid">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that setting lineJoin to invalid values is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.line.join.invalid">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineJoin" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linejoin</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that isPointInPath() handles transformations correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.path.isPointInPath.transform.4">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="isPointInPath" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-ispointinpath</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that strokeRect of Nx0 pixels draws a closed line with no caps" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.strokeRect.zero.4">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.4.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeRect" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-strokerect</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that setting textAlign to invalid values is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.text.align.invalid">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.align.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textAlign" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textalign</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that setting textBaseline to invalid values is ignored" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.text.baseline.invalid">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.invalid.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="textBaseline" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-textbaseline</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that the 2D context interface is a property of 'window'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="2d.type.exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.exists.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that the interface methods can be added" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.type.extend">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.extend.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that the interface methods can be overridden" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.type.replace">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.replace.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the type of canvas.getContext('2d') is CanvasRenderingContext2D" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P1" id="canvas_getContext_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas_getContext_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="getContext" interface="HTMLCanvasElement" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html?path=1_6_3_2_0#the-canvas-element</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_height_type" priority="P2" purpose="Check if the type of canvas.height is 'number'" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the type of canvas.height is 'number'</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_height_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="height" element_type="attribute" interface="HTMLCanvasElement" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_toDataURL_jpeg" priority="P1" purpose="Check if the toDataURL with image/jpeg returns a jpeg" status="ready" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas_toDataURL_jpeg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="toDataURL" element_type="method" interface="HTMLCanvasElement" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_attributes" priority="P1" purpose="Test CanvasRenderingContext interface" status="ready" type="compliance" subcase="2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas_attributes.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="ellipse" element_type="method" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2dcontext/#dom-context-2d-ellipse</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="textmetrics_width_type" priority="P2" purpose="Check if the type of textmetrics.width is number" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the type of textmetrics.width is number</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/textmetrics_width_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="width" element_type="attribute" interface="TextMetrics" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-width</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_width_reflect_value" priority="P2" purpose="Check if canvas.width get the width value" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if canvas.width get the width value</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_reflect_value.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="width" element_type="attribute" interface="HTMLCanvasElement" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="imagedata_width_200px" priority="P2" purpose="Check if the value of imagedata.width is 200px" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the value of imagedata.width is 200px</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_width_200px.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="width" element_type="attribute" interface="ImageData" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-width</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_globalCompositeOperation_modes" priority="P1" purpose="Check if the canvas supports the blending modes" status="ready" type="compliance">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas_globalCompositeOperation_modes.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="globalCompositeOperation" element_type="attribute" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2dcontext/#dom-context-2d-globalcompositeoperation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="textmetrics_width_readonly" priority="P2" purpose="Check if textmetrics.width is readonly" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if textmetrics.width is readonly</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/textmetrics_width_readonly.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="width" element_type="attribute" interface="TextMetrics" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-textmetrics-width</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_height_reflect_value" priority="P2" purpose="Check if canvas.height get the height value" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if canvas.height get the height value</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_height_reflect_value.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="height" element_type="attribute" interface="HTMLCanvasElement" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvasgradient_addColorStop_exsit" priority="P2" purpose="Check if canvasgradient.addColorStop is exists" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if canvasgradient.addColorStop is exists</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_exsit.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="addColorStop" element_type="method" interface="CanvasGradient" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-canvasgradient-addcolorstop</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_width_type" priority="P2" purpose="Check if the type of canvas.width is 'number'" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the type of canvas.width is 'number'</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="width" element_type="attribute" interface="HTMLCanvasElement" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvasgradient_addColorStop_INDEX_SIZE_ERR" priority="P3" purpose="Test CanvasGradient.addColorStop() INDEX_SIZE_ERR" status="approved" type="compliance" subcase="4">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the offset is less than 0, greater than 1, infinite, or NaN, then an INDEX_SIZE_ERR exception must be raised</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_INDEX_SIZE_ERR.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" interface="CanvasGradient" section="Graphics" specification="HTML5 The canvas element" usage="true"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasgradient</spec_url>
+            <spec_statement>If the offset is less than 0, greater than 1, infinite, or NaN, then an INDEX_SIZE_ERR exception must be raised</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_width_new_value" priority="P2" purpose="Check if canvas.width is set,the bitmap and any associated contexts must be cleared back to their initial state" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if canvas.width is set,the bitmap and any associated contexts must be cleared back to their initial state</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_new_value.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="width" element_type="attribute" interface="HTMLCanvasElement" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas2d_globalCompositeOperation_invalid_value" priority="P3" purpose="Check if globalCompositeOperation is set to a invalid value,then the value must be ignored" status="approved" type="compliance">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if globalCompositeOperation is set to a invalid value,then the value must be ignored</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_invalid_value.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element" usage="true"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+            <spec_statement>On setting, if the user agent does not recognize the specified value, it must be ignored, leaving the value of globalCompositeOperation unaffected.</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas2d_lineWidth_default_value" priority="P2" purpose="Check if the default value of canvas2d.lineWidth is 1" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the default value of canvas2d.lineWidth is 1</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_default_value.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="lineWidth" element_type="attribute" interface="CanvasRenderingContext2D" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linewidth</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_height_new_value" priority="P2" purpose="Check if canvas.height is set,the bitmap and any associated contexts must be cleared back to their initial state" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if canvas.height is set,the bitmap and any associated contexts must be cleared back to their initial state</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_height_new_value.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="height" element_type="attribute" interface="HTMLCanvasElement" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_toDataURL_type" priority="P2" purpose="Check if the type of canvas.toDataURL is 'function'" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the type of canvas.toDataURL is 'function'</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_toDataURL_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="toDataURL" element_type="method" interface="HTMLCanvasElement" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="imagedata_height_100px" priority="P2" purpose="Check if the value of imagedata.height's is 100px" status="approved" type="compliance">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the value of imagedata.height's is 100px</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_height_100px.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion category="Tizen W3C API Specifications" element_name="height" element_type="attribute" interface="ImageData" section="Graphics" specification="HTML5 The canvas element"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-height</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="window.CanvasRenderingContext2D is Configurable" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="2d.type.delete">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.delete.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+    <set name="Canvas15" type="js">
+      <testcase purpose="Check if Coordinate space goes from top-left to bottom-right" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P3" id="2d_coordinatespace">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.coordinatespace.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#canvasrenderingcontext2d</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if CSS-scaled canvases get drawn correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d.scaled">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.scaled.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillText respects Right-To-Left Override characters" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d.text.draw.fill.rtl">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.rtl.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the square value of lineCap means that a rectangle with the length of the line width and the width of half the line width, placed flat against the edge perpendicular to the direction of the line, must be added at the end of each line." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_linestyles_linecap_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_linestyles_linecap_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="lineCap" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-linecap</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the createLinearGradient method of CanvasRenderingContext2D interface." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_colorsandstyles_createlineargradient_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_createlineargradient_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the arcTo method of CanvasRenderingContext2D interface." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_complexshapes_arcto_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_arcto_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="arcTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-arcto</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the bezierCurveTo method of CanvasRenderingContext2D interface." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_complexshapes_beziercurveto_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_beziercurveto_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="bezierCurveTo" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-beziercurveto</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the globalCompositeOperation attribute of CanvasRenderingContext2D interface." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_compositing_globalcompositeoperation_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_compositing_globalcompositeoperation_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="globalCompositeOperation" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-globalcompositeoperation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the createLinearGradient method of CanvasRenderingContext2D interface." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_shadows_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the restore method of CanvasRenderingContext2D interface." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_state_restore_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_state_restore_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="restore" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-restore</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if ignore 'inherit' property-independent style sheet syntax without assigning a new font value." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_text_font_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_text_font_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="canvas" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-canvas</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check the scale method of CanvasRenderingContext2D interface." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_transformations_scale_001">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_transformations_scale_001.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="scale" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-scale</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the strokeText method can draw stroked text" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d_text_draw_stroke_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroketext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the stroked and filled texts have same kerning exactly." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d_text_draw_kern_consistent">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.kern.consistent.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="strokeText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-stroketext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the fillText method  can draw filled text" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d_text_draw_fill_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.basic.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillText method can handle maxWidth correctly when it is set to 0." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d_text_draw_fill_maxWidth_zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.zero.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillText method can handle maxWidth correctly when it is set to 'small'." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d_text_draw_fill_maxWidth_small">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.small.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if Shadows look correct for large blurs" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d_shadow_blur_high">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.blur.high.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="shadowBlur" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-shadowblur</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if fillText function can handle maxWidth correctly" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d_text_draw_fill_maxWidth_large">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.large.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the type of textmetrics.width is number" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="textmetrics_width_type">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the type of textmetrics.width is number</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/textmetrics_width_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="width" interface="TextMetrics" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-imagedata-width</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the type of canvas.width is 'number'" type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" priority="P2" id="canvas_width_type">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc>Check if the type of canvas.width is 'number'</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_type.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="attribute" element_name="width" interface="HTMLCanvasElement" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-html5-20120329/the-canvas-element.html#the-canvas-element</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="fillText handles maxWidth correctly." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="2d.text.draw.fill.maxWidth.negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.negative.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="fillText" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-filltext</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Shadows must be drawn for images." type="compliance" status="approved" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" priority="P2" id="canvas_shadows_002">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_002.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion element_type="method" element_name="createLinearGradient" interface="CanvasRenderingContext2D" specification="HTML5 The canvas element (Partial)" section="Graphics" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-2dcontext-20120329/#dom-context-2d-createlineargradient</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
+  </suite>
+</test_definition>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/tests.xml b/common/tct-canvas-html5-tests/tests.xml
new file mode 100644 (file)
index 0000000..247b913
--- /dev/null
@@ -0,0 +1,4979 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
+<test_definition>
+  <suite name="tct-canvas-html5-tests" category="W3C/HTML5 APIs">
+    <set name="Canvas1" type="js">
+      <testcase purpose="Check if ellipse() correctly draws the ellipse." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasPathMethods_ellipse">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method ellipse() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasPathMethods_ellipse_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if ellipse() method throws exception when argument is missing." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasPathMethods_ellipse_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_misarg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if ellipse() correctly draws the ellipse with anticlockwise." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasPathMethods_ellipse_with_anticlockwise">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasPathMethods_ellipse_with_anticlockwise.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--      <testcase purpose="Check if addHitRegion() correctly adds hit region." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_addHitRegion">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method addHitRegion() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_addHitRegion_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if addHitRegion() method throws exception when argument is missing." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasRenderingContext2D_addHitRegion_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_addHitRegion_misarg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if clearHitRegions() correctly clears hit region." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_clearHitRegions">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method clearHitRegions() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_clearHitRegions_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check using clearHitRegions() with extra argument." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_clearHitRegions_extra_argument">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_clearHitRegions_extra_argument.html</test_script_entry>
+        </description>
+      </testcase>-->
+      <testcase purpose="Check if createImageData() correctly creates image data." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_createImageData">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method createImageData() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_createImageData_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if createImageData() method throws exception when argument is missing." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasRenderingContext2D_createImageData_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_createImageData_misarg.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--      <testcase purpose="Check if attribute currentTransform of CanvasRenderingContext2D exists, has type object." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_currentTransform_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_currentTransform_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute direction of CanvasRenderingContext2D exists, has type string." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_direction_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_direction_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute filter of CanvasRenderingContext2D exists, has type string." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_filter_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_filter_attribute.html</test_script_entry>
+        </description>
+      </testcase>-->
+      <testcase purpose="Check if getContextAttributes() correctly gets context attributes." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_getContextAttributes">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method getContextAttributes() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_getContextAttributes_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check using getContextAttributes() with extra argument." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_getContextAttributes_extra_argument">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_getContextAttributes_extra_argument.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute imageSmoothingEnabled of CanvasRenderingContext2D exists, has type boolean." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_imageSmoothingEnabled_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_imageSmoothingEnabled_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--      <testcase purpose="Check if isContextLost() method shows whether context is lost." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_isContextLost">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method isContextLost() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_isContextLost_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check using isContextLost() with extra argument." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_isContextLost_extra_argument">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isContextLost_extra_argument.html</test_script_entry>
+        </description>
+      </testcase>-->
+      <testcase purpose="Check if isPointInStroke() correctly returns whether point is in stroke." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_isPointInStroke">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method isPointInStroke() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_isPointInStroke_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if isPointInStroke() method throws exception when argument is missing." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasRenderingContext2D_isPointInStroke_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_misarg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if isPointInStroke() correctly returns whether point is in stroke with path." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_isPointInStroke_with_path">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_isPointInStroke_with_path.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--      <testcase purpose="Check if clearHitRegions() correctly removes hit region." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_removeHitRegion">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method removeHitRegion() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_removeHitRegion_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if removeHitRegion() method throws exception when argument is missing." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="CanvasRenderingContext2D_removeHitRegion_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_removeHitRegion_misarg.html</test_script_entry>
+        </description>
+      </testcase>-->
+      <testcase purpose="Check if resetTransform() correctly resets transform." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_resetTransform">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method resetTransform() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_resetTransform_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check using resetTransform() with extra argument." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_resetTransform_extra_argument">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_resetTransform_extra_argument.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--      <testcase purpose="Check if scrollPathIntoView() correctly scrolls path into view." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_scrollPathIntoView">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method scrollPathIntoView() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="CanvasRenderingContext2D_scrollPathIntoView_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if scrollPathIntoView() correctly scrolls path into view with path." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_scrollPathIntoView_with_path">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_scrollPathIntoView_with_path.html</test_script_entry>
+        </description>
+      </testcase>-->
+      <testcase purpose="Check if attribute webkitImageSmoothingEnabled of CanvasRenderingContext2D exists, has type boolean." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="CanvasRenderingContext2D_webkitImageSmoothingEnabled_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/CanvasRenderingContext2D_webkitImageSmoothingEnabled_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--      <testcase purpose="Check if toBlob() correctly callbacks a Blob object." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="HTMLCanvasElement_toBlob">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if method toBlob() exists." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P0" id="HTMLCanvasElement_toBlob_exist">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if toBlob() method throws exception when argument is missing." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P2" id="HTMLCanvasElement_toBlob_misarg">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_misarg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if toBlob() correctly callbacks a Blob object with type." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="HTMLCanvasElement_toBlob_with_arguments">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/HTMLCanvasElement_toBlob_with_arguments.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute region of MouseEvent exists, has type string." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="MouseEvent_region_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/MouseEvent_region_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute actualBoundingBoxAscent of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_actualBoundingBoxAscent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxAscent_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute actualBoundingBoxDescent of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_actualBoundingBoxDescent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxDescent_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute actualBoundingBoxLeft of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_actualBoundingBoxLeft_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxLeft_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute actualBoundingBoxRight of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_actualBoundingBoxRight_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_actualBoundingBoxRight_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute alphabeticBaseline of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_alphabeticBaseline_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_alphabeticBaseline_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute emHeightAscent of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_emHeightAscent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_emHeightAscent_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute emHeightDescent of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_emHeightDescent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_emHeightDescent_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute fontBoundingBoxAscent of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_fontBoundingBoxAscent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxAscent_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute fontBoundingBoxDescent of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_fontBoundingBoxDescent_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_fontBoundingBoxDescent_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute hangingBaseline of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_hangingBaseline_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_hangingBaseline_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if attribute ideographicBaseline of TextMetrics exists, has type double." component="W3C_HTML5 APIs/Graphics/Canvas" execution_type="auto" priority="P1" id="TextMetrics_ideographicBaseline_attribute">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/TextMetrics_ideographicBaseline_attribute.html</test_script_entry>
+        </description>
+      </testcase>-->
+      <testcase purpose="Check the type of attribute and method in CanvasRenderingContext2D interface" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_attributes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_attributes.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if the imagedata.data is readonly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="imagedata_data_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_data_readonly.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check the imagedata.data's type" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="imagedata_data_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_data_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if the imagedata.width is readonly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="imagedata_width_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_width_readonly.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check the imagedata.width's type" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="imagedata_width_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_width_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if the imagedata.height is readonly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="imagedata_height_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_height_readonly.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check the imagedata.height's type" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="imagedata_height_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/imagedata_height_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if the TextMetrics.width is readonly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="textmetrics_width_readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/textmetrics_width_readonly.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvasgradient.addColorStop is exists" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvasgradient_addColorStop_exsit">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_exsit.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if the color cannot be parsed as a CSS clolor value, then a SyntaxError exception must be thrown." component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvasgradient_addColorStop_SYNTAX_ERR">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_SYNTAX_ERR.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createLinearGradient works normal" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_createLinearGradient_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createPattern works normal" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_createPattern_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_createPattern_basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createRadialGradient works normal" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_createRadialGradient_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.createRadialGradient return CanvasGradient" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_createRadialGradient_return_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_return_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowBlur default value is 0" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_shadowBlur_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowOffsetX default value is 0" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_shadowOffsetX_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowOffsetY default value is 0" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_shadowOffsetY_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.shadowColor default value is black" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_shadowColor_default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.drawFocusIfNeeded with element object works normaly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_drawFocusIfNeeded_element">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_element.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.drawFocusIfNeeded existed" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_drawFocusIfNeeded_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_drawFocusIfNeeded_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.getlinedash works normaly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_getlinedash_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.getlinedash existed" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="Canvas Test: canvas2d_getlinedash_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineDashOffset exists" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_lineDashOffset_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineDashOffset type is number" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_lineDashOffset_type">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.lineDashOffset is writable" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_lineDashOffset_value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_lineDashOffset_value.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.measureText works normaly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_measureText_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_measureText_basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.setlinedash works normaly" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_setlinedash_basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.setlinedash existed" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_setlinedash_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if CanvasPattern exists" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="CanvasPattern_exist">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/CanvasPattern_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.getlinedash method return type is object" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_getlinedash_checktype">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_getlinedash_checktype.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.setlinedash method return type is undefined" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_setlinedash_checktype">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_setlinedash_checktype.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.textAlign default value is start" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_textAlign_defaultvalue">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_textAlign_defaultvalue.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if canvas2d.textBaseline default value is alphabetic" component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_textBaseline_defaultvalue">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_defaultvalue.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.create1.basic" purpose="Check if createImageData(imgdata) exists and returns something">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="type.exists" purpose="Check if HTMLCanvasElement is a property of window">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.exists.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_transform_multiply" purpose="Check if transform() multiplies the CTM">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.multiply.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_basic_canvas" purpose="Check fillStyle with pattern of canvas works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.canvas.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_fill_closed_basic" purpose="Check if fill function works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_rotate_direction" purpose="Check if the image can be displayed correctly with the rotate()-clockwise">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.direction.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_canvas" purpose="Check if can draw a image of canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.canvas.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_linear_transform_one" purpose="Check if Linear gradient coordinates are relative to the  coordinates pace at the time of filling">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_basic" purpose="Check if strokeRect() method works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_bezierCurveTo_basic" purpose="Check if can add the given point to the current subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_beginPath" purpose="Check beginPath() method works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.beginPath.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_scale_basic" purpose="Check if scale method works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_union" purpose="Check strokes in opposite directions are union, not subtracted">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.union.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_basic" purpose="Check if rect function works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillRect_basic" purpose="Check if  fillRect function works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_fill_maxWidth_bound" purpose="Check if fillText method handles maxWidth based on line size, not bounding box size">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.bound.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_3transform" purpose="Check if Radial gradient transformations do not experience broken caching effects">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_measure_width_basic" purpose="Check if the image can be displayed correctly with measureText.width setted as basic values">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_1basic" purpose="check if whether isPointInPath() detects the point is inside the path or not">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_closePath_newline" purpose="Check if closePath.newline works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.newline.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_translate_basic" purpose="Check if translate method works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_quadraticCurveTo_basic" purpose="Check if quadraticCurveTo function works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_default" purpose="Check if the default value of arc() when missing last argument is clockwise">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_clip_basic_one" purpose="Check if clip() method creates a new clipping region ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_basic" purpose="Check if clearRect clears all pixels on the canvas in the given rectangle to transparent black">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_moveTo_basic" purpose="Check if image can be displayed correctly with basic setting of moveTo()">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_bitmap" purpose="Check if save()/restore() affect the current bitmap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.bitmap.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_5arg" purpose="Check drawImage function with five arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.5arg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_setTransform_multiple" purpose="Check if setTransform() with multiple values can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.multiple.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_9arg_basic" purpose="Check drawImage function  with nine arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_basic_image" purpose="Check if fillStyle with image pattern works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.image.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_scale" purpose="Check if arcTo scales the curve, not just the control points">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.scale.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_lineTo_basic" purpose="Check if image can be displayed correctly with basic setting of lineTo()">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_stroke_unaffected" purpose="Check if strokeText method does not start a new path or subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.unaffected.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_arcTo_exist" purpose="Check if canvas2d.arcTo exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_arcTo_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_arc_exist" purpose="Check if canvas2d.arc exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_arc_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_beginPath_exist" purpose="Check if canvas2d.beginPath exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_beginPath_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_bezierCurveTo_exist" purpose="Check if canvas2d.bezierCurveTo exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_bezierCurveTo_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_canvas_exist" purpose="Check if canvas2d.canvas exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_canvas_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_clearRect_exist" purpose="Check if canvas2d.clearRect exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_clearRect_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_clip_exist" purpose="Check if canvas2d.clip exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_clip_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_closePath_exist" purpose="Check if canvas2d.closePath exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_closePath_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_createLinearGradient_exist" purpose="Check if canvas2d.createLinearGradient exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_createLinearGradient_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_createPattern_exist" purpose="Check if canvas2d.creatPattern exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_createPattern_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_createRadialGradient_exist" purpose="Check if canvas2d.createRadialGradient exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_createRadialGradient_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_drawImage_exist" purpose="Check if canvas2d.drawImage exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_drawImage_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_fillRect_exist" purpose="Check if canvas2d.fillRect exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_fillRect_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_fillStyle_exist" purpose="Check if canvas2d.FillStyle exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_fillStyle_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_fillText_exist" purpose="Check if canvas2d.fillText exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_fillText_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_fill_exist" purpose="Check if canvas2d.fill exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_fill_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_font_exist" purpose="Check if canvas2d.font exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_font_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_getImageData_exist" purpose="Check if canvas2d.getImageData exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_getImageData_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_globalAlpha_exist" purpose="Check if canvas2d.globalAlpha exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_globalAlpha_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_globalCompositeOperation_exist" purpose="Check if canvas2d.globalCompositeOperation exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_isPointInPath_exist" purpose="Check if canvas2d.isPointInPath exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_isPointInPath_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_lineCap_exist" purpose="Check if canvas2d.lineCap exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineCap_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_lineJoin_exist" purpose="Check if canvas2d.lineJoin exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineJoin_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_lineTo_exist" purpose="Check if canvas2d.lineTo exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineTo_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_lineWidth_exist" purpose="Check if canvas2d.lineWidth exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_measureText_exist" purpose="Check if canvas2d.measureText exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_measureText_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.type.prototype" purpose="Check if prototype are not Writable and not Configurable, and its methods are Configurable">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.prototype.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="context.arguments.missing" purpose="Check if arguments of context is missing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.arguments.missing.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="historical" purpose="Check if probablySupportsContext and probablySupportsContext are not supported">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/historical.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="drawFocusIfNeeded_002" purpose="This test uses drawFocusIfNeeded does nothing if the element is not in focus but comparing ImageData from before and after.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_002.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="drawFocusIfNeeded_003" purpose="This test uses drawFocusIfNeeded does nothing if the element is not a descendant but comparing ImageData from before and after.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/drawFocusIfNeeded_003.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="imagesmoothing_1" purpose="When the CanvasRenderingContext2D object is created, the attribute must be set to true.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/imagesmoothing.html?total_num=3&amp;locator_key=id&amp;value=1</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="imagesmoothing_2" purpose="On getting the imageSmoothingEnabled attribute, the user agent must return the last value it was set to.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/imagesmoothing.html?total_num=3&amp;locator_key=id&amp;value=2</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="imagesmoothing_3" purpose="On setting the imageSmoothingEnabled attribute, it must be set to the new value.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/imagesmoothing.html?total_num=3&amp;locator_key=id&amp;value=3</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas2" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_miterLimit_exist" purpose="Check if canvas2d.miterLimit exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_miterLimit_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_moveTo_exist" purpose="Check if canvas2d.moveTo exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_moveTo_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_putImageData_exist" purpose="Check if canvas2d.putImageData exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_putImageData_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_quadraticCurveTo_exist" purpose="Check if canvas2d.quadraticCurveTo exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_quadraticCurveTo_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_rect_exist" purpose="Check if canvas2d.rect exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_rect_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_restore_exist" purpose="Check if canvas2d.restore exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_restore_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_rotate_exist" purpose="Check if canvas2d.rotate exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_rotate_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_save_exist" purpose="Check if canvas2d.save exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_save_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_scale_exist" purpose="Check if canvas2d.scale exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_scale_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_setTransform_exist" purpose="Check if canvas2d.setTransform exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_setTransform_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_shadowBlur_exist" purpose="Check if canvas2d.shadowBlur exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowBlur_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_shadowColor_exist" purpose="Check if canvas2d.shadowColor exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowColor_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_shadowOffsetX_exist" purpose="Check if canvas2d.shadowOffsetX exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetX_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_shadowOffsetY_exist" purpose="Check if canvas2d.shadowOffsetY exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_shadowOffsetY_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_strokeRect_exist" purpose="Check if canvas2d.strokeRect exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_strokeRect_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_strokeStyle_exist" purpose="Check if canvas2d.strokeStyle exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_strokeStyle_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_strokeText_exist" purpose="Check if canvas2d.strokeText exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_strokeText_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_stroke_exist" purpose="Check if canvas2d.stroke exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_stroke_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_textAlign_exist" purpose="Check if canvas2d.textAlign exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_textAlign_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_textBaseline_exist" purpose="Check if canvas2d.textBaseline exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_textBaseline_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_transform_exist" purpose="Check if canvas2d.transform exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_transform_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas2d_translate_exist" purpose="Check if canvas2d.translate exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_translate_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas_height_exist" purpose="Check if canvas.height exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_height_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas_toDataURL_exist" purpose="Check if canvas.toDataURL exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_toDataURL_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas_width_exist" purpose="Check if canvas.width exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="imagedata_data_exist" purpose="Check if imagedata.data exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_data_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="imagedata_height_exist" purpose="Check if imagedata.height exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_height_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="imagedata_width_exist" purpose="Check if imagedata.width exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_width_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="textmetrics_width_exist" purpose="Check if textmetrics.width exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/textmetrics_width_exist.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.whitespace" purpose="Check that parse non-negative integers in setAttribute if set width='rntx0c100'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.whitespace.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.trailingjunk" purpose="Check that parse non-negative integers in setAttribute if set width=' 100#!?'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.trailingjunk.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.plus" purpose="Check that parse non-negative integers in setAttribute if set width='+100px'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.plus.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.percent" purpose="Check that parse non-negative integers in setAttribute if set width='100%'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.percent.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.octal" purpose="Check that parse non-negative integers in setAttribute if set width='0100'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.octal.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.minus" purpose="Check that parse non-negative integers in setAttribute if set width='-100'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.minus.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.junk" purpose="Check that parse non-negative integers in setAttribute if set width='#!?'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.junk.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.hex" purpose="Check that parse non-negative integers in setAttribute if set width='0x100'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.hex.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.exp" purpose="Check that parse non-negative integers in setAttribute if set width='100e1'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.exp.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.empty" purpose="Check that parse non-negative integers in setAttribute if set width=''">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.em" purpose="Check that parse non-negative integers in setAttribute if set width='100em'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.em.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.decimal" purpose="Check that parse non-negative integers in setAttribute if set width='100.999'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.decimal.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.trailingjunk" purpose="Check if width='100#!?' can be set as a canvas control value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.trailingjunk.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.space" purpose="Check if the width with space can be set as a canvas control value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.space.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.plus" purpose="Check if width='+100' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.plus.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.percent" purpose="Check if width='100%' can be set as a canvas control value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.percent.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.onlyspace" purpose="Check if width='  ' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.onlyspace.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.octal" purpose="Check if width='0100' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.octal.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.minus" purpose="Check if width='-100' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.minus.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.junk" purpose="Check if width='#!?' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.junk.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.hex" purpose="Check if width='0x100' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.hex.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.exp" purpose="Check if width='100e1' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.exp.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.empty.html" purpose="Check if width='' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.em" purpose="Check if width='100em' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.em.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.decimal" purpose="Check if width='100.999' can be set as a canvas control value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.decimal.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.idl.set.zero" purpose="Check if width/height IDL attributes can be set to 0">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.set.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.idl" purpose="Check if can get/set width/height IDL attributes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.idl.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.get" purpose="Check if can get width/height IDL/content attributes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.get.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.default" purpose="Check if it is default width/height when attributes are missing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.onlyspace" purpose="Parsing of non-negative integers in setAttribute">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.onlyspace.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas3" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.arguments.2" purpose="Check that toDataURL ignores extra arguments if set the three parameters">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="initial.reset.2dstate" purpose="Check the value of initial.reset.2dstate">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.2dstate.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="initial.reset.clip" purpose="Check the value of initial.reset.clip">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.clip.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="initial.reset.different" purpose="Check the value of initial.reset.different">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.different.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="initial.reset.gradient" purpose="Check the value of initial.reset.gradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.gradient.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="initial.reset.path" purpose="Check the value of initial.reset.path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.path.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="initial.reset.pattern" purpose="Check the value of initial.reset.pattern">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.pattern.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="initial.reset.same" purpose="Check the value of initial.reset.same">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.same.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="initial.reset.transform" purpose="Check the value of initial.reset.transform">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.reset.transform.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_object_readonly" purpose="Check if ImageData objects' properties are read-only">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.readonly.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_object_properties" purpose="Check if ImageData objects have the right properties">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.properties.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_defaults" purpose="Check if user agent can display the line with default sets correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.defaults.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_canvas_reference" purpose="Check if CanvasRenderingContext2D.canvas refers back to its canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.canvas.reference.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_cross" purpose="Check if the cross line can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cross.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_canvas_readonly" purpose="Check if CanvasRenderingContext2D.canvas is readonly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.canvas.readonly.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_object_ctor" purpose="Check if ImageData does not have a usable constructor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.ctor.html</test_script_entry>
+        </description>
+        </testcase> -->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas_colorsandstyles_addcolorstop_001" purpose="Check the addColorStop method of CanvasGradient interface.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_addcolorstop_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas_complexshapes_ispointInpath_001" purpose="Check the isPointInPath attribute of CanvasRenderingContext2D interface.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_ispointInpath_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_align_center" purpose="Check if textAlign center is in the center of the em squares (not the bounding box)">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.center.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_align_left" purpose="Check if textAlign left is on the left of the first em square">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.left.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_align_end_rtl" purpose="Check if textAlign end with rtl is the left edge">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.rtl.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_align_end_ltr" purpose="Check if the textAlign end with ltr is the right edge">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.end.ltr.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_width_basic" purpose="Check if lineWidth can determine the width of line strokes">
+        <description>
+          <test_script_entry test_script_expected_result="actual output is the same with expected result, check if it's acceptable with your eyes.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_align_start_ltr" purpose="Check if textAlign start with ltr is the left edge">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.ltr.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_align_start_rtl" purpose="Check if textAlign start with rtl is the right edge">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.start.rtl.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_align_right" purpose="Check if textAlign right is on the right of the last em square (not the bounding box)">
+        <description>
+          <test_script_entry test_script_expected_result="check if Text's horizontal position aligned with description in at http://www.w3.org/TR/2dcontext/#dom-context-2d-filltext.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.align.right.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_width_transformed" purpose="Check if line stroke widths are affected by scale transformations">
+        <description>
+          <test_script_entry test_script_expected_result="actual output is the same with expected result, check if it's acceptable with your eyes.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.transformed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.create1.initial" purpose="Check if createImageData(imgdata) returns transparent black data of the right size">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.initial.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.create1.type" purpose="Check if createImageData(imgdata) returns an ImageData object containing a CanvasPixelArray object">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.create2.type" purpose="Check if createImageData(sw, sh) returns an ImageData object containing a CanvasPixelArray object">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.getcontext.unique" purpose="Check if getContext('2d') returns the same object">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.unique.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.transformation.scale.zero" purpose="Check if scale() with a scale factor of zero works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.voidreturn" purpose="Check if void methods return undefined">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.voidreturn.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="type.replace" purpose="Check if HTMLCanvasElement methods can be replaced, and the replacement methods are used by canvases">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.replace.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="type.name" purpose="Check if the type.name is HTMLCanvasElement">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.name.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="type.extend" purpose="Check if HTMLCanvasElement methods can be added, and the new methods are used by canvases">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.extend.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.zerosize" purpose="Check if toDataURL on zero-size canvas returns 'data:,'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerosize.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.unrecognised" purpose="Check if toDataURL with an unhandled type returns a PNG">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.unrecognised.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.png.primarycolours" purpose="Check if toDataURL with PNG handles simple colours correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.primarycolours.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.png" purpose="Check if toDataURL with image/png returns a PNG">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="toDataURL.png.complexcolours" purpose="Check if toDataURL with PNG handles non-primary and non-solid colours correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.png.complexcolours.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.nocontext" purpose="Check if toDataURL works before any context has been got">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.nocontext.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.lowercase.unicode" purpose="Check if toDataURL type is ASCII-case-insensitive">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.unicode.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.lowercase.ascii" purpose="Check if toDataURL type is case-insensitive">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.lowercase.ascii.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.jpeg.quality.outsiderange" purpose="Check if toDataURL with JPEG handles out-of-range quality parameters">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.outsiderange.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.jpeg.quality.notnumber" purpose="Check if toDataURL with JPEG handles non-numeric quality parameters">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.notnumber.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.jpeg.quality.basic" purpose="Check if toDataURL with JPEG uses the quality parameter">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.quality.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.jpeg.primarycolours" purpose="Check if toDataURL with JPEG handles simple colours correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.primarycolours.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.jpeg.alpha" purpose="Check if toDataURL with JPEG composites onto black">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpeg.alpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.default" purpose="Check if toDataURL with no arguments returns a PNG">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arcTo_shape_curve_two" purpose="Check if the arcTo() method curves in the right kind of shape">
+        <description>
+          <test_script_entry test_script_expected_result="actual output is the same with expected result, check if it's acceptable with your eyes.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arcTo_shape_curve_one" purpose="check if arcTo() curves in the right kind of shape">
+        <description>
+          <test_script_entry test_script_expected_result="actual output is the same with expected result, check if it's acceptable with your eyes.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="security.pattern.canvas.timing.sub" purpose="Pattern safety depends on whether the source was origin-clean, not on whether it still is clean">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/security.pattern.canvas.timing.sub.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="security.pattern.create.sub" purpose="Creating an unclean pattern does not make the canvas origin-unclean">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/security.pattern.create.sub.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.jpg" purpose="toDataURL with image/jpg is invalid type hence returns a PNG">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.jpg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.zeroheight" purpose="toDataURL on zero-size canvas returns 'data:,'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.zeroheight.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.zerowidth" purpose="toDataURL on zero-size canvas returns 'data:,'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.zerowidth.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="type.delete" purpose="window.HTMLCanvasElement interface object is [[Configurable]]">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.delete.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="type.prototype" purpose="window.HTMLCanvasElement has prototype, which is { ReadOnly, DontDelete }. prototype has getContext, which is not">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/type.prototype.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.create1.this" purpose="createImageData(imgdata) should throw when called with the wrong |this|.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.this.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.create1.zero" purpose="createImageData(null) throws TypeError.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create1.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.create2.this" purpose="createImageData(sw, sh) should throw when called with the wrong |this|.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.this.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas4" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.bogustype" purpose="Check if toDataURL with a syntactically invalid type returns a PNG">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.bogustype.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.arguments.3" purpose="Check if toDataURL ignores extra arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="toDataURL.arguments.1" purpose="Check that toDataURL ignores extra arguments if set the two parameters">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/toDataURL.arguments.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.style" purpose="Check if Canvas size is independent of CSS resizing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.style.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.zero" purpose="Check that parse of non-negative integers in setAttribute if set width='0px'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.setAttribute.space" purpose="Check that parsing of non-negative integers in setAttribute if set width=' 100px'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.setAttribute.space.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.removed" purpose="Check if removing content attributes reverts to default size">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.removed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.reflect.setidlzero" purpose="Check if setting IDL attributes to 0 updates IDL and content attributes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidlzero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.reflect.setidl" purpose="Check if setting IDL attributes updates IDL and content attributes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setidl.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.reflect.setcontent" purpose="Check if setting content attributes updates IDL and content attributes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.reflect.setcontent.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.zero" purpose="Check if width='0' can be set as a canvas control value ">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="size.attributes.parse.whitespace" purpose="Check if the width with widthspace can be set as a canvas control value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/size.attributes.parse.whitespace.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.wrongtype" purpose="Check if incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.wrongtype.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.pattern.image.string" purpose="Check if the createPattern of interface is CanvasRenderingContext2D.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.string.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="context.casesensitive" purpose="Check if the value is context.casesensitive">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.casesensitive.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="context.emptystring" purpose="Check if the value is context.emptystring">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.emptystring.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="context.unrecognised.badname" purpose="Check if the value is context.unrecognised.badname">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badname.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="context.unrecognised.badsuffix" purpose="Check if the value is context.unrecognised.badsuffix">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.badsuffix.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="context.unrecognised.nullsuffix" purpose="Check if the value is context.unrecognised.nullsuffix">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.nullsuffix.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="context.unrecognised.unicode" purpose="Check if the value is context.unrecognised.unicode">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/context.unrecognised.unicode.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="fallback.basic" purpose="Check if the value is fallback.basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/fallback.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="fallback.multiple" purpose="Check if the value is fallback.multiple">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/fallback.multiple.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="fallback.nested" purpose="Check if the value is fallback.nested">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/fallback.nested.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="initial.colour" purpose="Check if the value is initial.colour">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/initial.colour.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsla_one" purpose="Check if the fillstyle can be displayed correctly after setting hsla(120, 100%, 50%, 0.499)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_composite_destination_out" purpose="Check if areas outside shadows are drawn correctly with destination-out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_join_miter" purpose="Check if lineJoin 'miter' is rendered correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.miter.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgba_four" purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(255, 0, 0, 100%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_destination_over" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation ='destination-over'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.state.saverestore.fillStyle" purpose="Check if save()/restore() method works for fillStyle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.fillStyle.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_transformation_basic" purpose="Check if the value is transformation basic">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_enable_blur" purpose="Check that shadows are drawn if shadowBlur is set">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.blur.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_linewidth" purpose="Check if save()/restore() method works for lineWidth">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineWidth.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_rotate_zero" purpose="Check if rotate() by 0 does nothing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_angle_three" purpose="Check if arc() wraps angles mod 2pi when anticlockwise and end greater than start+2pi">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_object_clamp" purpose="Check if ImageData.data wraps numbers modulo 256">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.clamp.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_2alpha" purpose="Check if shadow colour alpha components are used">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgba_three" purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(100%, 0, 0, 1)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_underflow" purpose="Check if restore() with an empty stack has no effect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.underflow.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_stroke_join" purpose="Check if Shadows drawn for stroke joins can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_interpolate_multiple" purpose="Check if the image can be displayed correctly with multiple gradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.multiple.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_svg_gray" purpose="Check if the image can be displayed correctly with fillStyle = 'gray'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_interpolate_2overlap" purpose="Check if the image can be displayed successfully with overlap gradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_xor" purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'xor'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.xor.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_lighter" purpose="Check if fill() affects pixels outside the clip region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.lighter.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_current_basic" purpose="Check if currentColor is computed from the canvas element">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_strokeStyle" purpose="Check if save()/restore() method works for strokeStyle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.strokeStyle.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_image_alpha" purpose="Check if Shadows are drawn correctly for partially-transparent images">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.alpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_dirty_negative" purpose="Check if putImageData() handles negative-sized dirty rectangles correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_inside_three" purpose="Check if image can be displayed correctly after setting the createRadialGradient's value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_globalAlpha_imagepattern" purpose="Check if imagepattern with composite globleAlpha works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.imagepattern.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_linear_transform_two" purpose="Check if Linear gradient coordinates are relative to the coordinated space at the time of the filling">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_baseline_valid" purpose="Check if baseline with valid value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.valid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_ensuresubpath" purpose="Check if the first control point is added when there is not any subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_destination_in" purpose="Check if fill() function affects pixels outside the clip region.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_name_four" purpose="Check if the image can be displayed correctly with fillstyle=invalid name">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_union" purpose="Check if union is two line">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.union.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_globalAlpha_fill" purpose="Check if globalAlpha.fill can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.fill.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="security.dataURI" purpose="Check if URIs is not counted as different-origin, and do not taint the canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/security.dataURI.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.pattern.image.incomplete.emptysrc" purpose="Check  createPattern() with empty image source.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.emptysrc.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.pattern.image.incomplete.immediate" purpose="Check  createPattern() with immediate image.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.immediate.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.pattern.image.incomplete.nosrc" purpose="Check  createPattern() with no image source.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.nosrc.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.pattern.image.incomplete.reload" purpose="Check  createPattern() with reload image.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.reload.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.pattern.image.incomplete.removedsrc" purpose="Check  createPattern() with reload image.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.incomplete.removedsrc.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.pattern.image.null" purpose="Check  createPattern() with null image.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.null.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas5" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgba_4solid" purpose="Check if fillStyle parse rgba solid">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_nonfinite" purpose="Check if rect with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_source_over" purpose="Check if user agent can display transparent image with globalCompositeOperation = source-over correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_nonfinite" purpose="Check if putImageData() throws NOT_SUPPORTED_ERR if arguments are not finite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.nonfinite.html</test_script_entry>
+        </description>
+        </testcase>-->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgb_r" purpose="Check if fillStyle function parse invalid red score of rgb">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_invalidstring" purpose="Check if invalid string filestyle can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidstring.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_1end" purpose="Check if the value is rect path end">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgba_num_two" purpose="Check if the image can be displayed correctly with fillStyle = rgba(0,  255,  0,  0.499)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_modify_canvas1" purpose="Check if it is pattern modify canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_join_valid" purpose="Check if setting lineJoin to valid values works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.valid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_animated_gif" purpose="Check if drawImage function of an animated GIF draws the first frame">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.gif.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_globalAlpha_range" purpose="Check if the value is composite globalAlpha range">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.range.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_cap_open" purpose="Check if Line caps are drawn at the corners of an unclosed rectangle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.open.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_pattern_source_out" purpose="Check if Pattern fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_current_removed" purpose="Check if currentColor is solid black when the canvas element is not in a document">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.removed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_destination_in" purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'destination-in'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_arc" purpose="Check if isPointInPath() works on arcs">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.arc.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_enable_x" purpose="Check that Shadows are drawn if shadowOffsetX is set">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.x.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_setTransform_skewed" purpose="Check if setTransform method works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.skewed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_object_compare" purpose="Check the different of two gradient object">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.compare.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsla_clamp_five" purpose="Check if the image can be displayed correctly after setting fillStyle = 'hsla(120, 100%, 50%, 2)'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_clip_two" purpose="Check if Shadows are not drawn outside the clipping region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_destination_over" purpose="Check composite with 'destination-over'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_attributes_shadowColor_invalid" purpose="Check if the image can be displayed correclty after setting an invalid shadow color">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_attributes_shadowOffset_valid" purpose="Check if the shadow can be displayed correctly as shadowOffset=valid values">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.valid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_overlap" purpose="Check if Stroked subpaths are combined before being drawn">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.overlap.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_newsubpath" purpose="Check if the rect can be displayed correctly with newsubpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.newsubpath.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsl_three" purpose="Check if the image can be displayed correctly after setting the hsl(360120, 100%, 50%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_repeat_null" purpose="Check if the image can be displayed correcly after repeatting a null pattern">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.null.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_lighter" purpose="Check if a transparent image can be displayed correctly with globalCompositeOperation = 'lighter'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.lighter.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_fill_winding_3subtract" purpose="Check fill with winding subtract">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_fontface_repeat" purpose="Check if draw with the fontface">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.repeat.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_moveTo_nonfinite" purpose="Check if moveTo() with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_negative" purpose="Check if arcTo() with negative radius throws an exception">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_get_semitransparent" purpose="Check if the semitransparent image can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.semitransparent.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_closePath_nextpoint" purpose="Check if linkto nextpoint after closePath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.nextpoint.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_get_transparent" purpose="Check if fillStyle.get.transparent works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.transparent.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_moveTo_multiple" purpose="Check if image can be displayed correctly with moveTo() multiple setted">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.multiple.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_object_undefined" purpose="Check if ImageData.data converts undefined to 0">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.undefined.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_create2_round" purpose="Check if createImageData(w, h) is rounded the same as getImageData(0, 0, w, h)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.round.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_getcontext_extraargs" purpose="Check if 2D context ignores extra getContext arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.extraargs.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_zero" purpose="Check if clearRect of zero pixels has no effect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_cone_cylinder" purpose="Check if create a cone in cylinder">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.cylinder.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_negativesource" purpose="Check if Negative source width/height represents the correct rectangle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativesource.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillRect_nonfinite" purpose="Check if fillRect function with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_attributes_shadowBlur_initial" purpose="Check if shadowBlur with shadow attributes works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.initial.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_rotate_wrapnegative" purpose="Check if rotate() wraps large negative values correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrapnegative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_font_parse_size_percentage_default" purpose="Check if font method parse size percentage by default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_zero" purpose="Check if getImageData() throws INDEX_SIZE_ERR if size is zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_angle_angles" purpose="Check if arc() wraps angles mod 2pi when clockwise and start greater than end+2pi">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_shadowColor" purpose="Check if save()/restore() method works for shadowColor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowColor.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgba_num_one" purpose="Check if fillStyle parses rgba number">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-num-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_cross" purpose="Check if putImageData() accepts image data got from a different canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.cross.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_source_in" purpose="Check if draw image with composite 'source-in' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_cone_front" purpose="Check if can create a cone at front">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.front.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_lineCap" purpose="Check if save()/restore() method works for lineCap">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineCap.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_measure_width_empty" purpose="Check if empty string has zero width">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.measure.width.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_dirty_rect_one" purpose="Check if putImageData() only modifies areas inside the dirty rectangle, using width and height">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_zero_width_6" purpose="Check if the image can be displayed correctly after setting the rect's width=0">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.6.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_2hsla" purpose="Check if fillStyle function with hsla works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.fillStyle.parse.current.notrendered" purpose="currentColor is computed from the canvas element even when element is not rendered.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.notrendered.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas6" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_miter_obtuse" purpose="Check if Miter joins are drawn correctly with obtuse angles">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.obtuse.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgb_clamp_three" purpose="Check if the image can be displayed correctly with Assumes colours clamped to [0,255] after setting the rgb(-2147483649, 4294967298, -18446744073709551619)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_selfintersect_two" purpose="Check if arc() method with lineWidth greater than 2*radius can draw sensibly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_lighter" purpose="Check drawImage with composite 'lighter'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.lighter.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_inside_two" purpose="Check if the image can be displayed with end circle inside the start circle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_interpolate_solid" purpose="Check interpolate gradient with createLinearGradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.solid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_5hex" purpose="Check if fillStyle parse invalid 5 hex numbers">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hex_three" purpose="Check if the image can be displayed correctly set fillstyle as hex(fillStyle = '#0f0';)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_interpolate_overlap" purpose="Check if the image can be displayed correctly with overlap gradient;">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.overlap.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_space_basic" purpose="Check if U+0020 is rendered the correct size (1em wide)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_object_crosscanvas" purpose="Check if crosscanvas gradient can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.crosscanvas.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_unaffected" purpose="Check if getImageData() is not affected by context state">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.unaffected.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_touch_two" purpose="Check if the image can be displayed with start circle touching end circle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsl_six" purpose="Check if the image can be displayed correctly after setting the hsl(+120, +100%, +50%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-6.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_animated_apng" purpose="Check if drawImage() of an APNG with no poster frame draws the first frame">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.apng.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_alpha_three" purpose="Check if Shadows are affected by globalAlpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_operation_unrecognised" purpose="Check composite operation unrecognised">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.unrecognised.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_name_red" purpose="Check if fillStyle with invalid name '&quot;red' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_alpha_globalAlpha" purpose="Check if Shadows with alpha components are correctly affected by globalAlpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_linemiter_invalid" purpose="Check if Setting miterLimit to invalid values is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_basic_nocontext" purpose="Check pattern_basic_nocontext">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.nocontext.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgb_clamp_four" purpose="Check if the image can be displayed correctly with Assumes colours clamped to [0,255] after setting the rgb">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_width_leight_zero" purpose="Check if the rect with leight, width=0 can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgb_six" purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgb(255, - 1, 0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-6.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_destination_atop" purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'destination-atop'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_fill_copy" purpose="Check if fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.copy.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_get_solid" purpose="Check if fillStyle.get.solid works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.get.solid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_path" purpose="Check if putImageData() does not affect the current path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.path.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_edge" purpose="Check if isPointInPath() counts points on the path as inside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.edge.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_clip" purpose="Check if  clearRect function is affected by clipping regions">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.clip.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_unaffected" purpose="Check if Stroking starts a new path or subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.unaffected.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_miterLimit" purpose="Check if save()/restore() method works for miterLimit">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.miterLimit.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_stroke_1cap" purpose="Check if shadows are not drawn for areas outside stroke caps">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_prune_line" purpose="Check if Zero-leight line segments from lineTo are removed before stroking">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.line.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_tiny" purpose="Check if getImageData() works for sizes smaller than one pixel">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.tiny.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_modified" purpose="Check if putImageData() puts modified image data correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.modified.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_path" purpose="Check if clearRect affects the current path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.path.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_nonpremul" purpose="Check if getImageData() returns non-premultiplied colours">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonpremul.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_nonfinite" purpose="Check if arcTo() with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_name_firebrick1" purpose="Check if fillStyle with invalid name 'firebrick1' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_alpha" purpose="Check if the image can be displayed correctly with globalAlpha=0">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.alpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hex_one" purpose="Check if the image van be displayed correctly after setting the fillstyle as an invalid hex number">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_transformation_changing" purpose="Check if the transformations are applied while building paths, not drawing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.changing.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.state.saverestore.shadowOffsetX" purpose="Check if save()/restore() method works for shadowOffsetX">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetX.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_transform_two" purpose="Check if isPointInPath() handles transformations correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_source_atop" purpose="Check if fill function does not affect pixels outside the clip region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hex6" purpose="Check if the image van be displayed correctly after setting the fillstyle with six invalid hex numbers">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex6.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillRect_negative" purpose="Check if fillRect of negative sizes works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgb_seven" purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgb(255, 0, 0, 1)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-7.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_shadowBlur" purpose="Check if save()/restore() method works for shadowBlur">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowBlur.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_system" purpose="Check if the image can be displayed correctly with fillStyle = 'ThreeDDarkShadow'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.system.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_basic_zerocanvas" purpose="Check if the canvas can be displayed correctly with 'pattern' width=0/leight=0/width=leight=0">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.zerocanvas.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_source_out" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'source-out'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillRect_shadow" purpose="Check if fillRect draws shadows">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.shadow.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_destination_atop" purpose="Check if fill() method does not affect pixels outside the clip region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_lighter" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'lighter'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.lighter.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_clip_1" purpose="Check shadows of clipped shapes are still drawn within the clipping region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_quadraticCurveTo_shape" purpose="Check if the quadraticCurveTo_shape works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.shape.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_moveTo_newsubpath" purpose="Check if image can be displayed correctly with moveTo() newsubpath setted">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.moveTo.newsubpath.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_scale_one" purpose="Check if Non-uniformly scaled arcs are the right shape">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.put.null" purpose="putImageData() with null imagedata throws TypeError.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.null.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.put.wrongtype" purpose="putImageData() does not accept non-ImageData objects.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.wrongtype.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas7" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_twopie_one" purpose="Check if arc() draws nothing when end = start + 2pi-e and anticlockwise">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_lineTo_ensuresubpath_one" purpose="Check if the point is added and nothing is drawn when there is no subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_clip_unaffected" purpose="Check if clip is unaffected">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.unaffected.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_source_over" purpose="Check if fill does not affect pixels outside the clip region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_transform_one" purpose="Check if radial gradient coordinates are relative to the coordinated space at the time of filling">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_dirty_outside" purpose="Check if putImageData() handles dirty rectangles outside the canvas correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.outside.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_order" purpose="Check if transformations are applied in the right order">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.order.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_image_incomplete_omitted" purpose="Check if the incomplete(omitted) drawImange image can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.omitted.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_alpha" purpose="Check if putImageData() puts non-solid image data correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.alpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_nonfinite" purpose="Check if strokeRect() method with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_miter_valid" purpose="Check if setting miterLimit to valid values works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.valid.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_create_two_nonfinite" purpose="Check if createImageData() throws NOT_SUPPORTED_ERR if arguments are infinite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.nonfinite.html</test_script_entry>
+        </description>
+        </testcase>-->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_xor" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'xor'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.xor.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_cone_beside" purpose="Check if can create a cone beside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.beside.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_shape_start" purpose="Check if arcTo() draws a straight line from P0 to P1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.start.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_cone_top" purpose="Check if fillStyle works with radial gradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.top.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_join_closed" purpose="Check if Line joins are drawn at the corner of a closed rectangle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.closed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_zero_one" purpose="Check if arc() draws nothing when startAngle = endAngle and anticlockwise">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_globalAlpha_image" purpose="Check if the image can be displayed correctly with globalAlpha = 0.01">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.image.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_touch_three" purpose="Check if the image can be displayed successfully with start circle touching end circle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeStyle_default" purpose="Check if the image can be displayed correctly with strokeStyle setted as default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeStyle.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_textAlign" purpose="Check if save()/restore() method works for textAlign">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textAlign.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_source_negative" purpose="Check if getImageData() works with negative width and height, and returns top-to-bottom left-to-right">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_image_undefined" purpose="Check if the undefined image can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.image.undefined.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_7hex" purpose="Check if fillStyle with invalid 7 hex number works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex7.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_create2_basic" purpose="Check if createImageData(sw, sh) exists and returns something">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_interpolate_colour" purpose="Check if addColorStop method with color argument works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.colour.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_destination_atop" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'destination-atop'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_zero_endAngle_clockwise" purpose="Check if arc() draws nothing when startAngle = endAngle and clockwise">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zero.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_width_scaledefault" purpose="Check if Default lineWidth strokes are affected by scale transformations">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.scaledefault.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.shadow.attributes.shadowBlur.valid" purpose="Check if valid shadowBlur of shadow attributes works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.valid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_shadow" purpose="Check if strokeRect() method draws shadows">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.shadow.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_zerosource" purpose="Check if drawImage with zero-sized source rectangle throws INDEX_SIZE_ERR">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerosource.html</test_script_entry>
+        </description>
+        </testcase>-->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_pattern_source_in" purpose="Check if Pattern method fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.source-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_scale_multiple" purpose="Check if user agent supports Multiple scale()s combined">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.multiple.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_miter_acute" purpose="Check if Miter joins are drawn correctly with acute angles">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.acute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_scale_large" purpose="Check if scale() with large scale factors works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.large.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_composite_one" purpose="Check if Shadows are drawn using globalCompositeOperation">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_stroke_join_three" purpose="Check if Shadows are drawn for stroke joins respecting miter limit">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_zero_one" purpose="Check if arcTo() with zero radius draws a straight line from P0 to P1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_dirty_rect2" purpose="Check if putImageData() only modifies areas inside the dirty rectangle, using x and y">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.rect2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_scale_one" purpose="Check if Stroke line widths are scaled by the current transformation matrix">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_miter_lineedge" purpose="Check if Miter joins are not drawn when the miter limit is exceeded at the corners of a zero-height rectangle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.lineedge.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_negative" purpose="Check if createRadialGradient() throws INDEX_SIZE_ERR with negative radius">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_join_round" purpose="Check if lineJoin 'round' is rendered correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.round.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_destination_out" purpose="Check if the solid can be displayed correctly after setting the globalCompositeOperation = destination-out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_order_rgb" purpose="Check if getImageData() returns R then G then B">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rgb.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_destination_out" purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'destination-out'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.destination-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_2shape" purpose="Check if arc() from 0 to pi draws stuff in the right half">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_cap_round" purpose="Check if lineCap 'round' is rendered correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.round.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_rotate_radians" purpose="Check if pic can be rotated correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.radians.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_clip_2winding" purpose="Check if the clip.winding can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_attributes_shadowColor_valid" purpose="Check if the image can be displayed correctly with valid shadowColor">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.valid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_scale_nonfinite" purpose="Check if if scale() with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_join_open" purpose="Check if Line joins are not drawn at the corner of an unclosed rectangle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.open.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_nocontext_source_out" purpose="Check if drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hsl_five" purpose="Check if the invalid fillstyle can be displayed correctly after setting the hsl(0, 100%, 100%, 1)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_angle_anticlockwise" purpose="Check if arc() draws pi/2 .. -pi anticlockwise correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_6angle" purpose="Check if arc() draws a full circle when anticlockwise and starts greater than end+2pi">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.6.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas8" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_prune_corner" purpose="Check if Zero-leight line segments are removed before stroking with miters">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.corner.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_interpolate_zerosize" purpose="Check if the image can be displayed with zero-length line">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_width_invalid" purpose="Check if setting lineWidth to invalid values is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsla_clamp_one" purpose="Check if the image can be displayed correctly after setting fillStyle = hsla(120, 200%, 50%, 1)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_scale_negative" purpose="Check if scale method with negative scale factors works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.scale.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_prune_closed" purpose="Check if Zero-length line segments from closed paths are removed before stroking">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.closed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_1transparent" purpose="Check if the image can be displayed correctly with fillStyle = 'transparent'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_miter_within" purpose="Check if Miter joins are drawn when the miter limit is not quite exceeded">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.within.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_source_in" purpose="Check if the solid can be displayed correctly with globalCompositeOperation = 'source-in'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_animated_gif" purpose="Check if createPattern() of an animated GIF draws the first frame">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.animated.gif.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hsl_six" purpose="Check if the invalid fillstyle can be displayed correctly after setting the hsl(0, 100.%, 50%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-6.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_create2_zero" purpose="Check if createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_collinear_one" purpose="Check if arcTo() with all points on a line, and P1 between P0/P2, draws a straight line to P1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_destination_over" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'destination-over'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_cone_shape2" purpose="Check the gradient radial cone">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_empty" purpose="Check if the image can be displayed with empty gradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_bezierCurveTo_ensuresubpath_one" purpose="Check if the first control point is added (and nothing is drawn up to it)when there is no subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_bezierCurveTo_nonfinite" purpose="Check if bezierCurveTo() with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_transformation" purpose="Check if arcTo joins up to the last subpath point correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.transformation.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_transform_identity" purpose="Check if transform() with the identity matrix does nothing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.identity.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_basic" purpose="Check if putImageData() puts image data from getImageData() onto the canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_initial" purpose="Check if the image can be displayed correctly with the initial path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.initial.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillRect_zero" purpose="Check if fillRect with zero pixels has no effect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgba_clamp_two" purpose="Check if fillStyle with rgba clamp works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_nonfinite" purpose="Check if createRadialGradient() throws NOT_SUPPORTED_ERR with infinite arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.nonfinite.html</test_script_entry>
+        </description>
+        </testcase>-->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_repeatx_outside" purpose="Check if the image can be displayed correctly when this item is set to repeatx.outside">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.outside.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_operation_get" purpose="Check get composite operation">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.get.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_source_in" purpose="Check if fill() affects pixels outside the clip region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_2transform" purpose="Check if shadow offsets are not affected by transformations">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_destination_over" purpose="Check if user agent can display transparent image with globalCompositeOperation = destination-over correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_globalAlpha_invalid" purpose="Check if globalAlpha with invalid value works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_offset_positiveY" purpose="Check if Shadows can be offset with positive y">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveY.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_closed" purpose="Check  the value of rect_closed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.closed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_lighter" purpose="Check if composite with 'lighter' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.lighter.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_source_out" purpose="Check if method fill() does not affect pixels outside the clip region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.source-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_canvas_basic" purpose="Check if Shadows are drawn for canvases">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_floatsource" purpose="Check if user agent can display the imge drawing with floatsource correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.floatsource.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_transform_one" purpose="Check if isPointInPath() method handles transformations correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_transform" purpose="Check if strokeRect() method is affected by transforms">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.transform.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_stroke_join_one" purpose="Check if Shadows are not drawn for areas outside stroke joins">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.join.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_2rgb" purpose="Check if fillStyle parse invalid rgb">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_image_copy" purpose="Check if drawImage() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.copy.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_selfintersect" purpose="Check rect function with lineWidth">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.selfintersect.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_2basic" purpose="Check if isPointInPath() method detects whether the point is inside the path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.basic.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_globalalpha" purpose="Check if clearRect is not affected by globalAlpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalalpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.state.saverestore.globalAlpha" purpose="Check if save()/restore() method works for globalAlpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalAlpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_canvas_transparent_canvases" purpose="Check if Shadows are drawn for transparent canvases">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_pattern_destination_in" purpose="Check if Pattern fill() function draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_fill_closed_unaffected" purpose="Check if the changed of border's color has no affect on the filled color">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.closed.unaffected.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hsla_two" purpose="Check if it can be displayed correctly with fillStyle = 'hsla(0, 0, 50%, 1)'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_nonfinite" purpose="Check if arc() with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_image_basic" purpose="Check if Shadows are drawn for images">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_object_string" purpose="Check if ImageData.data converts strings to numbers with ToNumber">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.string.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_width_valid" purpose="Check if setting lineWidth to valid values works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.width.valid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_gradient_basic" purpose="Check shadows are drawn for gradient fills">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsl_four" purpose="Check if the image can be displayed correctly after setting the hsl(-360240, 100%, 50%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_repeat_unrecognised" purpose="Check if the image pattern can be displayed correclty after repeating unrecognized image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognised.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_angle_full_circle" purpose="Check if arc() draws a full circle when clockwise and end is greater than start+2pi">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_angle_two" purpose="Check if arc() draws -3pi/2 .. -pi anticlockwise correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.angle.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_empty" purpose="Check if arc() with an empty path does not draw a straight line to the start point">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.gradient.interpolate.zerosize.fill" purpose="Check if the image can be displayed correctly with fill() with zerosize.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fill.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.gradient.interpolate.zerosize.fillRect" purpose="Check if the image can be displayed correctly with fillRect() with zerosize.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillRect.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d.gradient.interpolate.zerosize.fillText" purpose="Check if the image can be displayed correctly with fillText() with zerosize.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.fillText.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.gradient.interpolate.zerosize.stroke" purpose="Check if the image can be displayed correctly with stroke() with zerosize.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.stroke.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.gradient.interpolate.zerosize.strokeRect" purpose="Check if the image can be displayed correctly with strokeRect() with zerosize.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeRect.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d.gradient.interpolate.zerosize.strokeText" purpose="Check if the image can be displayed correctly with strokeText() with zerosize.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.zerosize.strokeText.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas9" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_path" purpose="Check if the drawImage.path works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.path.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_font_parse_invalid" purpose="Check if text can be displayed correctly when setting font=invalid values">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_name_darkbrown" purpose="Check if fillStyle with invalid name 'darkbrown' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_destination_atop" purpose="Check if the solid can be displayed correctly after setting globalCompositeOperation = 'copy'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_nonfinite" purpose="Check if drawImage function with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_xor" purpose="Check if drawImage with composite 'xor' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.xor.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_destination_in" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'destination-in'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_4hex" purpose="Check if fillStyle with invalid 4 hex number works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_repeat_empty" purpose="Check if the image can be displayed correcly after repeatting an empty pattern">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_nocontext_source_in" purpose="Check if method drawImage of a canvas with no context draws pixels as (0,0,0,0) and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.source-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_cap_butt" purpose="Check if lineCap 'butt' is rendered correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.butt.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgba_solid_two" purpose="Check if the solid can be displayed correctly with rgba(  0  ,  255  ,  0  ,  1.0  )">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_canvas_2transparent" purpose="Check if shadows are not drawn for transparent parts of canvases">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.transparent.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_zerocanvas" purpose="Check if the canvas can be displayed correctly with 'drawimage' width=0/leight=0/width=leight=0">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.zerocanvas.html</test_script_entry>
+        </description>
+        </testcase>-->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_5hsl" purpose="Check if the image can be displayed correctly after setting the hsl(120.0, 100.0%, 50.0%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_clip_three" purpose="Check if Shadows of clipped shapes are still drawn within the clipping region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.clip.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_6hex" purpose="Check if fillStyle with 6 hex number works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hex6.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillRect_transform" purpose="Check if fillRect function is affected by transforms">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.transform.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_negative" purpose="Check  rect with negative">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_length" purpose="Check if getImageData() returns a correctly-sized CanvasPixelArray">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.length.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_object_invalidoffset" purpose="Check if the image can be displayed with invalidoffset in addColorStop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidoffset.html</test_script_entry>
+        </description>
+        </testcase>-->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_image_source_in" purpose="Check if drawImage() method draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_prune_curve" purpose="Check if Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed before stroking">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.curve.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_9arg_destsize" purpose="Check if the image can be displayed correctly after setting the drawImage 5 times">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destsize.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_lineJoin" purpose="Check if save()/restore() method works for lineJoin">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.lineJoin.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_basic_type" purpose="Check pattern of canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.basic.type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_interpolate_outside" purpose="Check if the image can be displayed correctly with outside gradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.outside.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hex8" purpose="Check if fillStyle with 8 hex numbers works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex8.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_unaffected" purpose="Check if putImageData() is not affected by context state">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unaffected.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_outside_one" purpose="Check if the image can be displayed with the end circle outside the start circle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgb_clamp_two" purpose="Check if the image can be displayed correctly with Assumes colours clamped to [0,255] after setting the rgb(-200%, 200%, -200%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_pattern_basic" purpose="Check if Shadows are drawn for filling patterns">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_clip" purpose="Check if putImageData() is not affected by clipping regions">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.clip.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_norepeat_basic" purpose="Check if fillStyle with paint pattern 'no-repeat' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_object_update" purpose="Check if the image can be displayed when argument be updated in addColorStop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.update.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_miter_rightangle" purpose="Check if Miter joins are not drawn when the miter limit is exceeded, on exact right angles">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.rightangle.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_unclosed" purpose="Check if isPointInPath() works on unclosed subpaths">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.unclosed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_svg_grey" purpose="Check if the image can be displayed correctly with fillStyle = 'grey'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.svg-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_2hsl" purpose="Check if fillStyle function with hsl works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_operation_casesensitive" purpose="Check if the image can be diaplayed correclty with globalCompositeOperation = 'Source-over'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.casesensitive.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_rotate_wrap" purpose="Check if rotate() wraps large positive values correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.wrap.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_pattern_copy" purpose="Check if Pattern fill draws pixels and is not covered by the source object as (0,0,0,0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.copy.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_norepeat_coord_one" purpose="Check if the image can be displayed successfully with norepeat horizontal and vertical">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgba_a" purpose="Check if fillStyle function  parse invalid number">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_modify_canvas_two" purpose="Check if the canvas can be displayed correctly after modified canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.canvas2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_winding" purpose="Check if isPointInPath() uses the non-zero winding number rule">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.winding.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_destination_atop" purpose="Check if user agent can display transparent image with globalCompositeOperation = destination-atop correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_bezier" purpose="Check if isPointInPath() works on Bezier curves">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bezier.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsl_1clamp" purpose="Check if fillStyle parse with hsl works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_baseline_default" purpose="Check if the caseline can be displayed correctly with default settings">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_copy" purpose="Check if drawImage function with composite 'copy' of canvas works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.copy.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_transform_one" purpose="Check if Shadows take account of transformations">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.transform.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_globalAlpha_canvaspattern" purpose="Check if globalAlpha.canvaspattern can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvaspattern.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_offset_positiveX" purpose="Check shadows can be offset with positive x">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.positiveX.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_gradient_alpha" purpose="Check if Shadows are drawn correctly for partially-transparent gradient fills">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.alpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_enable_off_two" purpose="Check if Shadows are not drawn when only the shadowColor is set">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_clip_intersect" purpose="Check if it can be displayed correctly with clip intersecting">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.intersect.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_repeaty_outside" purpose="Check if the image can be displayed correctly when repeaty.outside is set">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.outside.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_globalalpha" purpose="Check if strokeRect() method is affected by globalAlpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalalpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_cone_bottom" purpose="Check if create a cone at bottom">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.bottom.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.null" purpose="drawImage() with null argument">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.null.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.svg" purpose="drawImage() of an SVG image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.svg.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas10" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsla_clamp_three" purpose="Check  if the image can be displayed correctly after setting fillStyle = 'hsla(120, 100%, 200%, 1)'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsl_clamp_two" purpose="Check if the image can be displayed correctly after setting fillStyle = hsl(120, -200%, 49.9%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_empty" purpose="Check if isPointInPath() works when there is no path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_twopie_four" purpose="Check if arc() draws nothing when end = start + 2pi+e and clockwise">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_repeat_case" purpose="Check if createPattern function with 'Repeat' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.case.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_clip" purpose="Check if the drawImage.clip can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.clip.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_twopie_full_circle" purpose="Check if arc() draws a full circle when end = start + 2pi-e and clockwise">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_5rgba" purpose="Check if fillStyle with invalid rgba data works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hex_three" purpose="Check if the image van be displayed correctly after setting the fillstyle as three invalid hex numbers">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_object_invalidcolour" purpose="Check if the image can be displayed with invalidcolour in addColorStop">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.invalidcolour.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_nonfinite" purpose="Check if isPointInPath() returns false for non-finite arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_touch_one" purpose="Check if the image can be displayed correctly with start circle touching end circle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.touch1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_operation_highlight" purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'highlight'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.highlight.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgb_five" purpose="Check if  fillStyle parses invalid rgb">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_outside" purpose="Check if Shadows of shapes outside the visible area can be offset onto the visible area">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.outside.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_9arg_sourcepos" purpose="Check if can draw a 2d image with 9arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcepos.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_crosscanvas" purpose="Check if crosscanvas pattern can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.crosscanvas.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_default" purpose="Check if  fillStyle function works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsl_one" purpose="Check if the image can be displayed correctly after setting the hsl(120, 100%, 50%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_zero_straight_line" purpose="Check if strokeRect() method of Nx0 pixels draws a straight line">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_modify_image_two" purpose="Check if the image can be displayed correctly after modified image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_shadowOffsetY" purpose="Check if save()/restore() method works for shadowOffsetY">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.shadowOffsetY.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_fill_source_in" purpose="Check if method fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_shape1" purpose="Check if arc() from 0 to pi does not draw anything in the wrong half">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_repeat_basic" purpose="Check if the image can be displayed correctly after repeatting the image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_shape_four" purpose="Check if arc() from 0 to -pi/2 draws stuff in the right quadrant">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgb_num" purpose="Check if fillStyle parses rgb num">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-num.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_fill_destination_in" purpose="Check if fill() function draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_font_parse_system" purpose="Check if system fonts is computed to explicit values">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.system.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_subpath" purpose="Check if isPointInPath() uses the current path, not just the subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.subpath.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_alpha_five" purpose="Check if Shadows of shapes with alpha components are drawn correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_pattern_alpha" purpose="Check if Shadows are drawn correctly for partially-transparent fill patterns">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.alpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_name_redblue" purpose="Check if  fillStyle parses invalid name 'red blue'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.name-3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_textBaseline" purpose="Check if save()/restore() method works for textBaseline">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.textBaseline.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_copy" purpose="Check if the solid can be displayed correctly after setting globalCompositeOperation = 'copy'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.copy.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_repeatx_basic" purpose="Check if the imange can be displayed correctly with createPattern(img, 'repeat-x')">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeatx.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_bezierCurveTo_scaled" purpose="Check if bezierCurveTo() method works successfully">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.scaled.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_quadraticCurveTo_ensuresubpath1" purpose="Check if there is no subpath, the first control point is added">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_pattern_destination_atop" purpose="Check if Pattern fill() method draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.pattern.destination-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_nonfinite" purpose="Check if clearRect() with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_2end" purpose="Check rect with end">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.end.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_stack" purpose="Check if save()/restore() method can be nested as a stack">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stack.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_negativedest" purpose="Check if Negative destination width/height represents the correct rectangle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedest.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_lineTo_ensuresubpath_two" purpose="Check if the point is added and used for subsequent drawing when there is no subpath,">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.ensuresubpath.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgb_1clamp" purpose="Check if fillStyle with parse rgb clamped works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_destination_in" purpose="Check if user agent can displayed the solid with globalCompositeOperation = destination-in correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.destination-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_source_out" purpose="Check the source-out">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsla_clamp_six" purpose="Check if the image can be displayed correctly after setting fillStyle = hsla(120, 100%, 0%, -2)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-6.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_space_collapse_nonspace" purpose="Check if Non-space characters are not converted to U+0020 and collapsed">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.space.collapse.nonspace.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_bezierCurveTo_ensuresubpath_two" purpose="Check if the first control point is added when there is no subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.ensuresubpath.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_7rgba" purpose="Check if fillStyle parse invalid rgba">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-7.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_outside" purpose="Check if isPointInPath() works on paths outside the canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.outside.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hsl_two" purpose="Check if the invalid fillstyle can be displayed correctly after setting the hsl(z, 100%, 50%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_alpha_one" purpose="Check if Shadow colour alpha components are used successfully">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.alpha.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_9arg_destpos" purpose="Check if the drawImage function with nine argumnets destpos works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.destpos.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_winding" purpose="Check rect with winding works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.winding.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_xor" purpose="Check if fill() method affects pixels outside the clip region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.xor.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_1inside" purpose="Check if the image can be displayed with the start circle inside the end circle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.inside1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_join_parallel" purpose="Check if Line joins are drawn at 180-degree joins">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.parallel.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.fillStyle.parse.rgb-eof" purpose="fillStyle() with rgb-eof.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-eof.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.fillStyle.parse.rgba-eof" purpose="fillStyle() with rgba-eof.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-eof.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas11" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_offset_negativeX" purpose="Check shadows can be offset with negative x">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeX.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_bezierCurveTo_shape" purpose="Check bezierCurveTo() method">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.bezierCurveTo.shape.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_destination_out" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'destination-out'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.destination-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_cap_valid" purpose="Check if Setting lineCap to valid values works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.valid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_clamp" purpose="Check if getImageData() clamps colours to the range [0, 255]">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.clamp.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_order_rows" purpose="Check if getImageData() returns topmost rows first">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.rows.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_baseline_alphabetic" purpose="Check if the text can be displayed correctly with textBaseline = 'alphabetic'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.baseline.alphabetic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_shape_three" purpose="Check if arc() from 0 to -pi/2 does not draw anything in the wrong quadrant">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_coincide_one" purpose="Check if arcTo() has no effect if P0 = P1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_2self" purpose="Check if drawImage with self works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_object_nan" purpose="Check if ImageData.data converts NaN to 0">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.nan.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_cap_square" purpose="Check if lineCap 'square' is rendered correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.square.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_source_atop" purpose="Check if fill function  affect pixels outside the transparent region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_align_default" purpose="Check if text is align by default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.align.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_copy" purpose="Check if the value is composite transparent 'copy'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.copy.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_1selfintersect" purpose="Check if arc() with lineWidth greater than 2*radius is drawn sensibly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.selfintersect.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_equal" purpose="Check if the image can be displayed with equal start circle to end circle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.equal.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_nocontext_copy" purpose="Check if drawImage() method of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.copy.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_source_over" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'source-over'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_end" purpose="Check if arc() adds the end point of the arc to the subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.end.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_attributes_shadowBlur_invalid" purpose="Check  invalid shadowBlur of shadow attributes works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowBlur.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_transform" purpose="Check if clearRect is affected by transforms">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.transform.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_miter_exceeded" purpose="Check if Miter joins are not drawn when the miter limit is exceeded">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.miter.exceeded.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_globalCompositeOperation" purpose="Check if save()/restore() method works for globalCompositeOperation">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.globalCompositeOperation.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_transform_translate" purpose="Check if radial gradient coordinates are relative to the coordinate space at the time of the filling">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.transform.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_isPointInPath_transform_scale" purpose="Check if isPointInPath() function handles transformations correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_2collinear" purpose="Check if arcTo() with all points on a line, and P2 between P0/P1, draws a straight line to P1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_align_valid" purpose="Check if the text can be displayed correctly as set the align a valid value">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.align.valid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_nocontext_destination_atop" purpose="Check if drawImage() function of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_self_one" purpose="Check if drawImage by self works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.self.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_image_source_out" purpose="Check if drawImage method draws pixels and is not covered by the source object as (0,0,0,0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.source-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_font" purpose="Check if save()/restore() method works for font">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.font.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_nowrap" purpose="Check if stretch images get pixels wrapping around the edges">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.nowrap.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_clip" purpose="Check if save()/restore() method affects the clipping path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.clip.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_nonfinite" purpose="Check if getImageData() throws NOT_SUPPORTED_ERR if arguments are not finite">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.nonfinite.html</test_script_entry>
+        </description>
+        </testcase>-->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_rotate_nonfinite" purpose="Check if rotate() with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.rotate.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_5zero" purpose="Check if strokeRect() method of Nx0 pixels draws a closed line with joins">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_2zero" purpose="Check if arcTo() with zero radius draws a straight line from P0 to P1, even when all points are collinear">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.zero.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_prune_arc" purpose="Check zero-length line segments from arcTo and arc are removed before stroking">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.arc.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_zero_width_2" purpose="Check  rect function with zero width works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_object_current" purpose="Check if the image can be displayed with current color.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.current.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hsl_four" purpose="Check if the invalid fillstyle can be displayed correctly after setting the hsl(0, 100%, 0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_nonempty" purpose="Check if arc() with a non-empty path does draw a straight line to the start point">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.nonempty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgba_a" purpose="Check if fillStyle function with invalid 'a' score of rgba works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-6.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_pattern_transparent_one" purpose="Check if Shadows are not drawn for transparent fill patterns">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_cone_behind" purpose="Check if create a cone at behind">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.behind.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgba_1solid" purpose="Check if  fillStyle parses solid rgba">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-solid-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_fill_destination_atop" purpose="Check if fill() method draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.destination-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_2hex" purpose="Check if fillStyle parse invalid 2 hex number">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hex2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_composite_two" purpose="Check if Shadows are drawn by using globalCompositeOperation">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.composite.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillRect_clip" purpose="Check if fillRect is affected by clipping regions">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.clip.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_repeaty_basic" purpose="chek if the pattern can be diaplayed correctly when repeating vertical only">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeaty.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_path" purpose="Check if strokeRect() method does not affect the current path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.path.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_source_over" purpose="Check composite operation 'source-over'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_destination_over" purpose="Check if fill() function does not affect pixels outside the clip region">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_zero_height_width" purpose="Check rect zero with height and width works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_fill_winding_add" purpose="Check  if the user agent can display the winding correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.add.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_fill_source_out" purpose="Check if function fill() draws pixels and is not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.fill.source-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_source_atop" purpose="Check if user agent can displayed the solid with globalCompositeOperation = source-atop correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_source_outside" purpose="Check if getImageData() returns transparent black outside the canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.outside.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas12" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_join_bevel" purpose="Check if lineJoin 'bevel' is rendered correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.bevel.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_font_parse_size_percentage" purpose="Check if font size parses percentage">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.size.percentage.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_font_parse_basic" purpose="Check if the text can be displayed correctly as setting font as basic values">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_fill_unaffected" purpose="Check if fillText method does not start a new path or subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.unaffected.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_fill_winding_subtract_two" purpose="Check if the user agent can display the winding correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_pattern_transparent_two" purpose="Check if Shadows are not drawn for transparent parts of fill patterns">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.pattern.transparent.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_font_parse_complex" purpose="Check if the text can be displayed correctly with complex font settings">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.parse.complex.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_globalAlpha_canvas" purpose="Check if the image can be displayed correctly with globalAlpha">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.canvas.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgb_one" purpose="Check if invalid fillstyle can be displayed correctly after setting the rgb(255.0, 0, 0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_shadow" purpose="Check if clearRect draws shadows">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.shadow.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_html4" purpose="Check fillStyle parses html4">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.html4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_repeat_coord_three" purpose="Check if the image can be displayed successfully after repeaded both x and y">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_fill_overlap" purpose="Check  if fill function overlaps">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.overlap.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgb_four" purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(100%, 0, 0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgb-4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsla_2clamp" purpose="Check if fillStyle paser with hsla works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_2scale" purpose="Check if Highly scaled arcs are the right shape">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.scale.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_nocontext_destination_in" purpose="Check if drawImage of a canvas with no context draws pixels as (0,0,0,0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.nocontext.destination-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_transform_skewed" purpose="Check if transform function with skewy matrix transforms correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.skewed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_stroke_basic" purpose="Check if Shadows are drawn for strokes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_object_set" purpose="Check if ImageData.data can be modified">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.set.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_translate_nonfinite" purpose="Check if translate with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.translate.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_line_cap_closed" purpose="Check if Line caps are not drawn at the corners of an unclosed rectangle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.closed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_quadraticCurveTo_scaled" purpose="Check if the scaled imange can be displayed correctly with quadraticCurveTo(0, -1, 1.2, 1.05)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.scaled.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_copy" purpose="Check if fill()  affect pixels outside the clip region.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.copy.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hsl_one" purpose="Check if the image can be displayed correctly after setting the hsl">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgba_1clamp" purpose="Check if fillStyle with rgba clamped works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-clamp-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_getcontext_exists" purpose="Check the existence of 2D context method">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.exists.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_2outside" purpose="Check if the image can be displayed with the start circle outside the end circle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.outside2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_repeat_coord1" purpose="Check if the image can be displayed after repeaded both x and y">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_source_in" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'source-in'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgb_percent" purpose="Check if the image pattern can be displayed corrctly with rgb(0% ,100% ,0%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-percent.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_linear_3transform" purpose="Check if Linear gradient transforms do not experience broken caching effects">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.transform.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_clip_basic_two" purpose="Check if create a new clipping region by clip() method successfully">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.basic.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_collinear_three" purpose="Check if arcTo() with all points on a line, and P0 between P1/P2, draws a straight line to P1">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.collinear.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_norepeat_coord2" purpose="Check if fillStyle function with pattern of 'no-repeat' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.coord2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_range" purpose="Check if getImageData() returns values in the range [0, 255]">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.range.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_create2_large" purpose="Check if createImageData(sw, sh) works for sizes much larger than the canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.large.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_getcontext_shared" purpose="Check if getContext('2d') returns objects which share canvas state">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.getcontext.shared.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_image_destination_atop" purpose="Check if drawImage function draws pixels and is not covered by the source object as (0,0,0,0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_negative" purpose="Check if arc() with negative radius throws INDEX_SIZE_ERR">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_invalidtype" purpose="Check if user agent can displayed invalid fillstyle correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.invalidtype.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_basic" purpose="Check if getImageData() exists and returns something">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_operation_default" purpose="Check the value of composite operation default">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_orientation_canvas" purpose="Check if Canvas patterns do not get flipped when painted">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.canvas.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_rgba_one" purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(255, 0, 0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_prune_rect" purpose="Check if Zero-leight line segments from rect and strokeRect are removed before stroking">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.prune.rect.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_font_default" purpose="Check if the text can be displayed correctly with font default settings">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.font.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_image_1transparent" purpose="Check shadows are not drawn for transparent images">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_canvas_alpha" purpose="Check if Shadows are drawn correctly for partially-transparent canvases">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.canvas.alpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_canvas_source_atop" purpose="Check if the canvas can be displayed correctly with globalCompositeOperation = 'source-atop'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.canvas.source-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_lineTo_nextpoint" purpose="Check if path.lineTo.nextpoint works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nextpoint.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsl_clamp_four" purpose="Check if the image can be displayed correctly after setting fillStyle = hsl(120, 100%, -200%)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_order_cols" purpose="Check if getImageData() returns leftmost columns first">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.cols.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_object_return" purpose="Check if createLinearGradient() and createRadialGradient() return objects implementing CanvasGradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.return.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_norepeat_outside" purpose="Check if paint pattern with 'no-repeat' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.norepeat.outside.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_globalcomposite" purpose="Check if strokeRect() method is not affected by globalCompositeOperation">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.globalcomposite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsla_4clamp" purpose="Check if  fillStyle function with hsla works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsla-clamp-4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_unchanged" purpose="Check if putImageData(getImageData(...), ...) has no effect">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.unchanged.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgba_percent" purpose="Check if the invalid fillstyle can be displayed correctly after setting the rgba(0%,100%,0%,0.499)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgba-percent.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_arc_shape_five" purpose="Check if arc() from 0 to 5pi does not draw crazy things">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.shape.5.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas13" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_negativedir" purpose="Check if negative dimensions do not affect the direction of the image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.negativedir.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_create2_negative" purpose="Check if createImageData(sw, sh) takes the absolute magnitude of the size arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_radial_cone_shape_one" purpose="Check if cone with createRadialGradient can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.radial.cone.shape1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_transformation_multiple" purpose="Check if Transformations are applied while building paths, not drawing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.transformation.multiple.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_globalAlpha_default" purpose="Check if the image can be displayed correctly with assertSame(globalAlpha(default), 1.0, &quot;globalAlpha(default)&quot;, &quot;1.0&quot;)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.globalAlpha.default.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_repeat_undefined" purpose="Check if createPattern with undefined works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.undefined.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_image_scale" purpose="Check shadows are drawn correctly for scaled images">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.scale.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_skew" purpose="Check if strokes lines are skewed by the current transformation matrix">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.skew.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_rgb_5clamp" purpose="Check if fillStyle parse invalid colour number does not range [0, 255]">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.rgb-clamp-5.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_stackdepth" purpose="Check if save()/restore() method stack depth is not unreasonably limited">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.stackdepth.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_created" purpose="Check if putImageData() puts image data from createImageData() onto the canvas">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.created.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_repeat_outside" purpose="Check if the image can be displayed correctly after repeating the image outside of the image">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.outside.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_empty" purpose="Check if empty subpaths are not stroked">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_quadraticCurveTo_ensuresubpath_two" purpose="Check if  the first control point is added when there is no subpath">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.ensuresubpath.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_clip" purpose="Check if strokeRect() method is affected by clipping regions">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.clip.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hsl_three" purpose="Check if the image can be displayed correctly after setting fillStyle = 'hsl(0, 0, 50%)'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsl-3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_enable_y" purpose="Check if Shadows are drawn when shadowOffsetY is set">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.y.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_2zero" purpose="Check if strokeRect() method of 0x0 pixels draws nothing, including caps and joins">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_enable_off" purpose="Check if shadows are not drawn when only shadowColor is set">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.enable.off.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_setTransform_nonfinite" purpose="Check if setTransform() with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.setTransform.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_source_atop" purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'source-atop'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-atop.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_order_alpha" purpose="Check if getImageData() returns A in the fourth component">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.order.alpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_transformation" purpose="Check if save()/restore() method affects the current transformation matrix">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.transformation.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_modify_image1" purpose="Check modify pattern 'no-repeat'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.modify.image1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_type" purpose="Check if getImageData() returns an ImageData object containing a CanvasPixelArray object">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_gradient_transparent_one" purpose="Check if Shadows are not drawn for transparent gradient fills">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_source_in" purpose="Check if a transparent image can be displayed correctly with globalCompositeOperation = 'source-in">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.source-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_width_zero" purpose="Check  if the rect with width=0 can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_put_dirty_zero" purpose="Check if putImageData() with zero-sized dirty rectangle puts nothing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.put.dirty.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_shape_end" purpose="Check if arcTo() does not draw anything from P1 to P2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.end.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_operation_over" purpose="Check if the image can be diaplayed correclty with globalCompositeOperation = 'over';">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_get_source_size" purpose="Check if getImageData() returns bigger ImageData for bigger source rectangle">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.get.source.size.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_9arg_sourcesize" purpose="Check if drawImage.9arg.sourcesize works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.9arg.sourcesize.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillRect_path" purpose="Check if fillRect  affects the current path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillRect.path.html</test_script_entry>
+        </description>
+      </testcase>
+      <!--excluded due to WHATWG vs WebTCT-->
+      <!--<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_linear_nonfinite" purpose="Check if createLinearGradient() throws NOT_SUPPORTED_ERR with infinite arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.linear.nonfinite.html</test_script_entry>
+        </description>
+        </testcase>-->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_fontface" purpose="Check if the text can be displayed correctly after setting text.draw.fontface">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fontface.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_twopie_three" purpose="Check if arc() draws a full circle when end = start + 2pi+e and anticlockwise">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.twopie.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_source_out" purpose="Check if user agent can displayed the solid with globalCompositeOperation = source-out correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.source-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_TrAnSpArEnT" purpose="Check if the image can be displayed correctly with fillStyle = 'TrAnSpArEnT';">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.transparent-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_repeat_coord2" purpose="Check fillStyle pattern with 'repeat'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.repeat.coord2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_create2_tiny" purpose="Check if createImageData(sw, sh) works for sizes smaller than one pixel">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.tiny.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_fill_winding_1subtract" purpose="Check if fill with winding subtract">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.fill.winding.subtract.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_solid_xor" purpose="Check if the solid can be displayed correclty as globalCompositeOperation = 'xor'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.solid.xor.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_coincide_tow" purpose="Check if arcTo() draws a straight line to P1 if P1 = P2">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.coincide.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_negative" purpose="Check if clearRect of negative sizes works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_stroke_scale_two" purpose="Check if Stroke line widths are scaled successfully by the current transformation matrix">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.stroke.scale2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_copy" purpose="Check if the image can be displayed correctly with globalCompositeOperation = copy">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.copy.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_text_draw_fill_maxWidth_fontface" purpose="Check if fillText method works on @font-face fonts">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.fontface.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_rect_zero_width_height" purpose="Check rect function with zero width and height works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.rect.zero.3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_clip_winding_one" purpose="Check if the clip.winding can be displayed successfully">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.winding.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_destination_out" purpose="Check if user agent can displayed transparent image with globalCompositeOperation = destination-out correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_offset_negativeY" purpose="Check  if Shadows can be offset with negative y">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.offset.negativeY.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_transformation_transform_nonfinite" purpose="Check if transform function with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.transformation.transform.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_gradient_transparent_two" purpose="Check if Shadows are not drawn for transparent parts of gradient fills">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.gradient.transparent.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_3arg" purpose="Check  drawImage function with 3 arguments">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.3arg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_clip_destination_out" purpose="Check if fill() does not affect pixels outside the clip region.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.clip.destination-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_zero_one" purpose="Check if strokeRect() method of 0x0 pixels draws nothing">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="2d_path_isPointInPath_bigarc" purpose="Check if isPointInPath() works on unclosed arcs larger than 2pi">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.bigarc.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.pattern.repeat.nullsuffix" purpose="Check if the image can be displayed correcly after repeatting a nullsuffix pattern.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.nullsuffix.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.pattern.repeat.unrecognisednull" purpose="Check if the image can be displayed correcly after repeatting a unrecognisednull pattern.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.repeat.unrecognisednull.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas14" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_clip_empty" purpose="Check if the empty clip can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.clip.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_animated_poster" purpose="Check if drawImage() of an APNG draws the poster frame">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.animated.poster.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arcTo_ensuresubpath_radius" purpose="Check if the first control point is added (and nothing is drawn up to it)  when there is no subpath,">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.ensuresubpath.1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_image_incomplete_empty" purpose="Check if the incomplete empty 'drawimage' image can be displayed correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.image.incomplete.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_hsl_3clamp" purpose="Check if fillStyle with hsl works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.hsl-clamp-3.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_quadraticCurveTo_nonfinite" purpose="Check quadraticCurveTo with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.quadraticCurveTo.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_lineTo_nonfinite" purpose="Check if lineTo() with Infinity/NaN is ignored">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.lineTo.nonfinite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_attributes_shadowOffset_invalid" purpose="Check invalid shadowOffset of shadow attributes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_imageData_create_two_initial" purpose="Check if createImageData(sw, sh) returns transparent black data of the right size">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.create2.initial.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_source_over" purpose="Check if the image can be displayed correctly with globalCompositeOperation = 'source-over'">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-over.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_image_section" purpose="Check if Shadows are not drawn for areas outside image source rectangles">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.section.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_composite" purpose="Check if drawImage with composite 'destination-over' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.composite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_image_source_out" purpose="Check if drawImage with composite 'source-out' works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.image.source-out.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_transparent_destination_in" purpose="Check if user agent can display transparent image with globalCompositeOperation = destination-in correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.transparent.destination-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_arc_zeroradius" purpose="Check if arc() with zero radius draws a line to the start point">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arc.zeroradius.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_composite_uncovered_image_destination_in" purpose="Check if drawImage draws pixels and is not covered by the source object as (0,0,0,0)">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.uncovered.image.destination-in.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_hsla_one" purpose="Check if it can be displayed correctly with fillStyle = 'hsla(0%, 100%, 50%, 1) invalid hsla">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.hsla-1.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_interpolate_alpha" purpose="Check if addColorStop method works with alpha argument">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.alpha.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_current_changed" purpose="Check if currentColor is computed when the attribute is set, not painted">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.current.changed.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_image_transparent_part_of_image" purpose="Check  if Shadows are not drawn for transparent parts of images">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.image.transparent.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_drawImage_transform" purpose="Check if drawImage is affected by transforms">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.transform.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_stroke_2cap" purpose="Check if shadows are drawn for stroke caps">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.stroke.cap.2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_attributes_shadowOffset_initial" purpose="Check if the shadow can be displayed correctly as shadowOffset=initial values">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowOffset.initial.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_pattern_paint_orientation_image" purpose="Check if Image patterns do not get flipped when painted">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.pattern.paint.orientation.image.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_clearRect_globalcomposite" purpose="Check if clearRect is affected by globalCompositeOperation">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.clearRect.globalcomposite.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_fillStyle_parse_invalid_2rgba" purpose="Check if fillStyle with invalid rgba works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.fillStyle.parse.invalid.rgba-2.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_strokeRect_negative" purpose="Check if strokeRect() method of negative sizes works">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_state_saverestore_path" purpose="Check if save()/restore() method does not affect the current path">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.state.saverestore.path.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_shadow_attributes_shadowColor_initial" purpose="Check if the image can be displayed correclty after setting an initial shadow color">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.attributes.shadowColor.initial.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_gradient_interpolate_vertical" purpose="Check if the image can be displayed with vertical gradient">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.interpolate.vertical.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d_path_closePath_empty" purpose="Check if it can be displayed correctly with closePath empty">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.closePath.empty.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.composite.operation.nullsuffix" purpose="Check that ctx.globalCompositeOperation is not changed when set to nullsuffix">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.composite.operation.nullsuffix.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.broken" purpose="Check the drawImage method when the image is broken">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.broken.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.errorCheck" purpose="Check the drawImage method when the image is not found. Exception should be thrown">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.errorCheck.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.incomplete.emptysrc" purpose="Check the drawImage method with image is empty string">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.emptysrc.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.incomplete.nosrc" purpose="Check the drawImage method with image is no src">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.nosrc.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.incomplete.reload" purpose="Check the drawImage method with image is reload">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.reload.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.incomplete.removedsrc" purpose="Check the drawImage method with image src is removed">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.removedsrc.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.gradient.object.type" purpose="Check that window.CanvasGradient exists and has the right properties">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.gradient.object.type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.imageData.object.round" purpose="Check that ImageData.data rounds numbers with round-to-zero">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.imageData.object.round.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.line.cap.invalid" purpose="Check that setting lineCap to invalid values is ignored">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.cap.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.line.join.invalid" purpose="Check that setting lineJoin to invalid values is ignored">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.line.join.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.path.isPointInPath.transform.4" purpose="Check that isPointInPath() handles transformations correctly">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.isPointInPath.transform.4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.strokeRect.zero.4" purpose="Check that strokeRect of Nx0 pixels draws a closed line with no caps">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.strokeRect.zero.4.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.text.align.invalid" purpose="Check that setting textAlign to invalid values is ignored">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.align.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.text.baseline.invalid" purpose="Check that setting textBaseline to invalid values is ignored">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.baseline.invalid.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.type.exists" purpose="Check that the 2D context interface is a property of 'window'">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.exists.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.type.extend" purpose="Check that the interface methods can be added">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.extend.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.type.replace" purpose="Check that the interface methods can be overridden">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.replace.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas_getContext_type" purpose="Check if the type of canvas.getContext('2d') is CanvasRenderingContext2D">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas_getContext_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_height_type" purpose="Check if the type of canvas.height is 'number'">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_height_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_globalCompositeOperation_modes" purpose="Check if the canvas supports the blending modes">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas_globalCompositeOperation_modes.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_toDataURL_type" purpose="Check if the type of canvas.toDataURL is 'function'">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_toDataURL_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_width_new_value" purpose="Check if canvas.width is set,the bitmap and any associated contexts must be cleared back to their initial state">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_new_value.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_width_reflect_value" purpose="Check if canvas.width get the width value">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_reflect_value.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_width_type" purpose="Check if the type of canvas.width is 'number'">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_toDataURL_jpeg" purpose="Check if the toDataURL with image/jpeg returns a jpeg">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas_toDataURL_jpeg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvasgradient_addColorStop_INDEX_SIZE_ERR_1" purpose="Test CanvasGradient.addColorStop() INDEX_SIZE_ERR when argument is -1">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_INDEX_SIZE_ERR.html?total_num=2&amp;locator_key=id&amp;value=1</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvasgradient_addColorStop_INDEX_SIZE_ERR_2" purpose="Test CanvasGradient.addColorStop() INDEX_SIZE_ERR when argument is 2">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_INDEX_SIZE_ERR.html?total_num=2&amp;locator_key=id&amp;value=2</test_script_entry>
+        </description>
+      </testcase>
+<!--      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvasgradient_addColorStop_INDEX_SIZE_ERR_3" purpose="Test CanvasGradient.addColorStop() INDEX_SIZE_ERR when argument is Infinity">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_INDEX_SIZE_ERR.html?total_num=4&amp;locator_key=id&amp;value=3</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvasgradient_addColorStop_INDEX_SIZE_ERR_4" purpose="Test CanvasGradient.addColorStop() INDEX_SIZE_ERR when argument is NaN">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_INDEX_SIZE_ERR.html?total_num=4&amp;locator_key=id&amp;value=4</test_script_entry>
+        </description>
+      </testcase>-->
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvasgradient_addColorStop_exsit" purpose="Check if canvasgradient.addColorStop is exists">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvasgradient_addColorStop_exsit.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_attributes_ellipse_exists" purpose="Check if the method ellipse exists">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas_attributes.html?total_num=2&amp;locator_key=id&amp;value=1</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_attributes_setLineDash_exists" purpose="Check if the method setLineDash exists">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/canvas_attributes.html?total_num=2&amp;locator_key=id&amp;value=2</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="imagedata_height_100px" purpose="Check if the value of imagedata.height's is 100px">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_height_100px.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="imagedata_width_200px" purpose="Check if the value of imagedata.width is 200px">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/imagedata_width_200px.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="textmetrics_width_readonly" purpose="Check if textmetrics.width is readonly">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/textmetrics_width_readonly.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="textmetrics_width_type" purpose="Check if the type of textmetrics.width is number">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/textmetrics_width_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas2d_globalCompositeOperation_invalid_value" purpose="Check if globalCompositeOperation is set to a invalid value,then the value must be ignored">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_globalCompositeOperation_invalid_value.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_height_new_value" purpose="Check if canvas.height is set,the bitmap and any associated contexts must be cleared back to their initial state">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_height_new_value.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas2d_lineWidth_default_value" purpose="Check if the default value of canvas2d.lineWidth is 1">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas2d_lineWidth_default_value.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML Canvas 2D Context" execution_type="auto" id="canvas_height_reflect_value" purpose="Check if canvas.height get the height value">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_height_reflect_value.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.type.delete" purpose="window.CanvasRenderingContext2D is Configurable">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.type.delete.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Canvas15" type="js">
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d_coordinatespace" purpose="Check if Coordinate space goes from top-left to bottom-right">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.coordinatespace.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d.scaled" purpose="Check if CSS-scaled canvases get drawn correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.scaled.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d.text.draw.fill.rtl" purpose="Check if fillText respects Right-To-Left Override characters">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.rtl.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_linestyles_linecap_001" purpose="Check if the square value of lineCap means that a rectangle with the length of the line width and the width of half the line width, placed flat against the edge perpendicular to the direction of the line, must be added at the end of each line.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_linestyles_linecap_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_colorsandstyles_createlineargradient_001" purpose="Check the createLinearGradient method of CanvasRenderingContext2D interface.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_colorsandstyles_createlineargradient_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_complexshapes_arcto_001" purpose="Check the arcTo method of CanvasRenderingContext2D interface.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_arcto_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_complexshapes_beziercurveto_001" purpose="Check the bezierCurveTo method of CanvasRenderingContext2D interface.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_complexshapes_beziercurveto_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_compositing_globalcompositeoperation_001" purpose="Check the globalCompositeOperation attribute of CanvasRenderingContext2D interface.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_compositing_globalcompositeoperation_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_shadows_001" purpose="Check the createLinearGradient method of CanvasRenderingContext2D interface.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_state_restore_001" purpose="Check the restore method of CanvasRenderingContext2D interface.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_state_restore_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_text_font_001" purpose="Check if ignore 'inherit' property-independent style sheet syntax without assigning a new font value.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_text_font_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_transformations_scale_001" purpose="Check the scale method of CanvasRenderingContext2D interface.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_transformations_scale_001.htm</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d_text_draw_stroke_basic" purpose="Check if the strokeText method can draw stroked text">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.stroke.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d_text_draw_kern_consistent" purpose="Check if the stroked and filled texts have same kerning exactly.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.kern.consistent.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d_text_draw_fill_basic" purpose="Check if the fillText method  can draw filled text">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.basic.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d_text_draw_fill_maxWidth_zero" purpose="Check if fillText method can handle maxWidth correctly when it is set to 0.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.zero.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d_text_draw_fill_maxWidth_small" purpose="Check if fillText method can handle maxWidth correctly when it is set to 'small'.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.small.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d_shadow_blur_high" purpose="check if Shadows look correct for large blurs">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.shadow.blur.high.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d_text_draw_fill_maxWidth_large" purpose="Check if fillText function can handle maxWidth correctly">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.large.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="textmetrics_width_type" purpose="Check if the type of textmetrics.width is number">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/textmetrics_width_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="canvas_width_type" purpose="Check if the type of canvas.width is 'number'">
+        <description>
+          <test_script_entry>/opt/tct-canvas-html5-tests/canvas/canvas_width_type.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="2d.text.draw.fill.maxWidth.negative" purpose="fillText handles maxWidth correctly.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/2d.text.draw.fill.maxWidth.negative.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="manual" id="canvas_shadows_002" purpose="Shadows must be drawn for images.">
+        <description>
+          <test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/canvas_shadows_002.htm</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+  </suite>
+</test_definition>
\ No newline at end of file
diff --git a/common/tct-canvas-html5-tests/webrunner/index.html b/common/tct-canvas-html5-tests/webrunner/index.html
new file mode 100644 (file)
index 0000000..69cc2d6
--- /dev/null
@@ -0,0 +1,137 @@
+<!doctype html>
+<!--
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Wang, Jing <jing.j.wang@intel.com>
+
+-->
+
+<head>
+<meta name="viewport" content="width=device-width">
+<script src="jquery-1.10.2.min.js"></script>
+<style type="text/css">
+html {
+  font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;
+}
+
+body {
+  background-color: white;
+}
+
+table#browse {
+  border-collapse:collapse;
+  table-layout:fixed;width:85%;
+}
+
+table#browse th:first-child,table#browse td:first-child {width:35%;}
+
+table#browse th:last-child,table#browse td:last-child {width:25%;}
+
+table#browse th {
+  padding:0;
+  padding-bottom:0.5em;
+  text-align:left;
+  border-bottom:medium solid black;
+}
+table#browse td {
+  padding:1em;
+  padding-bottom:0.5em;
+  border-bottom:thin solid black;
+}
+div#navbar{
+  box-sizing: border-box;
+  width: 99%;
+  border: 0px;
+  text-align: left;
+  background: slateblue;
+  color: white;
+}
+div#footbar{
+  width: 99%;
+  border: 0px;
+  text-align: left;
+}
+textarea#testinfo{
+  width: 99%;
+  font-size: 0.8em;
+}
+input{
+  font-size: 1.2em;
+  padding-top: 0.1em;
+  padding-bottom: 0.1em;
+}
+
+#btnPrev,#btnNext{
+  width: 8%;
+}
+#btnExit,#btnRun,#btnSave,#btnBack,#btnPass,#btnFail,#btnBlock{
+  width: 16%;
+  font-weight: bold;
+}
+
+#btnPass { color: green;}
+#btnFail { color: red;}
+#btnBlock { color: orange;}
+#labBatch{ font-size: 0.5em;}
+#textTest { width: 53%; }
+#title { font-size: 1.4em; font-weight: bold;}
+#frmTest { border: none;}
+.listhide { display: none;}
+.short{
+  padding-left: 1em;
+}
+</style>
+</head>
+
+<body>
+<div id="navbar" class="batchhide">
+  <span class="short listhide suitehide"><input type="button" id="btnBack" value="Back"/></span>
+  <span class="short listhide suitehide">
+    <input type="button" id="btnPrev" value="<"/>
+    <input type="text"  id="textTest" readonly />
+    <input type="button" id="btnNext" value=">"/>
+  </span>
+  <span class="short tchide"> <input type="button" id="btnExit" value="Exit"/></span>
+  <span id="title" class="short tchide">Open Web Test</span>
+</div>
+<div id="divSum"> </div>
+<div width="99%" class="batchhide">
+  <textarea class="listhide suitehide" id="testinfo" rows=4 disabled>
+  </textarea>
+</div>
+<div id="footbar" class="batchhide">
+  <span class="short"><input type="button"  id="btnRun" value="Run"/></span>
+  <span class="short listhide tchide"><input type="button" id="btnSave" value="Save"/></span>
+  <span class="short listhide suitehide"><input type="button" id="btnPass" value="PASS"/></span>
+  <span class="short listhide suitehide"><input type="button" id="btnFail" value="FAIL"/></span>
+  <span class="short listhide suitehide"><input type="button" id="btnBlock" value="BLOCK"/></span>
+</div>
+<iframe width="100%" id="frmTest" allowFullScreen="true" mozAllowFullScreen="true" webkitAllowFullscreen="true" src="">
+</iframe>
+<script src="testrunner.js"> </script>
+</body>
+</html>
diff --git a/common/tct-canvas-html5-tests/webrunner/jquery-1.10.2.min.js b/common/tct-canvas-html5-tests/webrunner/jquery-1.10.2.min.js
new file mode 100644 (file)
index 0000000..da41706
--- /dev/null
@@ -0,0 +1,6 @@
+/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
+//@ sourceMappingURL=jquery-1.10.2.min.map
+*/
+(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
+}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
+u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
diff --git a/common/tct-canvas-html5-tests/webrunner/testrunner.js b/common/tct-canvas-html5-tests/webrunner/testrunner.js
new file mode 100644 (file)
index 0000000..a0a6704
--- /dev/null
@@ -0,0 +1,938 @@
+/*
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Wang, Jing <jing.j.wang@intel.com>
+
+*/
+$(function(){
+ try {
+     // Checks if a device supports bluetooth API or not
+     var shape = tizen.systeminfo.getCapability("http://tizen.org/feature/screen.shape");
+    console.log("Shape = " + shape);
+     //alert(" Shape = " + shape);
+ } catch (error) {
+    // alert("Error name: " + error.name + ", message: " + error.message);
+    console.log("Error name: " + error.name + ", message: " + error.message);
+ }
+
+    if(shape=="circle"){
+       $('body').css('max-width', '100%');
+       $('body').css('max-height', '100%');
+       $('body').css('background-color', 'white');
+       $('body').css('margin-top', '20%');
+       $('body').css('margin-bottom', '20%');
+       $('body').css('margin-left', '20%');
+       $('body').css('margin-right', '20%');
+       }
+});
+
+var STUB_PORT = "";
+var RESOURCE_DIR;
+$.ajax({
+  url:"/tmp/TCT_CONFIG",
+  data:{},
+  async:false,
+  success:function(data){
+    var regEx = /DEVICE_SUITE_TARGET_30=(.+)/i;
+    var path = regEx.exec(data);
+    RESOURCE_DIR = path[1];
+  }
+});
+$.ajax({
+  url:RESOURCE_DIR + "/tct/portconfigure.json",
+  dataType:"json",
+  data:{},
+  async:false,
+  success:function(data){
+    STUB_PORT = data[0]["STUB_PORT"];
+  }
+});
+(function (window){
+  function TestRunner() {
+    this.start = null;
+    this.ui = null;
+    this.submitResult = function () {};
+    this.report = function (result, message) {};
+    this.doTest = function () {};
+  }
+
+  TestRunner.prototype = (function () {
+    var index = -1;
+    var Tests = [];
+    var Testsuites = {};
+    var TestsuiteSums = {};
+    var TestsetSums =  {};
+    var sum = newSummary();
+    var testContext =  newTestContext();
+    function newSummary(sum) {
+      if (typeof sum === "undefined")
+        return {"TOTAL": 0, "PASS" : 0, "FAIL" : 0, "BLOCK" : 0, "NOTRUN" : 0};
+      return {"TOTAL": sum.TOTAL, "PASS": sum.PASS, "FAIL": sum.FAIL, "BLOCK": sum.BLOCK, "NOTRUN": sum.NOTRUN};
+    }
+    function newTestContext() {
+      return {start_time: null, prev_uri: "", uri: "", sub_index: 0, onload_delay: 0};
+    }
+    function getParms () {
+      var parms = {};
+      var items = location.search.substring(1).split('&');
+      for ( var i = 0, max = items.length; i < max; i++) {
+        var pos = items[i].indexOf('=');
+        if (pos > 0) {
+          var key = items[i].substring(0, pos);
+          var val = items[i].substring(pos + 1);
+          if (!parms[key]) {
+            var rawVal = decodeURI(val);
+            if (rawVal.indexOf(',') < 0)
+              parms[key] = rawVal;
+            else
+              parms[key] = rawVal.split(',');
+          }
+        } else
+           parms[items[i]] = 1;
+      }
+      return parms;
+    }
+    return {
+      constructor: TestRunner,
+      options:  getParms(),
+      addTestsuite: function (testsuite, category) {
+        if (!category)
+          category = "default";
+        if (typeof Testsuites[category] === "undefined")
+          Testsuites[category] = [];
+        Testsuites[category].push(testsuite);
+      },
+
+      goNext: function () {
+        if (Tests.length === 0) return false;
+        if (index >= Tests.length) {
+          index = -1;
+          return false;
+        }
+        index++;
+        return true;
+      },
+
+      goPrev: function () {
+        if (Tests.length === 0) return false;
+        if (index < 0) {
+          index = Tests.length;
+          return false;
+        }
+        index--;
+        return true;
+      },
+
+      runAll: function () {
+        testContext = newTestContext();
+        VIEWFLAGS.add("batch");
+        this.ui.updateView(VIEWFLAGS.del("suite"));
+        this.testIndex(-1);
+        this.doTest();
+      },
+
+      cleanTests: function () {
+        Tests = [];
+      },
+
+      testIndex: function (ind) {
+        if (typeof ind === "undefined")
+          return index;
+        index = ind;
+      },
+
+      getTest: function (ind) {
+        if (typeof ind === "undefined")
+          ind = index;
+        return Tests[ind];
+      },
+
+      addTest: function (test) {
+        if (test instanceof Array)
+          Tests = Tests.concat(test);
+        else
+          Tests.push(test);
+      },
+
+      sumInit: function (num) {
+        if (typeof num === "undefined")
+          num = Tests.length;
+        sum.TOTAL = sum.NOTRUN = num;
+        sum.PASS = sum.FAIL = sum.BLOCK = 0;
+      },
+
+      sumUpdate: function (oldRes, newRes, set) {
+        if (oldRes !== null) {
+          sum[oldRes]--;
+          if (set !== null) TestsetSums[set][oldRes]--;
+        }
+        if (newRes !== null) {
+          sum[newRes]++;
+          if (set != null) TestsetSums[set][newRes]++;
+        }
+      },
+
+      checkResult: function (oTestDoc) {
+        var message = "";
+        if (!oTestDoc) {
+          this.report('FAIL', 'Test page crash');
+          return true;
+        }
+        // Handle sub-index test
+        if (testContext.sub_index > 0) {
+          var oRes = $(oTestDoc).find("table#results");
+          if (oRes.length == 0)
+            return false;
+          var ind = testContext.sub_index - 1;
+          var $n = $(oRes).find('tbody > tr').eq(ind);
+          if ($n.length == 0)
+            return false
+          var result = $n.children("td:eq(0)").text();
+          message = $n.children("td:eq(2)").text();
+          this.report(result.toUpperCase(), message);
+          return true;
+        }
+
+        var oPass = $(oTestDoc).find(".pass");
+        var oFail = $(oTestDoc).find(".fail");
+        // Qunit sub-cases
+        var oUnitRes = $(oTestDoc).find("ol.qunit-assert-list");
+        $(oUnitRes).find('li').each(function() {
+          message += "[assert]" + $(this).attr("class");
+          message += "[message]*" + $(this).children("span").text() + "\n";
+        });
+        // All tests pass
+        if (oPass.length > 0 && oFail.length == 0) {
+          this.report('PASS', message);
+          return true;
+        }
+        // Handle failed tests
+        if (oFail.length > 0) {
+          var oRes = $(oTestDoc).find("table#results");
+          $(oRes).find('tr.fail').each(function() {
+            message += " *" + $(this).children("td:eq(1)").text() + ": ";
+            message += $(this).children("td:eq(2)").text();
+          });
+          this.report('FAIL', message);
+          return true;
+        }
+        return false;
+      },
+
+      testInfo: function (ind) {
+        var info = "";
+        var tc = this.getTest();
+        if (!tc) return info;
+        info += "Test   : (" + (index + 1) + "/" + sum.TOTAL + ") ";
+        info += tc.test_script_entry;
+        info += "\nPurpose: " +  tc.purpose;
+        if (tc.pre_condition)
+          info += "\nPrecondition: " + tc.pre_condition;
+        if (tc.steps)
+          info += "\n" + tc.steps;
+        return info;
+      },
+
+      getTestCaseUrl: function () {
+        function getUriField(uri, param) {
+          var querys = uri.split("?")
+          if (querys.length <= 1)
+            return "";
+          uri = querys[1];
+          var start = uri.indexOf(param);
+          if (start == -1)
+            return "";
+          start += param.length + 1;
+          var end = uri.indexOf("&", start);
+          if (end == -1)
+            return uri.substring(start);
+          return uri.substring(start, end);
+        }
+        var tc = this.getTest();
+        if (!tc) return null;
+        var delay = tc.onload_delay;
+        if (delay)
+          testContext.onload_delay = parseInt(delay) * 1000;
+        else
+          testContext.onload_delay = 5000;
+
+        var uri = tc.test_script_entry;
+        if (typeof this.options.testprefix !== "undefined") {
+          var pos = uri.indexOf('http://');
+          if (pos !== 0)
+            uri = this.options.testprefix + uri
+        }
+        var val = getUriField(uri, "value");
+        if (val && tc.execution_type == "auto" && VIEWFLAGS.has("batch")) { // Need sub index in TC
+          testContext.sub_index = parseInt(val);
+          testContext.uri = uri.split("?")[0];
+          if (testContext.uri == testContext.prev_uri)
+            return "";
+        } else {
+          testContext.uri = uri;
+          testContext.sub_index = 0;
+        }
+        testContext.prev_uri = testContext.uri;
+        testContext.start_time = new Date();
+        return testContext.uri;
+      },
+
+      loadReady: function () {
+        if (!VIEWFLAGS.has("batch"))
+          return;
+        if (!this.ui.testComplete()){
+          if (testContext.onload_delay > 0){
+            var tval = 500;
+            var self = this;
+            setTimeout(function() {self.loadReady();}, tval);
+            testContext.onload_delay -= tval;
+            return
+          }
+          this.report("BLOCK", "Timeout");
+        }
+        this.doTest();
+      },
+
+      getListSum: function () {
+        var sumdata = "";
+        sumdata += "<p><table id='browse'><tr><th>Testsuite</th>";
+        sumdata += "<th>Total</th><th>Pass</th><th>Fail</th><th>Block</th></tr>";
+        $.each(TestsuiteSums, function (key, val){
+          sumdata += "<tr><td>" + key+ "</td>";
+          sumdata += "<td style='color:black;'>" + val.TOTAL + "</td>";
+          sumdata += "<td style='color:green;'>" + val.PASS + "</td>";
+          sumdata += "<td style='color:red;'>" + val.FAIL + "</td>";
+          sumdata += "<td style='color:orange;'>" + val.BLOCK + "</td></tr>";
+        });
+        sumdata += "</table>";
+        return sumdata;
+      },
+
+      getTestSum: function (include_set) {
+        var sumdata = "<section><h3>Total:" + sum.TOTAL
+            + " Pass:<span style='color:green;'>" + sum.PASS
+            + "</span> Fail:<span style='color:red;'>" + sum.FAIL
+            + "</span> Block:<span style='color:orange;'>" + sum.BLOCK
+            + "</span> Notrun:<span style='color:black;'>" + sum.NOTRUN
+            + "</span>";
+                                if (this.options.notifyInfo) {
+          sumdata += "<span style='color:slateblue;'> " + this.options.notifyInfo + "</span>";
+          this.options.notifyInfo = "";
+        }
+        sumdata += "</h3></section>";
+        if (VIEWFLAGS.has("batch")) {
+          var tc = this.getTest();
+          if (tc)  sumdata += "<h4><span style='background-color: wheat'>(#" + index + ") " + tc.id + "</span></h4>";
+        }
+        if (this.options.testsuite_name)
+          TestsuiteSums[this.options.testsuite_name] = newSummary(sum)
+        if (include_set) {
+          sumdata += "<p><table id='browse'><tr><th>Testset</th>";
+          sumdata += "<th>Total</th><th>Pass</th><th>Fail</th><th>Block</th></tr>";
+          $.each(TestsetSums, function (key, val){
+            sumdata += "<tr><td>" + key+ "</td>";
+            sumdata += "<td style='color:black;'>" + val.TOTAL + "</td>";
+            sumdata += "<td style='color:green;'>" + val.PASS + "</td>";
+            sumdata += "<td style='color:red;'>" + val.FAIL + "</td>";
+            sumdata += "<td style='color:orange;'>" + val.BLOCK + "</td></tr>";
+          });
+          sumdata += "</table>";
+        }
+        return sumdata;
+      },
+
+      getListInfo: function () {
+        function createList(category) {
+          var testList = "";
+          $.each(Testsuites[category], function (ind, val) {
+            testList += "<li><input type='checkbox' id='" + val + "'>&nbsp;<a href=''>" + val + "</a>" + "</li>";
+          });
+          return testList;
+        }
+        var data = "<html><head><style>.category{background: #cccccc;border: 1px solid #aaaaaa;} li{list-style-type: none; padding-left: 0.6em; padding-bottom:0.8em; font-size: 1.3em;}html{font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;}</style></head><body>";
+        $.each(Testsuites, function(key, val) {
+          data += "<section><h3 class='category'><input type='checkbox' id='" + key + "'>&nbsp;" + key + "</h3>"
+          data +=  createList(key) + "</section>";
+        });
+        data += "</body></html>";
+        return data;
+      },
+
+      getBrowseInfo: function () {
+        var failList = passList = blockList = notrunList = "";
+        function createTestList(tc, color, ind) {
+          var mtag = (tc.execution_type === "manual") ? "(M)" : "";
+          return "<li>" + mtag + "<a rel='" + ind + "' href='' style ='color:" + color + ";'>" + tc.id + "</a>" + "</li>";
+        }
+        TestsetSums = {};
+        $.each(Tests, function (ind, val) {
+          if (this.set === null)
+            this.set = "default";
+          if (typeof TestsetSums[this.set] === "undefined")
+            TestsetSums[this.set] = newSummary();
+          TestsetSums[this.set][this.result]++;
+          TestsetSums[this.set]["TOTAL"]++;
+          if (this.result == "FAIL")
+            failList += createTestList(this, "red", ind);
+          if (this.result == "PASS")
+            passList += createTestList(this, "green", ind);
+          if (this.result == "BLOCK")
+            blockList += createTestList(this, "orange", ind);
+          if (this.result == "NOTRUN")
+            notrunList += createTestList(this, "black", ind);
+        });
+        var data = "<html><head><style>ul li {padding-bottom:0.8em;font-size: 1.3em;}";
+        data += "html{font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;}</style></head><body>";
+        if (notrunList)
+          data += "<section><h3>Notrun</h3><ul>" + notrunList + "</ul></section>";
+        if (failList)
+          data += "<section><h3 style='color: red;'>Fail</h3><ul>" + failList + "</ul></section>";
+        if (blockList)
+          data += "<section><h3 style='color: orange;'>Block</h3><ul>" + blockList + "</ul></section>";
+        if (passList)
+          data += "<section><h3 style='color: green'>Pass</h3><ul>" + passList + "</ul></section>";
+        data += "</body></html>";
+        return data;
+      },
+
+      TestCase: function () {
+        return {
+          id: null,
+          test_script_entry: null,
+          execution_type: "manual",
+          result: "NOTRUN",
+          purpose: "",
+          set: null,
+          pre_condition: "",
+          onload_delay: 0,
+          steps: "",
+          data: null};
+      },
+
+      TestSuite: function () {
+        return {
+          id: null,
+          sum: null,
+          data: null};
+      }
+
+    };
+     }());
+  // Standalone test runner
+  var master_runner = new TestRunner();
+  master_runner.start = function (ui) {
+    function filter(xml, self) {
+      var set_ind = 0;
+      var manuals = [];
+      $(xml).find("set").each(function () {
+        var setname = $(this).attr("name");
+        if (!setname)
+          setname = "set" + set_ind;
+        $(this).find("testcase").each(function () {
+          var v = $(this).attr('execution_type');
+          if (self.options.execution_type && v != self.options.execution_type
+              && $.inArray(v, self.options.execution_type) < 0) {
+            $(this).remove();
+            return;
+          }
+          v = $(this).attr('priority');
+          if (self.options.priority && v != self.options.priority
+              && $.inArray(v, self.options.priority) < 0){
+            $(this).remove();
+            return;
+          }
+          var test = self.TestCase();
+          test.id = $(this).attr("id");
+          test.execution_type = $(this).attr("execution_type");
+          test.test_script_entry = $(this).find("test_script_entry").text();
+          test.purpose = $(this).attr("purpose");
+          test.pre_condition = $(this).find("pre_condition").text();
+          test.onload_delay = $(this).attr("onload_delay");
+          test.result = "NOTRUN";
+          test.set = setname;
+          test.data = this;
+          if (test.execution_type === "auto")
+            self.addTest(test);
+          else
+            manuals.push(test);
+        });
+        set_ind++;
+      });
+      self.addTest(manuals);
+    }
+
+    var self = this;
+    if (ui) ui.bind(self);
+    if (self.options.testsuite_name)
+      self.options.testsuite = "opt/" + self.options.testsuite_name + "/tests.xml";
+    if (!self.options.testsuite) {
+      $.getJSON(TESTLIST_FILE, function(data) {
+        for (var i = 0, imax = data.length; i < imax; i++) {
+          for (var j = 0, jmax = data[i].tests.length; j < jmax; j++)
+            self.addTestsuite(data[i].tests[j], data[i].category);
+        }
+        self.ui.list();
+        self.options.multiplex = true;
+      });
+    } else {
+      $.get(self.options.testsuite, null, function (xml) {
+        self.internal.xmldoc = xml;
+        filter(xml, self);
+        self.sumInit();
+        self.ui.browse();
+        setTimeout(function () {
+        if (self.options.autorun)
+          self.runAll();
+        }, 500);
+      }, "xml");
+    }
+  };
+
+  master_runner.doTest = function () {
+    var self = this, tc = null;
+    while (self.goNext()) {
+      tc = self.getTest();
+      if (!tc || tc.execution_type === "manual")
+        break;
+      self.ui.updateTestInfo(self.testInfo(), null, null);
+      self.ui.runTest(self.getTestCaseUrl());
+      return;
+    }
+    this.ui.updateView(VIEWFLAGS.del("batch"));
+    if (self.options.autorun) {
+      self.submitResult();
+      if (self.options.multiplex) {
+        self.ui.list();
+        return;
+      }
+      close_window();
+      return;
+    }
+    if (!tc) {
+      setTimeout(function () {self.ui.browse();}, 500);
+      return;
+    }
+    this.ui.updateTest();
+  };
+
+  master_runner.report = function (result, log) {
+    var tc = this.getTest();
+    if (!tc) return;
+    var oldresult = tc.result;
+    this.sumUpdate(oldresult, result, tc.set);
+    tc.result = result;
+    $(tc.data).find('result_info').remove();
+    $(tc.data).attr('result', result);
+    var doc = $.parseXML("<result_info><actual_result>" + result +
+           "</actual_result><stdout>" +
+           escape_html(log) + "</stdout></result_info>");
+    $(tc.data).append(doc.documentElement);
+    if (VIEWFLAGS.has("batch")) result = null;
+    this.ui.updateTestInfo(null, this.getTestSum(false), result);
+  };
+
+  master_runner.submitResult = function () {
+    var SERVER = "http://127.0.0.1:8080";
+    var contents = (new XMLSerializer()).serializeToString(this.internal.xmldoc);
+    var resfile = "tests.res.xml";
+    if (this.options.testsuite_name)
+      resfile = this.options.testsuite_name + "." + resfile;
+    $.post(SERVER + "/save_file", {filename: resfile, data: contents})
+  };
+
+  master_runner.internal = {xmldoc: null};
+
+  // Controlled test runner
+  var slave_runner = new TestRunner();
+  slave_runner.start = function (ui) {
+    function sync_session_id() {
+      $.get(SERVER + "/init_session_id?session_id="
+            + self.internal.session_id);
+    }
+    var self = this;
+    self.internal.session_id = Math.round(Math.random() * 10000);
+    sync_session_id();
+    var next_step = self.internal.get_json("ask_next_step");
+    if (!next_step || next_step.step != "continue") {
+      close_window();
+      return false;
+    }
+    ui.bind(self);
+    var f = function () {
+      var p = self.internal.get_json("check_execution_progress");
+      if (p) self.sumInit(parseInt(p.total));
+      self.doTest();
+    };
+    self.ui.updateView(VIEWFLAGS.add("batch"));
+    self.ui.updateView(VIEWFLAGS.del("suite"));
+    setTimeout(f, 1000);
+    return true;
+  };
+
+  slave_runner.doTest = function () {
+    var self = this;
+    if (self.internal.stage > 0) {
+      self.ui.updateView(VIEWFLAGS.del("batch"));
+      self.goNext();
+      self.ui.updateTest();
+      return;
+    }
+    var next_step = self.internal.get_json("ask_next_step");
+    if (next_step && next_step.step == "continue") {
+      var task = self.internal.get_json("auto_test_task");
+      if (task === null) {
+        print_error("ask_test_task", "Fail get task");
+      } else if (task.invalid === 0) {
+        print_error("ask_test_task", "Invalid session");
+      } else if (task.stop === 0) {
+        print_error("ask_test_task", "close window");
+      } else if (task.none !== 0) { //handle auto test
+        var test = self.TestCase();
+        test.id = task.case_id;
+        test.onload_delay = task.onload_delay;
+        test.test_script_entry = task.entry;
+        test.execution_type = "auto";
+        test.purpose = task.purpose;
+        test.pre_condition = task.pre_condition;
+        self.addTest(test);
+        self.goNext();
+        self.ui.updateTestInfo(self.testInfo(), null, null);
+        self.ui.runTest(self.getTestCaseUrl());
+        return;
+      } else {  //handle manual test
+        self.ui.updateView(VIEWFLAGS.del("batch"));
+        self.internal.stage = 1;
+        var mtask = self.internal.get_json("manual_cases");
+        if (mtask && mtask.none != 0) {
+          self.cleanTests();
+          for (var i = 0, max = mtask.length; i < max; i++) {
+            var test = self.TestCase();
+            test.id = mtask[i].case_id;
+            test.test_script_entry = mtask[i].entry;
+            test.purpose = mtask[i].purpose;
+            test.pre_condition = mtask[i].pre_condition;
+            test.result = "NOTRUN";
+            test.execution_type = "manual";
+            test.index = i;
+            var steps = "";
+            $(mtask[i].steps).each(function () {
+              steps += "Step-" + this.order + "\t: " + this.step_desc + "\n";
+              steps += "Expect\t: " + this.expected + "\n";
+            });
+            test.steps = steps;
+            self.addTest(test);
+          }
+          self.ui.updateTest(-1);
+          self.sumInit();
+          self.ui.browse();
+        } else
+          close_window();
+        return;
+      }
+    }
+    close_window();
+  };
+
+  slave_runner.report = function(result, log) {
+    var tc = this.getTest();
+    var oldresult;
+    if (this.internal.stage > 0) {
+      this.internal.post_json("commit_manual_result",
+        {"case_id": tc.id, "result": result});
+      oldresult = tc.result
+      tc.result = result;
+    } else {
+      this.internal.post_json("commit_result",
+        { "case_id" : tc.id,
+          "result" : result,
+          "msg" : "[Message]" + log,
+          "session_id" : this.internal.session_id});
+      oldresult = "NOTRUN";
+    }
+    this.sumUpdate(oldresult, result, null);
+    if (VIEWFLAGS.has("batch")) result = null;
+    this.ui.updateTestInfo(null, this.getTestSum(false), result);
+  };
+
+  slave_runner.submitResult = function () {
+    $.get(SERVER + "/generate_xml");
+  };
+
+  slave_runner.internal = {
+    session_id: null,
+    stage: 0,
+    get_json: function (name) {
+      var jsondata = null;
+      $.getJSON(SERVER + "/" + name + "?session_id="
+         + this.session_id, function(data) {
+           jsondata = data;});
+      return jsondata; },
+    post_json: function (name, d) {
+       $.post(SERVER + "/" + name, d, null, "json");
+    }
+  };
+
+  var i_ui = (function () {
+    var testinfo = $("#testinfo").get(0);
+    var frmTest = $("#frmTest").get(0);
+    var textTest  = $("#textTest").get(0);
+    var btnPass = $("#btnPass").get(0);
+    var btnFail = $("#btnFail").get(0);
+    var btnBlock = $("#btnBlock").get(0);
+    var btnExit = $("#btnExit").get(0);
+    var btnNext = $("#btnNext").get(0);
+    var btnPrev = $("#btnPrev").get(0);
+    var btnRun  = $("#btnRun").get(0);
+    var divSum = $("#divSum").get(0);
+    var btnBack = $("#btnBack").get(0);
+    var btnSave = $("#btnSave").get(0);
+    var runner = null;
+    var listmode = null;
+    var nextTest = function () {
+      runner.goNext();
+      selectTest();
+    };
+
+    var prevTest = function() {
+      runner.goPrev();
+      selectTest();
+    };
+
+    var selectResult = function() {
+      runner.report(this.value, "");
+    };
+
+    var selectTest = function () {
+      frmTest.src = "";
+      var tc = runner.getTest();
+      if (!tc) {
+        if (runner.testIndex() === -1)
+          textTest.value = "---Begin---";
+        else
+          textTest.value = "---End---";
+        changeColor("NOTRUN");
+        return;
+      }
+      testinfo.value = runner.testInfo();
+      $(divSum).html(runner.getTestSum(false));
+      textTest.value = ((tc.execution_type === "manual") ? "(M)" : "") + tc.id;
+      changeColor(tc.result);
+    };
+
+    function changeColor(result) {
+      if (result === "PASS")
+        $(textTest).css("backgroundColor", "lightgreen");
+      else if (result === "FAIL")
+        $(textTest).css("backgroundColor", "tomato");
+      else if (result === "BLOCK")
+        $(textTest).css("backgroundColor", "yellow");
+      else
+        $(textTest).css("backgroundColor", "white");
+    }
+
+    return {
+      bind: function (r) {
+        var self = this;
+        r.ui = self;
+        runner = r;
+        $(btnPass).on("click", selectResult);
+        $(btnFail).on("click", selectResult);
+        $(btnBlock).on("click", selectResult);
+        $(btnNext).on("click", nextTest);
+        $(btnPrev).on("click", prevTest);
+        $(btnRun).on("click",  function () {
+          if (VIEWFLAGS.has("list")) {
+            runner.options.auto_testsuites = [];
+            var tdoc = frmTest.contentWindow.document;
+            $(tdoc).find("section li>input:checked").each(function () {
+              var tname = $(this).attr("id");
+              runner.options.auto_testsuites.push(tname);
+            });
+            self.list();
+          } else if (VIEWFLAGS.has("suite")) {
+            runner.runAll();
+          } else
+            self.runTest(runner.getTestCaseUrl());
+        });
+        $(frmTest).on("load",  function () {runner.loadReady();});
+        $(btnExit).on("click", function () {
+          runner.submitResult();
+          if (runner.options.multiplex && VIEWFLAGS.has("suite"))
+            self.list();
+          else
+            close_window();
+        });
+        $(btnBack).on("click", function () {
+          frmTest.src = "";
+          setTimeout(function () {self.browse();}, 300);
+        });
+        $(btnSave).on("click", function () {
+          runner.submitResult();
+          runner.options.notifyInfo = "*Save succeed*";
+          $(divSum).html(runner.getTestSum(true));
+        });
+        frmTest.height = $(window).height();
+      },
+
+      list: function () {
+        var tdoc = frmTest.contentWindow.document;
+        $(btnExit).attr("value", "Exit");
+        tdoc.open("text/html", "replace");
+        tdoc.writeln(runner.getListInfo());
+        var self = this;
+        $(tdoc).find("section li>a").on("click", function (e) {
+          runner.options.testsuite_name = $(this).text();
+          VIEWFLAGS.del("list");
+          runner.start();
+          window.scrollTo(0, 0);
+          e.preventDefault();
+        });
+        $(tdoc).find("section h3>input[type=checkbox]").on("click", function () {
+          $boxs = $(this).parent().parent().find("li>input[type=checkbox]");
+          $boxs.prop('checked', $(this).is(':checked'));
+        });
+        $(divSum).html(runner.getListSum());
+        runner.cleanTests();
+        self.updateView(VIEWFLAGS.add("list"));
+        if (runner.options.auto_testsuites) {
+          if (runner.options.auto_testsuites.length > 0) {
+            var ts = runner.options.auto_testsuites.shift();
+            runner.options.testsuite_name = ts;
+            runner.options.autorun = true;
+            VIEWFLAGS.del("list");
+            runner.start();
+          } else
+            runner.options.autorun = false;
+        }
+      },
+
+      browse: function () {
+        var tdoc = frmTest.contentWindow.document;
+        if (runner.options.multiplex)
+          $(btnExit).attr("value", "Back");
+        tdoc.open("text/html", "replace");
+        tdoc.writeln(runner.getBrowseInfo());
+        var self = this;
+        $(tdoc).find("section ul li>a").on("click", function (e) {
+          var ind = parseInt($(this).attr("rel"));
+          self.updateView(VIEWFLAGS.del("suite"));
+          self.updateTest(ind);
+          window.scrollTo(0, 0);
+          e.preventDefault();
+        });
+        $(divSum).html(runner.getTestSum(true));
+        self.updateView(VIEWFLAGS.add("suite"));
+      },
+
+      updateTest: function (ind) {
+        if (typeof ind !== "undefined") runner.testIndex(ind);
+        selectTest();
+      },
+
+      updateView: function (flags) {
+        if (flags & VIEWFLAGS.flags.batch)
+          $(".batchhide").hide();
+        else {
+          $(".batchhide").show();
+          if (flags & VIEWFLAGS.flags.list) {
+            $(".tchide").show();
+            $(".suitehide").show();
+            $(".listhide").hide();
+          } else if (flags & VIEWFLAGS.flags.suite) {
+            $(".listhide").show();
+            $(".tchide").show();
+            $(".suitehide").hide();
+          } else {
+            $(".listhide").show();
+            $(".suitehide").show();
+            $(".tchide").hide();
+          }
+        }
+      },
+
+        testComplete: function () {
+        return runner.checkResult(frmTest.contentWindow.document);
+      },
+
+      runTest: function (uri) {
+        if (uri === null) return;
+        if (uri)
+          frmTest.src = uri;
+        else
+          runner.loadReady();
+      },
+
+      updateTestInfo: function (info, sum, result) {
+        if (info !== null)
+          testinfo.value = info;
+        if (sum !== null)
+          $(divSum).html(sum);
+        if (result !== null)
+          changeColor(result);
+      },
+     };
+  } ());
+
+  function escape_html(s) {
+    return s.replace(/\&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g,
+      "&quot;").replace(/'/g, "&#39;");
+  }
+
+  function print_error(command, message) {
+    console.warn("Command -" + command + ": " + message);
+  }
+
+  function close_window() {
+    setTimeout(function () {
+      window.open('', '_self', '');
+      window.close();
+      if (window.parent != window.self) {
+        window.parent.onbeforeunload = null;
+        window.parent.close();
+      }
+    }, 1000);
+  }
+
+  function pre_init() {
+    var runner_ok = false;
+    $.get(SERVER + "/check_server", function () {
+      runner_ok = slave_runner.start(i_ui);
+    });
+    if (!runner_ok)
+      master_runner.start(i_ui);
+  }
+  var SERVER = "http://127.0.0.1:8000";
+  var TESTLIST_FILE = "testlist.json"
+  var VIEWFLAGS = { val: 0,
+    flags: {suite: 1, batch: 2, list: 4},
+    add: function (f) { this.val |= this.flags[f]; return this.val},
+    del: function (f) { this.val &= ~this.flags[f]; return this.val},
+    has: function (f) { return this.val & this.flags[f];},
+  };
+  $.ajaxSetup({ async: false});
+  $(window).on("ready", pre_init);
+})(window);