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

Commit

Permalink
Merge pull request #7754 from cezaraugusto/hotfix/7724
Browse files Browse the repository at this point in the history
Instantly show newTab title instead of location
  • Loading branch information
bsclifton authored Mar 17, 2017
2 parents 181c997 + 3034130 commit 903cfea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/components/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ class Tab extends ImmutableComponent {
// to wait for the title to be parsed.
if (this.props.tab.get('location') === 'about:blank') {
return locale.translation('aboutBlankTitle')
} else if (this.props.tab.get('location') === 'about:newtab') {
return locale.translation('newTab')
}
// YouTube tries to change the title to add a play icon when
// there is audio. Since we have our own audio indicator we get
Expand Down
10 changes: 10 additions & 0 deletions test/components/tabTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ describe('tab tests', function () {
yield this.app.client
.waitForVisible('webview[partition="persist:default"]')
})

it('shows new tab title instead of about:newtab', function * () {
yield this.app.client
.ipcSend(messages.SHORTCUT_NEW_FRAME)
.waitForExist('[data-test-id="tab"][data-frame-key="2"]')
.waitUntil(function () {
return this.getText('[data-test-id="tab"][data-frame-key="2"]')
.then((title) => title === 'New Tab')
})
})
})

describe('new tab button', function () {
Expand Down

0 comments on commit 903cfea

Please sign in to comment.