ALL the Browsers

This is continued work to reimplement ASAP with greater rigor, accounting for all browsers. This includes additional automation for verifying the tests pass in all browsers available on Saucelabs, automation we can extend to perform A/B tests, benchmarks, experiments, and coverage analysis.

These are snapshots of the Saucelabs test results matrix for browser windows, and then browser workers. Grey denotes that Workers themselves are unavailable and the tests were not run. The tests are those in `test/asap-test.js`. These were ported from mocha to a minimal test scaffold designed to integrated with both Node.js and Saucelabs just for this project.

-   Split implementations for browsers and Node.js.
    Now using Browserify-style module redirects.
-   Split implementations of asap and rawAsap.
    rawAsap is used by asap, is about twice as fast, but can be
    stalled by exceptions.
-   Support callable tasks, as a generalization of functions.
-   Use S3 and Mr/s to bundle and publish tests online, for development,
    continuous unit testing, and for ad hoc experiments.
    See `scripts/publish-bundle.js`.
-   Use Saucelabs to create browser compatibility matrices
    for development, continuous unit testing, and releases.
    See `scripts/saucelabs.js`
-   Reevaluate the use of various implementations based on data
    obtained experimentally about all relevant browsers, using
    Saucelabs.
-   Add ASAP Gauntlet benchmark draft.
-   Reimplement tests without a test framework.
-   Use a back up plan for engines that tend to forget timers (Firefox 8–18)
-   Address problem that Internet Explorer 10 web workers dequeue timers in LIFO order instead of FIFO.

![Saucelabs Matrix](https://s3-us-west-2.amazonaws.com/kriskowal-asap/train/integration/57708dddf207ec1da06383d03d8f5dd66b2e45be/saucelabs-matrix.svg)

![Saucelabs Matrix](https://s3-us-west-2.amazonaws.com/kriskowal-asap/train/integration/57708dddf207ec1da06383d03d8f5dd66b2e45be/saucelabs-worker-matrix.svg)
@kriskowal in `asap.js`, you missed to remove domain loading and to replace
`domain.active` with `process.domain`.
On Jun 8, 2014 11:37 AM, "Kris Kowal" <notifications@github.com> wrote:

> In browser-asap.js:
>
> > +            // This hook exists purely for testing purposes.
> > +            // Its name will be periodically randomized to break any code that
> > +            // depends on its existence.
> > +            asap.onerror(error);
> > +        } else if (hasSetImmediate) {
> > +            // In WebWorkers on Internet Explorer 10 and 11, the setTimeout
> > +            // function is not FIFO.
> > +            // Thankfully these browsers have setImmediate, which behaves
> > +            // correctly.
> > +            // In all other known cases, setTimeout is FIFO, including non
> > +            // Worker contexts in the exact same browsers.
> > +            // Note that in Internet Explorer 10, setImmediate must be called
> > +            // by name.
> > +            setImmediate(function () {
> > +                throw error;
> > +            });
>
> ✓
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/kriskowal/asap/pull/41/files#r13524709>.
>