This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 228 - Opera, Konqueror and Safari can't run test suites
Summary: Opera, Konqueror and Safari can't run test suites
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: ECMAScript Binding (show other bugs)
Version: unspecified
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Curt Arnold
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-20 13:21 UTC by Curt Arnold
Modified: 2003-06-28 20:55 UTC (History)
0 users

See Also:


Attachments
Patch to support Opera/Konqueror/Safari (3.75 KB, patch)
2003-06-20 16:05 UTC, Curt Arnold
Details
Restores XML, XHTML support to IFrameBuilder (4.00 KB, patch)
2003-06-26 00:11 UTC, Curt Arnold
Details

Description Curt Arnold 2003-06-20 13:21:05 UTC
Opera, Konqueror and Safari have issues with the default document builder (aka
IFrameBuilder) approach that prevent them from running the test suites.  The
proposed modification will allow them to them to run the test suite.

Currently, when the test is generated an element like:

<iframe name="doc" onload="loadComplete()"></iframe>

is added to the generated test HTML file (for example, hc_attrname.html) for
each document to be loaded (for example, hc_staff.html).

In setUpPage() which prepares the test to run, a line like:

docsLoaded += preload(this.doc, "doc", "hc_staff");

which causes something like

document.doc.document.location.href = "files/hc_staff.html";

to set the location of the iframe's document and initiate loading the test
document.  The completion of the load is expected to cause the loadComplete()
method (specified using the onload attribute on the iframe element) to be executed.

As far as I can tell, the document is loaded in the iframe and the problem is a
failure of loadComplete() to be called.  However attempts to provide a failsafe
timeout that would call loadComplete() sometime after the expected load
completion was not successful.

I was able to get Opera, Konqueror and Safari to run by statically encoding the
test document into the <iframe> element.  Basically, generating

<iframe name="doc" src="files/hc_staff.html"></iframe>

and modifying the iframe loader to use this document. 

The behavior of Mozilla and Internet Explorer did not appear to be affected by
this change.  This would add an unnecessary HTML document load when running
other document builders (DOM3LS, MozillaXML, MSXML, etc), but should not
interfere with their results.
Comment 1 Philippe Le Hegaret 2003-06-20 14:28:10 UTC
The new line is now:
  <encoding   obj="inputSource" value="iso" interface="DOMInputSource"/> 


The test has been updated but will need more update regarding
s/DOMInputSource/DOMInput/

Comment 2 Curt Arnold 2003-06-20 16:05:57 UTC
Created attachment 17 [details]
Patch to support Opera/Konqueror/Safari
Comment 3 Curt Arnold 2003-06-25 15:27:06 UTC
Lost support for XHTML documents in IFrameBuilder.  Should refine to use static
iframe element for HTML and generate iframe element for XHTML and other document
types for browsers that support that.
Comment 4 Curt Arnold 2003-06-26 00:11:38 UTC
Created attachment 19 [details]
Restores XML, XHTML support to IFrameBuilder
Comment 5 Curt Arnold 2003-06-28 16:55:05 UTC
Running the test suite from Opera requires running from an HTTP server and 
hacking jsUnitTestManager.js to add an alert so that you can see the error 
(don't know how to fix JSUnit for Safari however).  But from the suite's, 
standpoint this issue is fixed.

Suggested hack to app/jsUnitTestManager.js for testing Opera

jsUnitTestManager.prototype._handleTestException = function (excep) 
{
...
-  var listField = this.problemsListField;
-  listField.options[listField.length]=new Option(problemMessage, 
this._problemDetailMessageFor(excep));
+  alert (problemMessage + this._problemDetailMessageFor(excep));
}