1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 * Creates a sample canvas.
8 * @return {HTMLCanvasElement}
10 function getSampleCanvas() {
11 var canvas = document.createElement('canvas');
15 var ctx = canvas.getContext('2d');
16 ctx.fillStyle = '#000000';
17 for (var i = 0; i < 10; i++) {
18 ctx.fillRect(i * 30, i * 30, 20, 20);