Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit cc2c4ec

Browse files
author
mikesamuel@gmail.com
committed
more IE test fixes
1 parent 752ca02 commit cc2c4ec

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

js-modules/extractSourceSpans_test.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ <h1>Extract Source Spans Test</h1>
7676
}
7777

7878
setTimeout(function () {
79+
function stringify(s) {
80+
return JSON.stringify(s).replace(/\r/g, '\\r').replace(/\n/g, '\\n')
81+
.replace(/\t/g, '\\t');
82+
}
83+
7984
var testInputs = Array.prototype.slice.call(
8085
document.body.getElementsByClassName('testinput'), 0);
8186
for (var i = 0, n = testInputs.length; i < n; ++i) {
@@ -106,7 +111,7 @@ <h1>Extract Source Spans Test</h1>
106111
var goldenText = testResult.innerText || testResult.textContent;
107112
var passed = actualText === goldenText;
108113
if (!passed) {
109-
console.log(JSON.stringify(actualText) + ' !==\n' + JSON.stringify(goldenText));
114+
console.log(stringify(actualText) + ' !==\n' + stringify(goldenText));
110115
}
111116
actual.className += passed ? ' ok' : ' failure';
112117
} catch (ex) {
@@ -118,5 +123,5 @@ <h1>Extract Source Spans Test</h1>
118123

119124
<hr>
120125
<address></address>
121-
<!-- hhmts start --> Last modified: Tue Mar 29 15:47:29 PDT 2011 <!-- hhmts end -->
126+
<!-- hhmts start --> Last modified: Tue Mar 29 16:13:48 PDT 2011 <!-- hhmts end -->
122127
</body> </html>

0 commit comments

Comments
 (0)