<!DOCTYPE html><!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --><metacharset="UTF-8"><title>OffscreenCanvas test: 2d.path.clip.winding.1</title><scriptsrc="/resources/testharness.js"></script><scriptsrc="/resources/testharnessreport.js"></script><scriptsrc="/html/canvas/resources/canvas-tests.js"></script><h1>2d.path.clip.winding.1</h1><pclass="desc"></p><script>vart=async_test("");vart_pass=t.done.bind(t);vart_fail=t.step_func(function(reason){throwreason;});t.step(function(){varcanvas=newOffscreenCanvas(100,50);varctx=canvas.getContext('2d');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);t.done();});</script>