Browser-laptop: Background pages don't preserve bookmarked icon when later clicked.

Created on 20 May 2017  路  3Comments  路  Source: brave/browser-laptop

Test plan

https://github.com/brave/browser-laptop/pull/9003#issue-230549061


Describe the issue you encountered: Bookmarked page opened with middle mouse button does not have the filled star icon, until the page is completely loaded

  • Platform (Win7, 8, 10? macOS? Linux distro?): Tested on Debian

  • Brave Version (revision SHA): 0.15.306

  • Steps to reproduce:

    1. Open https://github.com
    2. Bookmark the page
    3. Click the middle mouse button to open it in a new tab
  • Actual result: The tab does not have the filled star icon

  • Expected result: It should.

  • Is this an issue in the currently released version?
    No. The star icon is filled as soon as the page starts loading, even if it is not at the same time. The lag became noticeable on 0.15.306.

  • Extra QA steps:
    1.
    2.
    3.

  • Screenshot if needed:

  • Any related issues:

Qchecked-Linux Qchecked-Win64 Qchecked-macOS Qtest-plan-specified bug featurURLbar featurbookmarks regression release-noteexclude

All 3 comments

clipboard01

I don't have a fix yet but I wrote a test for this:

diff --git a/test/bookmark-components/bookmarksTest.js b/test/bookmark-components/bookmarksTest.js
index 9d7e7098..7cf8f2c6 100644
--- a/test/bookmark-components/bookmarksTest.js
+++ b/test/bookmark-components/bookmarksTest.js
@@ -1,4 +1,4 @@
-/* global describe, it, before */
+/* global describe, it, before, beforeEach */

 const Brave = require('../lib/brave')
 const Immutable = require('immutable')
@@ -249,6 +249,41 @@ describe('bookmark tests', function () {
     })
   })

+  describe('bookmark star button is preserved', function () {
+    Brave.beforeEach(this)
+    beforeEach(function * () {
+      this.page1Url = Brave.server.url('page1.html')
+      this.page2Url = Brave.server.url('page2.html')
+      yield setup(this.app.client)
+      yield this.app.client
+        .addSite({
+          location: this.page1Url,
+          folderId: 1,
+          parentFolderId: 0,
+          tags: [siteTags.BOOKMARK]
+        }, siteTags.BOOKMARK)
+    })
+
+    it('on new active tabs', function * () {
+      yield this.app.client
+        .waitForVisible(navigatorNotBookmarked)
+        .newTab({ url: this.page1Url })
+        .waitForVisible(navigatorBookmarked)
+    })
+    it('on new active tabs', function * () {
+      yield this.app.client
+        .waitForVisible(navigatorNotBookmarked)
+        .newTab({ url: this.page1Url, active: false })
+        .waitForUrl(this.page1Url)
+        .tabByIndex(0)
+        .loadUrl(this.page2Url)
+        .waitForUrl(this.page2Url)
+        .windowByUrl(Brave.browserWindowUrl)
+        .ipcSend('shortcut-next-tab')
+        .waitForVisible(navigatorBookmarked)
+    })
+  })
+
   describe('menu behavior', function () {
     Brave.beforeAll(this)

the fix works like a charm, thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bbondy picture bbondy  路  3Comments

jkup picture jkup  路  3Comments

lukemulks picture lukemulks  路  3Comments

luixxiul picture luixxiul  路  3Comments

jonathansampson picture jonathansampson  路  3Comments