yui/yui3 — pull request #642 by sdesai (2013-04-20 00:15:43+00:00)
Title: Attempt to clean up lang xframe tests, to avoid intermittent Yeti + IE issues

BACKGROUND

When running the cross frame lang tests on IE, under Yeti, that too,
only in a CI context (more server load, at the end of running all tests?) we
intermittently see failures for these cross-frame tests.

I haven't been able to repro them manually, either running them manually,
or through Yeti locally.

My gut feel is that we're trying to do stuff with the iframe when it's not
fully ready. In my old life, I remember hitting scenarios where even
though the frame's onload fired in the iframe, and the parent could get to
contentWindow, it wouldn't be completely robust when accesing contentWindow
properties (specifically for IE).

FIX

The fix aims to revert responsibilities. Have the frame call the parent
when ready, as opposed to the parent check something on the frame.

In addition to the attempted fix the commit also does some cleanup:

1). It breaks out the xframe tests into a separate suite, which is not
loaded at all in nodejs (instead of ignoring the whole set of tests
individually)

2). It uses YUITest's async:init support to set up the iframe, so that
everything is encapsulated in the lang-xframe-test.js file, and we
don't need to repeat stuff across the various html file flavors.

NOTE: I didn't find any docs for the async:init stuff in the landing guide,
so had to look through the code - but it seems to be consciously/formally
supported.

So, regardless of whether or not it fixes the intermittent issue, it seems like it's a cleaner test setup in general.

**NOTE**

This is not ready to commit yet (see testing), and **doesn't need to be merged for 3.10.0** [ this commit is just trying to clean up test flakiness tech debt in general - the issue has been around forever ].

I wanted to get this out there, for an initial look, and I needed @davglass to see if the changes to the other various flavored files [ index-full.html, index.html, index-static.html, coverage.html etc. ] are valid/required.

TESTING

I've tested `src/yui/tests/unit/lang.html` through yeti, in FF, Chrome, Safari, IE6, IE7, IE8, IE9, iOS and it all looks good.

However when running all the tests in `src/yui/tests/unit/` through Yeti, IE9 seems to be hitting exceptions in Yeti code (inject.js) [ yeti 0.2.21 ]. Now that I type this out, that may be the flakiness (??).

Running them manually, everything passes in IE9