mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
231 lines
13 KiB
HTML
231 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>QUnit Test Suite</title>
|
|
<link rel="stylesheet" href="lib/qunit.css">
|
|
<script src="lib/qunit.js"></script>
|
|
|
|
|
|
|
|
<!-- src files -->
|
|
<script type="text/javascript" src="../assets/jquery-1.6.2.js"></script>
|
|
|
|
<script type="text/javascript" src="../../src/log.js"></script>
|
|
<script type="text/javascript" src="../../src/nodecontainer.js"></script>
|
|
<script type="text/javascript" src="../../src/stackingcontext.js"></script>
|
|
<script type="text/javascript" src="../../src/textcontainer.js"></script>
|
|
<script type="text/javascript" src="../../src/support.js"></script>
|
|
<script type="text/javascript" src="../../src/imagecontainer.js"></script>
|
|
<script type="text/javascript" src="../../src/gradientcontainer.js"></script>
|
|
<script type="text/javascript" src="../../src/lineargradientcontainer.js"></script>
|
|
<script type="text/javascript" src="../../src/webkitgradientcontainer.js"></script>
|
|
<script type="text/javascript" src="../../src/imageloader.js"></script>
|
|
<script type="text/javascript" src="../../src/nodeparser.js"></script>
|
|
<script type="text/javascript" src="../../src/font.js"></script>
|
|
<script type="text/javascript" src="../../src/fontmetrics.js"></script>
|
|
<script type="text/javascript" src="../../src/renderer.js"></script>
|
|
<script type="text/javascript" src="../../src/promise.js"></script>
|
|
<script type="text/javascript" src="../../src/renderers/canvas.js"></script>
|
|
|
|
<script src="unit/css.js"></script>
|
|
<script src="unit/generate.js"></script>
|
|
<!-- <script src="unit/utils.js"></script> -->
|
|
|
|
<style>
|
|
#borders div {
|
|
border-color: #000;
|
|
border-style: solid;
|
|
}
|
|
|
|
#backgroundPosition div {
|
|
width:50px;
|
|
height:50px;
|
|
}
|
|
|
|
#paddingPercentage div {
|
|
width:50px;
|
|
height:50px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="qunit"></div>
|
|
<div id="qunit-fixture" style="visibility:none; height:1px; overflow:scroll;">
|
|
All the tests here. <b>Testing different <span>stuff</span> for contents()</b>
|
|
<div id="borders">Yep, here's some more.
|
|
<div style="border-width: 1px 0;">Div 1</div>
|
|
<div style="border-width: 1em 0;">Div 2</div>
|
|
<div style="border-width: thin medium thick;">Some more divs</div>
|
|
<div style="border-width: 5% 6px 12%;"></div> <!-- percentages aren't valid -->
|
|
<div style="border-width: 5em 5ex 5in 5cm;"></div>
|
|
<div style="border-width: 500em 500ex 500in 500cm;"></div>
|
|
<div style="border-width: 5mm 5pt 5pc 5px;"></div>
|
|
<div style="border-width: auto inherit;"></div>
|
|
<div style="border-width: 500mm 500pt 500pc 500px;"></div>
|
|
</div>
|
|
|
|
<div id="padding">
|
|
<div style="padding: 1px 0;"></div>
|
|
<div style="padding: 1em 0;"></div>
|
|
<div style="padding: thin medium thick;"></div>
|
|
<div style="padding: 5em 5ex 5in 5cm;"></div>
|
|
<div style="padding: 500em 500ex 500in 500cm;"></div>
|
|
<div style="padding: 5mm 5pt 5pc 5px;"></div>
|
|
<div style="padding: 500mm 500pt 500pc 500px;"></div>
|
|
<div style="padding: 1px 5%;"></div>
|
|
<div style="padding: 15% 0 3%;"></div>
|
|
</div>
|
|
|
|
<div id="textShadows">
|
|
<div style=""></div>
|
|
<div style="text-shadow: 1px 1px 1px"></div>
|
|
<div style="text-shadow: 2px 2px rgb(2, 2, 2)"></div>
|
|
<div style="text-shadow: 3px 3px rgba(2, 2, 2, .2)"></div>
|
|
<div style="text-shadow: rgb(2, 2, 2) 4px 4px"></div>
|
|
<div style="text-shadow: rgba(2, 2, 2, .2) 5px 5px"></div>
|
|
<div style="text-shadow: rgb(2, 2, 2) 6px 6px, #222222 2px 2px"></div>
|
|
<div style="text-shadow: 7px 7px rgba(2, 2, 2, .2), #222222 2px 2px"></div>
|
|
</div>
|
|
|
|
<div id="backgroundPosition">
|
|
<div style="background-position: 1px 0;"></div>
|
|
<div style="background-position: 1em 0;"></div>
|
|
<div style="background-position: thin medium;"></div>
|
|
<div style="background-position: 5em 5ex;"></div>
|
|
<div style="background-position: 5in 5cm;"></div>
|
|
<div style="background-position: 500in 500cm;"></div>
|
|
<div style="background-position: 500em 500ex;"></div>
|
|
<div style="background-position: 5pc 5px;"></div>
|
|
<div style="background-position: 500pc 500px;"></div>
|
|
<div style="background-position: 5mm 5pt;"></div>
|
|
<div style="background-position: 500mm 500pt;"></div>
|
|
</div>
|
|
|
|
<div id="backgroundPositionPercentage">
|
|
<div style="background-position: 5% 6px;"></div>
|
|
<div style="background-position: center center;"></div>
|
|
<div style="background-position: left bottom;"></div>
|
|
</div>
|
|
|
|
<style>
|
|
.linearGradientSimple {
|
|
/* FF 3.6+ */
|
|
background: -moz-linear-gradient(left, #ff0000, #ffff00, #00ff00);
|
|
/* Chrome,Safari4+ */
|
|
background: -webkit-gradient(linear, left center, right center, color-stop(#ff0000), color-stop(#ffff00), color-stop(#00ff00));
|
|
/* Chrome 10+, Safari 5.1+ */
|
|
background: -webkit-linear-gradient(left, #ff0000, #ffff00, #00ff00);
|
|
/* Opera 11.10+ */
|
|
background: -o-linear-gradient(left, #ff0000, #ffff00, #00ff00);
|
|
/* IE 10+ */
|
|
background: -ms-linear-gradient(left, #ff0000, #ffff00, #00ff00);
|
|
/* W3C */
|
|
background: linear-gradient(left, #ff0000, #ffff00, #00ff00);
|
|
}
|
|
.linearGradientWithStops {
|
|
/* FF 3.6+ */
|
|
background: -moz-linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%);
|
|
/* Chrome, Safari 4+ */
|
|
background: -webkit-gradient(linear, left center, right center, color-stop(0%, #cedbe9), color-stop(17%, #aac5de), color-stop(50%, #6199c7), color-stop(51%, #3a84c3), color-stop(59%, #419ad6), color-stop(71%, #4bb8f0), color-stop(84%, #3a8bc2), color-stop(100%, #26558b));
|
|
/* Chrome 10+, Safari 5.1+ */
|
|
background: -webkit-linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%);
|
|
/* Opera 11.10+ */
|
|
background: -o-linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%);
|
|
/* IE 10+ */
|
|
background: -ms-linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%);
|
|
/* W3C */
|
|
background: linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%);
|
|
}
|
|
.linearGradient3 {
|
|
/* FF 3.6+ */
|
|
background: -moz-linear-gradient(top, #f0b7a1 0%, #8c3310 50%, #752201 51%, #bf6e4e 100%);
|
|
/* Chrome, Safari 4+ */
|
|
background: -webkit-gradient(linear, center top, center bottom, color-stop(0%, #f0b7a1), color-stop(50%, #8c3310), color-stop(51%, #752201), color-stop(100%, #bf6e4e));
|
|
/* Opera 11.10+ */
|
|
background: -o-linear-gradient(top, #f0b7a1 0%, #8c3310 50%, #752201 51%, #bf6e4e 100%);
|
|
/* IE 10+ */
|
|
background: -ms-linear-gradient(top, #f0b7a1 0%, #8c3310 50%, #752201 51%, #bf6e4e 100%);
|
|
/* W3C */
|
|
background: linear-gradient(top, #f0b7a1 0%, #8c3310 50%, #752201 51%, #bf6e4e 100%);
|
|
}
|
|
.radialGradient {
|
|
background: -moz-radial-gradient(75% 19%, ellipse closest-side, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -webkit-radial-gradient(75% 19%, ellipse closest-side, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -o-radial-gradient(75% 19%, ellipse closest-side, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -ms-radial-gradient(75% 19%, ellipse closest-side, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: radial-gradient(75% 19%, ellipse closest-side, #ababab, #0000ff 33%,#991f1f 100%);
|
|
}
|
|
|
|
.radialGradient2 {
|
|
background: -moz-radial-gradient(75% 19%, ellipse closest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -webkit-radial-gradient(75% 19%, ellipse closest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -o-radial-gradient(75% 19%, ellipse closest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -ms-radial-gradient(75% 19%, ellipse closest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: radial-gradient(75% 19%, ellipse closest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
}
|
|
.radialGradient3 {
|
|
background: -moz-radial-gradient(75% 19%, ellipse farthest-side, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -webkit-radial-gradient(75% 19%, ellipse farthest-side, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -o-radial-gradient(75% 19%, ellipse farthest-side, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -ms-radial-gradient(75% 19%, ellipse farthest-side, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: radial-gradient(75% 19%, ellipse farthest-side, #ababab, #0000ff 33%,#991f1f 100%)
|
|
}
|
|
.radialGradient4 {
|
|
background: -moz-radial-gradient(75% 19%, ellipse farthest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -webkit-radial-gradient(75% 19%, ellipse farthest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -o-radial-gradient(75% 19%, ellipse farthest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -ms-radial-gradient(75% 19%, ellipse farthest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: radial-gradient(75% 19%, ellipse farthest-corner, #ababab, #0000ff 33%,#991f1f 100%);
|
|
}
|
|
.radialGradient5 {
|
|
background: -moz-radial-gradient(75% 19%, ellipse contain, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -webkit-radial-gradient(75% 19%, ellipse contain, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -o-radial-gradient(75% 19%, ellipse contain, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -ms-radial-gradient(75% 19%, ellipse contain, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: radial-gradient(75% 19%, ellipse contain, #ababab, #0000ff 33%,#991f1f 100%);
|
|
}
|
|
.radialGradient6 {
|
|
background: -moz-radial-gradient(75% 19%, ellipse cover, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -webkit-radial-gradient(75% 19%, ellipse cover, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -o-radial-gradient(75% 19%, ellipse cover, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: -ms-radial-gradient(75% 19%, ellipse cover, #ababab, #0000ff 33%,#991f1f 100%);
|
|
background: radial-gradient(75% 19%, ellipse cover, #ababab, #0000ff 33%,#991f1f 100%);
|
|
}
|
|
</style>
|
|
<div id="backgroundGradients">
|
|
<div class="linearGradientSimple"></div>
|
|
<div class="linearGradientWithStops"></div>
|
|
<div class="linearGradient3"></div>
|
|
<div class="radialGradient"></div>
|
|
<div class="radialGradient2"></div>
|
|
<div class="radialGradient3"></div>
|
|
<div class="radialGradient4"></div>
|
|
<div class="radialGradient5"></div>
|
|
<div class="radialGradient6"></div>
|
|
</div>
|
|
</div>
|
|
<!--
|
|
<div id="fixture-iframes"></div>
|
|
|
|
<script>
|
|
var pages = ["background","borders","external-content","forms","images","lists","origin","overflow","proxy","text-linethrough"],
|
|
fixtures = $("#fixture-iframes");
|
|
|
|
|
|
$.each(pages, function(i, page){
|
|
|
|
var iframe = $('<iframe />').attr('src',"../" + page + ".html");
|
|
|
|
iframe.insertAfter( fixtures );
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
<iframe src="../borders.html" id="borders"></iframe> -->
|
|
|
|
|
|
</body>
|
|
</html>
|