diff options
author | ivandavid@chromium.org <ivandavid@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 08:17:29 +0000 |
---|---|---|
committer | ivandavid@chromium.org <ivandavid@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 08:17:29 +0000 |
commit | b75422a372ce21d1f4970730dc7ceb6400e3ccad (patch) | |
tree | c34497148a1354be2a0dc2800893f8fccfb59074 | |
parent | 66b4aeec0005a12e3637a1f851b3cb3514304651 (diff) | |
download | chromium_src-b75422a372ce21d1f4970730dc7ceb6400e3ccad.zip chromium_src-b75422a372ce21d1f4970730dc7ceb6400e3ccad.tar.gz chromium_src-b75422a372ce21d1f4970730dc7ceb6400e3ccad.tar.bz2 |
There are a 8 basic test cases of varying types including text only html files, some html files with forms, an image, and a color-gradient.
BUG=388517
Review URL: https://codereview.chromium.org/416433002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285527 0039d316-1c4b-4281-b951-d872f2087c98
9 files changed, 90 insertions, 0 deletions
diff --git a/chrome/test/data/printing/layout_tests/source_html/colors/color-gradient.html b/chrome/test/data/printing/layout_tests/source_html/colors/color-gradient.html new file mode 100644 index 0000000..e563be7 --- /dev/null +++ b/chrome/test/data/printing/layout_tests/source_html/colors/color-gradient.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<body> + <canvas id="myCanvas" width="300" height="300"></canvas> + <script> + var canvas = document.getElementById("myCanvas"); + var context = canvas.getContext("2d"); + + var gradient = context.createLinearGradient(0, 0, 300, 300); + gradient.addColorStop(0, "red"); + gradient.addColorStop(1, "green"); + + context.fillStyle = gradient; + context.fillRect(0, 0, 300, 300); + </script> +</body> + +</html> diff --git a/chrome/test/data/printing/layout_tests/source_html/forms/radio.html b/chrome/test/data/printing/layout_tests/source_html/forms/radio.html new file mode 100644 index 0000000..f16b885 --- /dev/null +++ b/chrome/test/data/printing/layout_tests/source_html/forms/radio.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<body> + <form> + <input type="radio" name="radios" value="one">RadioOne</br> + <input type="radio" name="radios" value="two" checked="true">RadioTwo</br> + <input type="radio" name="radios" value="three">RadioThree + </form> +</body> +</html> diff --git a/chrome/test/data/printing/layout_tests/source_html/forms/text-field.html b/chrome/test/data/printing/layout_tests/source_html/forms/text-field.html new file mode 100644 index 0000000..1d5a505 --- /dev/null +++ b/chrome/test/data/printing/layout_tests/source_html/forms/text-field.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> +<body> + <form> + TextBoxOne: <input type="text"></input></br> + TextBoxTwo: <input type="text" value="default text"></input> + </form> +</body> +</html> diff --git a/chrome/test/data/printing/layout_tests/source_html/images/resources/test_image.jpg b/chrome/test/data/printing/layout_tests/source_html/images/resources/test_image.jpg Binary files differnew file mode 100644 index 0000000..54aba9e --- /dev/null +++ b/chrome/test/data/printing/layout_tests/source_html/images/resources/test_image.jpg diff --git a/chrome/test/data/printing/layout_tests/source_html/images/test-image.html b/chrome/test/data/printing/layout_tests/source_html/images/test-image.html new file mode 100644 index 0000000..17e7123 --- /dev/null +++ b/chrome/test/data/printing/layout_tests/source_html/images/test-image.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> +<body> + <img src="resources/test_image.jpg"></img> +</body> +</html> diff --git a/chrome/test/data/printing/layout_tests/source_html/shapes/empty-box.html b/chrome/test/data/printing/layout_tests/source_html/shapes/empty-box.html new file mode 100644 index 0000000..56cfe43 --- /dev/null +++ b/chrome/test/data/printing/layout_tests/source_html/shapes/empty-box.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> +<body> + <div style="width:500px;height:500px;border:1px solid #000;"></div> +</body> +</html> diff --git a/chrome/test/data/printing/layout_tests/source_html/shapes/lines.html b/chrome/test/data/printing/layout_tests/source_html/shapes/lines.html new file mode 100644 index 0000000..3455be8 --- /dev/null +++ b/chrome/test/data/printing/layout_tests/source_html/shapes/lines.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<body> + <canvas id="canvas" width="500", height="500"> </canvas> + <script> + var canvas = document.getElementById("canvas"); + var width = canvas.width; + var height = canvas.height; + var ctx = canvas.getContext("2d"); + for (var i = 0; i < width; i += 10) { + ctx.moveTo(i, 0); + ctx.lineTo(i, height); + ctx.stroke(); + } + </script> +</body> +</html> diff --git a/chrome/test/data/printing/layout_tests/source_html/text/bullet-list.html b/chrome/test/data/printing/layout_tests/source_html/text/bullet-list.html new file mode 100644 index 0000000..9283eb2 --- /dev/null +++ b/chrome/test/data/printing/layout_tests/source_html/text/bullet-list.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<body> + <ul> + <li>1</li> + <ul> + <li>1.a</li> + <li>1.b</li> + </ul> + <li>2</li> + <li>3</li> + </ul> +</body> +</html> diff --git a/chrome/test/data/printing/layout_tests/source_html/text/simple-text.html b/chrome/test/data/printing/layout_tests/source_html/text/simple-text.html new file mode 100644 index 0000000..c87692f --- /dev/null +++ b/chrome/test/data/printing/layout_tests/source_html/text/simple-text.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<body> + +<h1>My First Heading</h1> + +<p>My first paragraph.</p> + +</body> +</html> |