Is there any recent activity on crosscheck?

0 views
Skip to first unread message

John

unread,
Mar 25, 2008, 10:49:29 PM3/25/08
to crosscheck
Is Firefox 2 support in the works?

If not, can someone give me some pointers as to where to look to add
it myself?

Surely I'm not the first/only person that wants to be able to easily
test JS in a FF2 environment?

Thanks.

jdwad...@gmail.com

unread,
Mar 26, 2008, 1:59:05 AM3/26/08
to crosscheck
John,

No, there hasn't been much activity on Crosscheck in a while. I was
hoping to put some time into it soon. Specifically, I'd like to change
the implementation so that most of the environment code is implemented
in JavaScript. It should be possible to get the behavior that we want
with the newer JS features in the latest versions of Rhino. This
should make it easier for folks to contribute fixes to make the
browser environments more accurate to the originals. I suspect
grokking the current, parallel-hierarchy Rhino hack might be a bit
much to ask of a JavaScript developer.

In any case, what Crosscheck really needs, and what FF 2 support
requires, are a list of quirks in that environment. If your Crosscheck
FF 1.5 tests pass, but they fail in the browser, that's either a bug
in the FF 1.5 environment, or a feature for the FF 2 environment.
Either way, if you report it as an issue on Trac, it'll be more likely
to get fixed. The same goes for every other browser. The
infrastructure is there. What we need now to make Crosscheck really
cool and really useful is a long list of features and bugs in the DOM/
JS implementations of the various browsers.

Maybe submitting tickets on Trac isn't the best way to do that. Should
there be a public wiki somewhere? A group focused on cataloging the
differences in the JS implementations of the browsers? Does that
already exist?

Maybe this is a good week to start making plans. Any and all
resources, ideas, complaints or thoughts would be much appreciated.

Thanks,
Jason

John

unread,
Mar 28, 2008, 12:40:54 AM3/28/08
to crosscheck
On a related note, I am encountering another issue in trying to write
a test to cover one of our scenarios and I don't know if it's a FF2
compatibility issue or if I'm just asking too much of the simulated
environment provided by crosscheck, or what... but the scenario is
basically this:

We have code that creates an iframe and then periodically goes in and
updates one of the divs in the document in the iframe. I can't post
the raw code, but the code that does this looks roughly like this:

updateXXX: function(name)
{
var newString = '[Prefix] - ' + name;
var iframe = this._previouslyStoredReferenceToIFrame;
if (iframe)
{
var doc = iframe.contentWindow || iframe.contentDocument;
if (doc.document)
{
doc = doc.document;
}
doc.getElementById('theIdOfTheElementToBeUpdated').innerHTML =
newString;
}
else
{
LOG.debug('Could not get iframe.')
}
}

The test I wrote to test this code looks roughly like this:

testUpdateXXX: function() {
var scwm = new ObjectUnderTest();

var expected = '[Prefix] - Example';

var iframe = document.createElement('iframe');
iframe.id = 'someSpecificId';
document.body.appendChild(iframe);
if (iframe)
{
var doc = iframe.contentWindow || iframe.contentDocument;
assertNotNull(doc);
if (doc.document)
{
doc = doc.document;
}

var div = doc.createElement('theIdOfTheElementToBeUpdated');

assertEquals('Something', div.innerHTML);
assertNotEquals(expected, div.innerHTML);
scwm.updateXXX('Example')
assertEquals(expected, div.innerHTML);
}
else
{
fail('Could not get iframe')
}
}

And my test class always bombs at the assertNotNull(doc) line --
presumably because the simulated environment is not doing everything
the real browser does when I create an iframe element and add it to
the DOM? Am I wrong in my hypothesis? Is this actually a FF2
compatibility issue? If not, is there an alternative (ideally
easier?) way for me to test code that does something like this?

Thanks,
-
John

On Mar 25, 10:59 pm, "wadswo...@thefrontside.net"

Jason Wadsworth

unread,
Mar 28, 2008, 8:51:06 PM3/28/08
to cross...@googlegroups.com
Well, I can tell you that we didn't do much of anything with iframes
while we were developing Crosscheck. I'm pretty sure that an iframe
is just another generic element from CCs perspective at this point.
That feature should probably be on the shortlist of features that
Crosscheck needs.

I can't really think of a good way to hack that in JavaScript with
the current implementation. You could create an BaseElement subclass
that contains the iframe properties that you're trying to use, if
you want to dive into the Java code.

- Jason

----------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages