From: Kalervo Kujala Date: Wed, 24 Aug 2011 16:11:38 +0000 (+0300) Subject: Catch multiline log function calls. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=e00ae164f0f298929ef2e1f0271671dfef4c4400;p=pdf.js.git Catch multiline log function calls. --- diff --git a/test/driver.js b/test/driver.js index cbb226d..9fa1cfa 100644 --- a/test/driver.js +++ b/test/driver.js @@ -221,8 +221,8 @@ function checkScrolling() { } function log(str) { - stdout.insertAdjacentHTML("BeforeEnd", str); + stdout.insertAdjacentHTML('BeforeEnd', str); - if (str.charAt(str.length - 1) == '\n') + if (str.lastIndexOf('\n') >= 0) checkScrolling(); }