Reviewers: felix8a,

Description:
* Redesign asyncRequirements/assertAsynchronousRequirement:
  * Instead of mucking with the page title etc, asyncRequirements is
    defined in terms of registering additional 'tests' that jsunit.js
    knows about; this prevents incorrect passing-and-then-failing, and
    means that assertAsynchronousRequirement is as fire-and-forget as
    its name suggests.
  * Instead of just a nominally-a-predicate, there is a second function
    parameter for additional asserts to be executed once the predicate
    is true.

* Fixed lack of verification of headless JS tests:
  * RhinoTestBed now actually tests that the jsunit tests it runs
    passed, rather than just that they did not throw an exception that
    escaped. (Future work: get rid of the _junit_.fail kludge, which has
    been left in for now for better error messages.)
    * Corrected implementation of document.title in third party env.js.
  * Added missing pass()es in tests that are now detected.
  * Added 'all tests passed' marker string to html-emitter-test.html
    which does not use jsunit.js.

* Added new browser test driver meta-test.js, which loads known-failing
  test suites into iframes to verify they fail in the expected fashion.

* Refinements and refactoring in jsunit.js and browser-test-case.js:
  * A test which passes and then fails, or fails or passes and then
    passes, is detected and considered failure.
    * Fixed undetected failures in es53-test-client-uri-rewriting.js
      (miswritten assert, not functionality error) and refactored.
    * Fixed duplicate pass in testProtoMention.
  * Added 'panic' facility, which guarantees the test page will fail,
    where throwing an exception that may be uncaught does not, and used
    it for all already caught cases of misuse of the test framework.
  * Test cases now individually remember their container elements,
    eliminating the need to pass around idClass info. The pass() wrapper
    around jsunitPass() is no longer necessary (but has been left for
    now).
    * Adjusted domado-dom-guest testReadOnly to be compatible (it had
      been replacing its testcontainer element with a clone).
  * jsunitRegisterIf is now defined inside jsunit.js.
  * jsunit.fail() added symmetric with jsunit.pass(), and both now
    update testcontainer elements.

* Incidental changes:
  * Renamed misnamed test method in CssStylesheetTest.java.
  * Renamed misnamed title of css-stylesheet-test.html.

Please review this at https://codereview.appspot.com/8907046/

Affected files:
  M     tests/com/google/caja/plugin/CssStylesheetTest.java
  M     tests/com/google/caja/plugin/UniversalBrowserTests.java
  M     tests/com/google/caja/plugin/browser-test-case.js
  M     tests/com/google/caja/plugin/css-stylesheet-test.html
  M     tests/com/google/caja/plugin/css-stylesheet-test.js
  M     tests/com/google/caja/plugin/cssparser_test.js
  M     tests/com/google/caja/plugin/default-test-driver.js
  M     tests/com/google/caja/plugin/es53-test-client-uri-rewriting.js
  M     tests/com/google/caja/plugin/es53-test-domado-dom-guest.html
  M     tests/com/google/caja/plugin/es53-test-domado-events-guest.html
  M     tests/com/google/caja/plugin/es53-test-domado-events.js
  M     tests/com/google/caja/plugin/es53-test-domado-foreign.js
  M     tests/com/google/caja/plugin/es53-test-domado-special.js
  M     tests/com/google/caja/plugin/es53-test-external-script-guest.html
  M     tests/com/google/caja/plugin/es53-test-language-guest.html
  M     tests/com/google/caja/plugin/es53-test-relative-urls.js
  M     tests/com/google/caja/plugin/html-css-sanitizer-test.js
  M     tests/com/google/caja/plugin/html-emitter-test.html
  M     tests/com/google/caja/plugin/jsunit.js
  A     tests/com/google/caja/plugin/meta-test-async-fails.js
  A     tests/com/google/caja/plugin/meta-test-async-passes.js
  A     tests/com/google/caja/plugin/meta-test-fails.js
  A     tests/com/google/caja/plugin/meta-test-panic.html
  A     tests/com/google/caja/plugin/meta-test.js
  M     tests/com/google/caja/plugin/test-index.js
  M     tests/com/google/caja/plugin/uri_test.js
  M     tests/com/google/caja/util/RhinoTestBed.java
  M     third_party/js/envjs/env.js
  M     third_party/js/jsunit/2.2/jsUnitCore.js


--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to