Changeset 294
- Timestamp:
- 02/16/08 16:23:01 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/jsan/Test.Simple-0.21/lib/Test/Builder.js
r293 r294 384 384 if (args[i] != null) { 385 385 args[i] = op == 'eq' ? "'" + args[i].toString() + "'" : args[i].valueOf(); 386 } 387 } 386 387 args[i] = args[i].replace(/&/g, '&'); 388 args[i] = args[i].replace(/</g, '<'); 389 args[i] = args[i].replace(/>/g, '>'); 390 args[i] = args[i].replace(/"/g, '"'); // " end quote for emacs 391 } 392 } 393 388 394 389 395 return this.diag( 390 " got: " + args[0]+ Test.Builder.LF +391 " expected: " + args[1]+ Test.Builder.LF396 " got: \"" + args[0] + "\"" + Test.Builder.LF + 397 " expected: \"" + args[1] + "\"" + Test.Builder.LF 392 398 ); 393 399 }; … … 585 591 586 592 // Default to the normal write and scroll down... 587 doc.write( msg);593 doc.write("<pre style='margin: 0px'>"+msg+"</pre>"); 588 594 // IE 6 Service Pack 2 requires that we re-cache the object. Bill 589 595 // Gates only knows why! … … 594 600 this.output(writer); 595 601 this.failureOutput(function (msg) { 596 writer('<span style="color: red; font-weight: bold vv">'602 writer('<span style="color: red; font-weight: bold">' 597 603 + msg + '</span>') 598 604 }); trunk/src/jsan/Test.Simple-0.21/lib/Test/Harness/Browser.js
r293 r294 93 93 // set to display:none. See: 94 94 // http://www.quirksmode.org/bugreports/archives/2005/02/hidden_iframes.html 95 if (/Safari/.test(navigator.userAgent)) { 95 //alert(navigator.userAgent); 96 if (/Safari|Konqueror/.test(navigator.userAgent)) { 96 97 node.style.visibility = "hidden"; 97 98 node.style.height = "0"; … … 108 109 node.setAttribute("id", "output"); 109 110 document.body.appendChild(node); 111 // Brutal hack to make output linkable 112 fixoutput = function(node) { 113 // Trailing space added and replaced to work around yet another 114 // Safari bug. 115 node.innerHTML = node.innerHTML.replace( 116 / ?(\w[\w\.]+?\w)(?=\.\.\.)/m, '<a href="$1">$1</a>' 117 ) + ' '; 118 }; 110 119 return { 111 120 pass: function (msg) { … … 113 122 window.scrollTo(0, document.body.offsetHeight 114 123 || document.body.scrollHeight); 124 fixoutput(node); 115 125 }, 116 126 fail: function (msg) { … … 232 242 if (/MSIE/.test(navigator.userAgent) 233 243 || /Opera/.test(navigator.userAgent) 234 || /Safari /.test(navigator.userAgent))244 || /Safari|Konqueror/.test(navigator.userAgent)) 235 245 { 236 246 // These browsers have problems with the DOM solution. It
