Split up IdlInterface.prototype.test_members.
Add tests for stringifiers to idlharness.
fixup! Split up IdlInterface.prototype.test_members.
Merge pull request #83 from Ms2ger/idlharness-stringifier

Add tests for stringifiers to idlharness.
Point to api.md where the documentation is
Use a regular expression to extract prefix URL for testharness.css.
Add samples for cross document notifications.

The test harness automatically notifies containing documents via
callbacks and cross document messaging when a test is running in a child
document. Introduce apisample11 and apisample12 that demonstrate these
notifications in action.
Introduce promise_test.

promise_test is similar to an async_test, but reduces the boilerplate
needed to write tests that use Promises. See apisample13.html for
examples that use promise_test.
Use !== to compare against 'null'
Insert missing ';'
Notify completion for incomplete tests when harness times out.

When the test harness times out, tests that haven't completed either
receive a status of NOTRUN or TIMEOUT. Callback functions registered via
add_result_callback() were only being invoked for tests that were
NOTRUN. This change invokes result callabcks for all tests which have
not completed by the time the test harness times out.
Remove extra whitespace.
Remove debugging code.
Refactor test environment specific logic into a class.

This change pull all the logic for interacting with the test environment
into a separate class. This is done in preparation for allowing web
workers to use testharness directly.
Support using testharness.js from a worker.

A test document that invokes a web worker for testing needs to call
fetch_tests_from_worker(). This sets up the client document to receive
test results.

Within a worker, the test harness can be imported via:

  importScripts('/resources/testharness.js');

Once imported, the worker can invoke tests using test(), async_test(),
etc. The testharness sends tests results from the worker to any
connected client document that called fetch_tests_from_worker(). See
apisample14.html.

This change adds support for dedicated, shared and service workers.
Fix indentation
Fix formatting.
Add comments explaining ServiceWorker related code.

Also provide safe tests for checking if a worker is a SharedWorker or a
ServiceWorker.
Verify runtime environment via 'self instanceof <worker interface>'

The runtime environment is detected by checking for the existence of
specific interface objects in the global object. E.g. the existence of
DedicatedWorkerGlobalScope in 'self' indicates that we are running
inside a dedicated web worker. In addition we now also check that the
global object is an instance of the relevent interface object so that
the test is resilient against browsers that expose all interface objects
in all contexts.
Add missing paranthesis