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

Commit 903cfea

Browse files
authored
Merge pull request #7754 from cezaraugusto/hotfix/7724
Instantly show newTab title instead of location
2 parents 181c997 + 3034130 commit 903cfea

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

js/components/tab.js

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class Tab extends ImmutableComponent {
8585
// to wait for the title to be parsed.
8686
if (this.props.tab.get('location') === 'about:blank') {
8787
return locale.translation('aboutBlankTitle')
88+
} else if (this.props.tab.get('location') === 'about:newtab') {
89+
return locale.translation('newTab')
8890
}
8991
// YouTube tries to change the title to add a play icon when
9092
// there is audio. Since we have our own audio indicator we get

test/components/tabTest.js

+10
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ describe('tab tests', function () {
7474
yield this.app.client
7575
.waitForVisible('webview[partition="persist:default"]')
7676
})
77+
78+
it('shows new tab title instead of about:newtab', function * () {
79+
yield this.app.client
80+
.ipcSend(messages.SHORTCUT_NEW_FRAME)
81+
.waitForExist('[data-test-id="tab"][data-frame-key="2"]')
82+
.waitUntil(function () {
83+
return this.getText('[data-test-id="tab"][data-frame-key="2"]')
84+
.then((title) => title === 'New Tab')
85+
})
86+
})
7787
})
7888

7989
describe('new tab button', function () {

0 commit comments

Comments
 (0)