Bob Ippolito wrote:

> [...]
> Test.Simple is gone!  I made some changes to SimpleTest so that it
> works in Safari and Firefox.  I have not tested elsewhere.

It worked for me on FF 1.5, Opera 8.5, IE 6 and IE 5.5 (Well, not "pure 5.5", I'm using the hack that allows you to have IE 5, 5.5 and 6 on the same Windows installation).

What stopped SimpleTest from working on Safari?. I've no access to the Mac world.

The relevant parts of the diff seems to be:

  * SimpleTest.waitForExplicitFinish() has been invoked.
 **/
 SimpleTest.finish = function() {
+    // doesn't fix Safari's incorrect complete count, but it does
+    // make it show everything as loaded in the activity monitor
+    var _doFinish = function () {
     SimpleTest.showReport();
     SimpleTest.talkToRunner();
+    }
+    setTimeout(_doFinish, 1);
 }

 /**
  * Toggle element visibility
 **/
 TestRunner._toggle = function(el) {
-    if (computedStyle(el, 'display') == 'block') {
-        el.style.display = 'none';
+    if (el.className == "noshow") {
+        el.className = "";
+        el.style.cssText = "";
     } else {
-        el.style.display = 'block';
+        el.className = "noshow";
+        el.style.cssText = "width:0px; height:0px; border:0px;";
     }
-}
+};

 TestRunner._makeIframe = function (url) {
     var iframe = document.createElement('iframe');
-    iframe.setAttribute('src', url);
-    iframe.setAttribute('name', url);
-    iframe.setAttribute('width', '500');
+    iframe.src = url;
+    iframe.name = url;
+    iframe.width = "500";
     var tbody = TestRunner._summaryDiv.getElementsByTagName("tbody")[0];
     var tr = TR(null, TD({'colspan': '3'}, iframe));
     iframe._row = tr;
     tbody.appendChild(tr);
     return iframe;
-}
+};

What was the problem with manipulating style.display on Safari's iframes?. What problem the setTimeout hack addresses (on SimpleTest.finish())?

Just that I'm not familiar with Safari and want to know some of the pitfalls.

Thanks for the corrections Bob,

--
Leonardo Soto M.

Reply via email to