From 2e494bde232ed2fc7c6ddfb997d8dffa468639d7 Mon Sep 17 00:00:00 2001 From: Obexer Christoph Date: Sun, 11 Dec 2011 18:06:57 +0100 Subject: [PATCH 1/2] moved common code into tests/test.js --- tests/test.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/test.js diff --git a/tests/test.js b/tests/test.js new file mode 100644 index 0000000..3c21bcd --- /dev/null +++ b/tests/test.js @@ -0,0 +1,25 @@ +/* + html2canvas @VERSION@ + Copyright (c) 2011 Niklas von Hertzen. All rights reserved. + http://www.twitter.com/niklasvh + + Released under MIT License +*/ +(function(document, window) { + var scrStart = ''; + document.write(scrStart + '../external/jquery-1.6.2.min.js' + scrEnd); + var html2canvas = ['Core', 'Generate', 'Parse', 'Preload', 'Queue', 'Renderer', 'plugins/jquery.plugin.html2canvas'], i; + for (i = 0; i < html2canvas.length; ++i) { + document.write(scrStart + '../src/' + html2canvas[i] + '.js' + scrEnd); + } + window.onload = function() { + if (window.setUp) { + window.setUp(); + } + setTimeout(function() { + $(document.body).html2canvas({ + logging: true + }); + }, 100); + }; +}(document, window)); \ No newline at end of file From 4dba62e2fd98d092fd74e9817bc6d959bffdc99f Mon Sep 17 00:00:00 2001 From: Obexer Christoph Date: Sun, 11 Dec 2011 18:12:20 +0100 Subject: [PATCH 2/2] convert all tests to use tests/test.js all tests now run from the source files directly instead of the built verion in build/. --- tests/background.html | 14 +------------- tests/borders.html | 14 +------------- tests/external-content.html | 13 ++----------- tests/forms.html | 9 +-------- tests/images.html | 10 +++------- tests/lists.html | 13 +++---------- tests/overflow.html | 11 +---------- tests/proxy.html | 11 +---------- tests/text-linethrough.html | 23 ++++++----------------- tests/text-underline-lineheight.html | 16 +++------------- tests/text-underline.html | 17 +++-------------- tests/text.html | 10 +--------- tests/visible-elements.html | 10 +--------- tests/z-index1.html | 13 +------------ tests/z-index2.html | 13 +------------ tests/z-index3.html | 13 +------------ 16 files changed, 30 insertions(+), 180 deletions(-) diff --git a/tests/background.html b/tests/background.html index 165ef0a..5cb520c 100644 --- a/tests/background.html +++ b/tests/background.html @@ -8,19 +8,7 @@ Background attribute tests - - - - - - + diff --git a/tests/images.html b/tests/images.html index 82fd3dc..894e1a1 100644 --- a/tests/images.html +++ b/tests/images.html @@ -5,11 +5,9 @@ - - - +