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

Cloned tabs appear next to the original one #3134

Merged
merged 2 commits into from
Aug 12, 2016

Conversation

ayumi
Copy link
Contributor

@ayumi ayumi commented Aug 11, 2016

Added test

Fix #2779

.ipcSend('shortcut-set-active-frame-by-index', 0)
.windowByUrl(Brave.browserWindowUrl)
.ipcSend(messages.SHORTCUT_ACTIVE_FRAME_CLONE)
.windowByUrl(Brave.browserWindowUrl)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is one of the places where you really have to be careful. There is a race condition between cloning the frame and selecting the window. If the actual frame is created after the windowByUrl call, but before the waitForExist call, the waitForExist will fail because it's actually looking for the selector the new tab

Copy link
Collaborator

Choose a reason for hiding this comment

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

one option is to wait until getTabCount returns the incremented count

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, that is helpful – I decided to check getTabCount

@ayumi
Copy link
Contributor Author

ayumi commented Aug 12, 2016

@bridiver ty for the feedback. Have updated tests – can you re-review?

@bridiver
Copy link
Collaborator

++

@bbondy bbondy merged commit 10e92d6 into brave:master Aug 12, 2016
@luixxiul luixxiul added this to the 0.11.5dev milestone Aug 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants