Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore other bookmarks #4404

Merged
merged 15 commits into from
Feb 20, 2020
Merged

Restore other bookmarks #4404

merged 15 commits into from
Feb 20, 2020

Conversation

darkdh
Copy link
Member

@darkdh darkdh commented Jan 22, 2020

fix brave/brave-browser#7639

Submitter Checklist:

Test Plan:

Migrate previous migration (if the previous migration folder is still there)

 1. In order to emulate double upgrade, create a folder named "Other Bookmarks" at the end of bookmarks bar, put some bookmarks or folder into it (using old Brave)
 2. Launch Brave with this fix
 3. We should see those bookmarks in "Other Bookmarks" permanent node
 4. Repeat step 1 in current Brave
 5. Manually created "Other Bookmarks" should still be there because migration should only run once

Virtual "Other Bookmarks" mapping

Create

 1. Go to `about:flag#brave-sync` and enable sync on desktop A and desktop B
 2. Sync desktop A, desktop B and then sync mobile C
 3. Wait until each device has 3 devices on its device list
 4. Add `folder A` in "Other Bookmarks" permanent node on desktop A
 5. Desktop B should have `folder A` appears in “Other Bookmarks” permanent node
 6. Mobile C should have `folder A` appears in “Other Bookmarks” folder
 7. Add `folder B` after `folder A` on mobile C
 8. Desktop A and desktop B should have `folder B` after `folder A`

Delete

1. Follow test case “Create”
2. Delete “Other Bookmarks”  folder on mobile C
3. Desktop A and B should have empty “Other Bookmarks” 

Move

1. Follow test case “Create”
2. Add a `folder C` in “Bookmarks on mobile C and wait for it to appear on desktop A & B
3. Move  “Other Bookmarks” folder in `folder C` on mobile C
4. Desktop A & B will have all children of "Other Bookmarks" moved to a same name folder under folder C
5. Add `folder D` on desktop A in "Other Bookmarks" permanent node
6. mobile C should have new "Other Bookmarks" folder created with `folder D` in it

Reorder

1. Follow test case “Create”
2. Add a `folder C` in “Bookmarks on mobile C and wait for it to appear on desktop A & B
3. Move  “Other Bookmarks” folder in front of `folder C`
4. Desktop A & B will have bookmarks in "Other Bookmarks" permanent node stay intact

Rename (iOS doesn’t send rename update)

1. Follow test case “Create”
2. Rename “Other Bookmarks”  folder on mobile C
4. Desktop A & B will have all children of "Other Bookmarks" moved to a renamed folder
5. Add `folder D` on desktop A in "Other Bookmarks" permanent node
6. mobile C should have new "Other Bookmarks" folder created with `folder D` in it

Late joined desktop (1)

1. Go to `about:flag#brave-sync` and enable sync on desktop A 
2. Sync desktop A and mobile C
3. Add `A1.com` in “Other Bookmarks” on desktop A and wait for it to appear in “Other Bookmarks” on mobile C
4. Add `folder C` in “Bookmarks on mobile C  and wait for it to appear on desktop A
5. Move  “Other Bookmarks” folder in `folder C` on mobile C
6. Desktop A will have `A1.com` in “Other Bookmarks” folder in `folder C`
7. Add `A2.com` in “Other Bookmarks” on desktop A and wait for it to appear in “Other Bookmarks” on mobile C
8. Make desktop B  joining sync chain
9. After joining sync chain, add `B1.com` in "Other Bookmarks" permanent node
10. mobile C should have one “Other Bookmarks” with `A2.com` and `B1.com` in it
11. desktop A should have `A2.com` and `B1.com` in its “Other Bookmarks” permanent node

Late joined desktop (2)

1. Go to `about:flag#brave-sync` and enable sync on desktop A 
2. Sync desktop A and mobile C
3. Add `A1.com` in “Other Bookmarks” on desktop A and wait for it to appear in “Other Bookmarks” on mobile C
4. Add `folder C` in “Bookmarks on mobile C  and wait for it to appear on desktop A
5. Move  “Other Bookmarks” folder in `folder C` on mobile C
6. Desktop A will have `A1.com` in “Other Bookmarks” folder in `folder C`
7. Add `A2.com` in “Other Bookmarks” on desktop A and wait for it to appear in “Other Bookmarks” on mobile C
8. Add `B1.com` in "Other Bookmarks" permanent node before joining the sync chain
9. mobile C should have one “Other Bookmarks” with `A2.com` and `B1.com` in it
10. desktop A should have `A2.com` and `B1.com` in its “Other Bookmarks” permanent node

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@darkdh darkdh self-assigned this Jan 22, 2020
@darkdh darkdh force-pushed the restore-other-bookmarks branch 4 times, most recently from 4d0d386 to ec9dba8 Compare January 28, 2020 18:28
@darkdh darkdh force-pushed the restore-other-bookmarks branch 2 times, most recently from 4d683e0 to e556675 Compare February 4, 2020 17:58
@darkdh darkdh marked this pull request as ready for review February 6, 2020 01:13
@darkdh darkdh requested a review from bridiver as a code owner February 6, 2020 01:13
@darkdh darkdh force-pushed the restore-other-bookmarks branch from 8b8f4e3 to d601f2f Compare February 6, 2020 05:13
@darkdh darkdh force-pushed the restore-other-bookmarks branch 2 times, most recently from 88b349a to 5052d1a Compare February 6, 2020 23:21
@darkdh darkdh force-pushed the restore-other-bookmarks branch from cf793d8 to 0a1f04a Compare February 8, 2020 00:30
Copy link
Contributor

@AlexeyBarabash AlexeyBarabash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

This reverts commit edd63cf, reversing
changes made to c7202dc.
(at the end of bookmarks bar and still has the same name as other
 bookmarks node)
other node (permanent node) on dekstop
"Other Bookmarks" is moved, renamed or reordered.
When remapping happens, we also move existing children of "Other
Bookmarks" node to new folder we are about to create
2. Add a missing dep
3. Put Other Bookmark migration in RegisterProfilePrefsForMigration
@darkdh darkdh force-pushed the restore-other-bookmarks branch from d4c494d to e0d275c Compare February 20, 2020 20:47
@darkdh
Copy link
Member Author

darkdh commented Feb 20, 2020

only CI failure is

13:48:56  1 test timed out:
13:48:56      BraveRewardsBrowserTest.RecurringTipForVerifiedPublisher (../../brave/components/brave_rewards/browser/rewards_service_browsertest.cc:2366

which is not related to this PR
https://ci.brave.com/job/brave-browser-build-pr/job/restore-other-bookmarks/8//flowGraphTable/?auto_refresh=false

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

Successfully merging this pull request may close these issues.

Other bookmarks is missing, breaking bookmarks API
3 participants