rahu28 / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Default browser capture to strict mode #141

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I suspect that most developers interested in JsTestDriver write their HTML to 
run in browser strict modes, so it would be better if the /capture/ URL 
defaulted to the strict test mode.

A patch to do so is attached.

Original issue reported on code.google.com by jabradford@gmail.com on 21 Sep 2010 at 6:42

Attachments:

GoogleCodeExporter commented 8 years ago
I have the misfortune of having to deal with Internet Explorer. The difference 
between quirks and strict mode there can be profound, to the point of changing 
DOM interfaces for certain objects, for example, the SVG document object. As of 
now, I have to forgo certain tests on IE because of this.

It belongs in the configuration file, as a result, since the mode required is 
tied to the code.

Original comment by eric.eh9@gmail.com on 8 Feb 2012 at 11:47

GoogleCodeExporter commented 8 years ago
P.S. I wasn't adequately precise for those who have to deal with this. In IE9, 
the mode is set with <!DOCTYPE ...>. If it's absent, it reverts to previous 
behavior, so IE9 behaves much like IE7/8. If a DOCTYPE is present, it behaves 
like IE9. Frankly, I think this behavior is insane, but whatever. The upshot is 
that the difference between strict and quirks mode isn't identical to this 
behavior, but they are interlinked.

So perhaps the better way of dealing with this is to be able to specify the 
DOCTYPE and to infer the proper runner from that information.

Original comment by eric.eh9@gmail.com on 8 Feb 2012 at 12:02