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

Commit

Permalink
Use proper notification message
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed May 8, 2017
1 parent e9158b5 commit b8fc59c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/browser/reducers/autoplayReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const showAutoplayMessageBox = (location, tabId) => {
if (originSettings && originSettings.get('noAutoplay') === true) {
return
}
const message = locale.translation('autoplayBlocked', {origin})
const message = locale.translation('allowAutoplay', {origin})

appActions.showNotification({
buttons: [
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/en-US/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@ copied=Copied!
connectionError=Server connection failed. Please make sure you are connected to the Internet.
unknownError=Oops, something went wrong.
browserActionButton.title={{name}}
autoplayBlocked=Media autoplay on {{origin}} has been blocked. Do you want to allow it?
allowAutoplay=Allow {{origin}} to autoplay media?
2 changes: 1 addition & 1 deletion app/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ var rendererIdentifiers = function () {
'importSuccessOk',
'connectionError',
'unknownError',
'autoplayBlocked'
'allowAutoplay'
]
}

Expand Down
10 changes: 5 additions & 5 deletions test/bravery-components/braveryPanelTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ describe('Bravery Panel', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(notificationBar)
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('Media autoplay'))
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
})

Expand All @@ -539,7 +539,7 @@ describe('Bravery Panel', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(notificationBar)
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('Media autoplay'))
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.openBraveMenu(braveMenu, braveryPanel)
.click(noAutoplaySwitch)
Expand Down Expand Up @@ -567,7 +567,7 @@ describe('Bravery Panel', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(notificationBar)
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('Media autoplay'))
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.openBraveMenu(braveMenu, braveryPanel)
.click(noAutoplaySwitch)
Expand Down Expand Up @@ -595,7 +595,7 @@ describe('Bravery Panel', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(notificationBar)
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('Media autoplay'))
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('button=Yes')
.tabByUrl(url)
Expand All @@ -621,7 +621,7 @@ describe('Bravery Panel', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(notificationBar)
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('Media autoplay'))
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('[data-l10n-id=rememberDecision]')
.click('button=No')
Expand Down

0 comments on commit b8fc59c

Please sign in to comment.