Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Bookmarks and siteUtil hardening #4797

Merged
merged 1 commit into from
Oct 17, 2016
Merged

Bookmarks and siteUtil hardening #4797

merged 1 commit into from
Oct 17, 2016

Conversation

bsclifton
Copy link
Member

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • new isMoveAllowed (pulled out from moveSite)
  • added unit test to ensure moveSite can't put an ancestor into a descendant
  • about:bookmarks now calls isMoveAllowed before submitting action
  • about:bookmarks allows folder drag onto bookmark; it gets parent folder ID and puts there
  • fixed folder selection bug when searching on about:bookmarks (selection cleared during search)

Fixes #4766

Auditors: @bbondy

Test Plan:

  1. Open about:bookmarks
  2. Create two folders and also bookmark several items, under Bookmarks Toolbar
  3. Click to select a folder which has bookmarks
  4. Drag one of the folders and drop it on a bookmark
  5. Folder should move into the folder that contains bookmark that was dropped onto
  6. Making sure a folder you created is selected on the left (one that is NOT bookmarks toolbar or other bookmarks), do a search
  7. Validate folder selection is cleared on left, in favor of "All Folders"
  8. Drag one of the search results onto a folder on the left
  9. Validate bookmark was moved

- new isMoveAllowed (pulled out from moveSite)
- added unit test to ensure moveSite can't put an ancestor into a descendant
- about:bookmarks now calls isMoveAllowed before submitting action
- about:bookmarks allows folder drag onto bookmark; it gets parent folder ID and puts there
- fixed folder selection bug when searching on about:bookmarks (selection cleared during search)

Fixes #4766

Auditors: @bbondy

Test Plan:
1. Open about:bookmarks
2. Create two folders and also bookmark several items, under Bookmarks Toolbar
3. Click to select a folder which has bookmarks
4. Drag one of the folders and drop it on a bookmark
5. Folder should move into the folder that contains bookmark that was dropped onto
6. Making sure a folder you created is selected on the left (one that is NOT bookmarks toolbar or other bookmarks), do a search
7. Validate folder selection is cleared on left, in favor of "All Folders"
8. Drag one of the search results onto a folder on the left
9. Validate bookmark was moved
@bbondy
Copy link
Member

bbondy commented Oct 17, 2016

lgtm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving a folder in Bookmarks Manager can lead to the appearance of duplicates
4 participants