Commit Graph

3 Commits

Author SHA1 Message Date
Riken Shah f95c539122 custom_check: Avoid use of assert to avoid confusion with assert.equal.
This commit bans the use of `assert` and replaces it
with `assert.ok` to avoid confusion with `assert.equal`.

Fixes #18687.
2021-06-10 09:15:57 -07:00
Aman Agrawal eb72f77d0a settings: Allow switching between user and org settings manually.
Since the base hash for org settings and user settings are
different (organization and settings), the hashchange module
gets confused that we are going from one overlay to other.

A reproducer for this flow is to visit the organization "Bots" page,
click on your own profile as the owner of a bot, and then click "Edit
profile" from there.

So, we fix this by making an exception for this particular case
in the module.

Fixes part of #18011.
2021-04-07 01:02:03 -07:00
Steve Howell 746cc9e1f6 refactor: Extract browser_history module.
This mainly extracts a new module called
browser_history. It has much fewer dependencies
than hashchange.js, so any modules that just
need the smaller API from browser_history now
have fewer transitive dependencies.

Here are some details:
    * Move is_overlay_hash to hash_util.
    * Rename hashchange.update_browser_history to
      brower_history.update
    * Move go_to_location verbatim.
    * Remove unused argument for exit_overlay.
    * Introduce helper functions:
        * old_hash()
        * set_hash_before_overlay()
        * save_old_hash()

We now have 100% line coverage on the extracted
code.
2021-03-22 13:29:32 -07:00