Fix up js-tests.

Review Request #9835 — Created March 26, 2018 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x
c9a6eb2...

Reviewers

This change fixes two classes of problems with the js-tests:

  1. The way we were testing the router on the diff viewer didn't work
    with the latest Backbone router/history code. In particular, it's no
    longer possible to use the router without having first called
    Backbone.history.start. Fixing this without causing all sorts of
    browser location mischief involved changing the spy to a much lower
    level, at the window.history level, and then bypassing a check that
    ensured that the target navigation URL matched the history root.
  2. On Chrome, some calls to $.css('display') are now returning an
    empty string. This breaks some tests that expected it to return
    "block" (which is the case on Firefox). I've generalized the tests to
    check both.

Ran js-tests on Chrome and Firefox.