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

Commit

Permalink
Disable new tab background for tests
Browse files Browse the repository at this point in the history
Auditors: @bsclifton
Fix: #9240
  • Loading branch information
cezaraugusto committed Jun 15, 2017
1 parent 6478bcd commit 4dae74f
Show file tree
Hide file tree
Showing 40 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/about/adblockTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('about:adblock', function () {
before(function * () {
const url = getTargetAboutUrl('about:adblock')
yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/bookmarksManagerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('about:bookmarks', function () {

function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/braveTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('about:brave tests', function () {
before(function * () {
const url = getTargetAboutUrl('about:brave')
yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/componentUpdaterTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const appConfig = require('../../js/constants/appConfig')
describe('component updater', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/extensionsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const extensionDownloadWaitTime = 30000
describe('about:extensions', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/historyTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('about:history', function () {

function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/ledgerPanelAdvancedPanelTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ let translationsCache = null

function setup (client) {
return client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.waitForVisible(urlInput)
.translations().then(function (translations) {
Expand Down
1 change: 1 addition & 0 deletions test/about/ledgerPanelTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function * setupBrave () {

function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/ledgerTableTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const secondTableForthRow = `${secondTable} [data-row-index="3"]`

function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/newTabTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const aboutNewTabUrl = getTargetAboutUrl('about:newtab')
describe('about:newtab tests', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/preferencesTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const prefsShieldsUrl = 'about:preferences#shields'

function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/about/stylesTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('about:styles', function () {
before(function * () {
const url = getTargetAboutUrl('about:styles')
yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/app/renderer/components/messageBoxTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ let alertText
describe('MessageBox component tests', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForEnabled(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/app/sessionStoreTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('sessionStore', function () {
yield Brave.startApp()
yield setup(Brave.app.client)
yield Brave.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.onClearBrowsingData({browserHistory: true})
.waitForUrl(Brave.newTabUrl)
Expand Down
1 change: 1 addition & 0 deletions test/bookmark-components/bookmarksTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const siteTags = require('../../js/constants/siteTags')
describe('bookmark tests', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForEnabled(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/bookmark-components/bookmarksToolbarTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const siteTags = require('../../js/constants/siteTags')

function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForEnabled(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/bravery-components/braveryPanelTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const settings = require('../../js/constants/settings')
describe('Bravery Panel', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/bravery-components/clearBrowsingDataPanelTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const siteSettingsList = require('../../js/data/siteSettingsList')
describe('Clear Browsing Panel', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/bravery-components/flashTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {notificationBar, urlInput} = require('../lib/selectors')
describe('flash install interception', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.waitForVisible(urlInput)
.changeSetting('security.flash.installed', true)
Expand Down
1 change: 1 addition & 0 deletions test/bravery-components/noScriptTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const result = '#result'

function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/bravery-components/notificationBarTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const {AUTOPLAY_MEDIA} = require('../../js/constants/settings')
describe('notificationBar permissions', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.waitForVisible(urlInput)
.changeSetting('general.disable-title-mode', false)
Expand Down
1 change: 1 addition & 0 deletions test/bravery-components/safebrowsingTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const link = '#clickme'
describe('safebrowsing interception', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.waitForVisible(urlInput)
}
Expand Down
1 change: 1 addition & 0 deletions test/contents/autofillTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const formCreditYearInput = '[name="43ccexp_yy"]'
describe('Autofill', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/contents/contentLoadingTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {urlInput} = require('../lib/selectors')
describe('content loading', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/contents/errorPageTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('errorPage', function () {

beforeEach(function * () {
yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.waitForVisible(urlInput)
})
Expand Down
1 change: 1 addition & 0 deletions test/misc-components/contextMenuTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {urlInput} = require('../lib/selectors')
describe('ContextMenu', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForEnabled(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/misc-components/downloadItemTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const {

function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/misc-components/findbarTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('findBar', function () {
yield setup(this.app.client)
const url = Brave.server.url('find_in_page.html')
yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.changeSetting('general.disable-title-mode', false)
.tabByIndex(0)
.url(url)
Expand Down
1 change: 1 addition & 0 deletions test/misc-components/syncTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const checkSiteSetting = function (hostPattern, setting, value) {
function * setupBrave (client) {
Brave.addCommands()
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
}
Expand Down
9 changes: 9 additions & 0 deletions test/misc-components/windowTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ describe('application window', function () {

it('opens a window and loads the UI', function * () {
yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.windowByIndex(0)
Expand Down Expand Up @@ -44,6 +45,7 @@ describe('application window', function () {

before(function * () {
yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.windowByIndex(0)
Expand Down Expand Up @@ -158,6 +160,7 @@ describe('application window', function () {

before(function * () {
yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.resizeWindow(600, 700)
Expand Down Expand Up @@ -206,6 +209,7 @@ describe('application window', function () {
this.page1 = Brave.server.url('page1.html')

yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.waitForUrl(Brave.newTabUrl)
.loadUrl(Brave.server.url('window_open.html'))
Expand Down Expand Up @@ -327,6 +331,7 @@ describe('application window', function () {
this.page1 = Brave.server.urlWithIpAddress('page1.html')

yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.waitForUrl(Brave.newTabUrl)
.loadUrl(this.window_open_page)
Expand Down Expand Up @@ -530,6 +535,7 @@ describe('application window', function () {
this.page1 = Brave.server.urlWithIpAddress('page1.html')

yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(activeWebview)
Expand Down Expand Up @@ -566,6 +572,7 @@ describe('application window', function () {
var page1 = Brave.server.url('page1.html')

yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(activeWebview)
Expand Down Expand Up @@ -608,6 +615,7 @@ describe('application window', function () {
this.page2 = Brave.server.url('page2.html')

yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.waitForUrl(Brave.newTabUrl)
.loadUrl(this.clickWithTargetPage)
Expand Down Expand Up @@ -767,6 +775,7 @@ describe('application window', function () {
this.page1 = Brave.server.url('close.html')

yield this.app.client
.changeSetting('tabs.show-dashboard-images', false)
.waitForBrowserWindow()
.waitForUrl(Brave.newTabUrl)
.loadUrl(this.page1)
Expand Down
1 change: 1 addition & 0 deletions test/navbar-components/navigationBarTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const messages = require('../../js/constants/messages')
describe('navigationBar tests', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.windowByUrl(Brave.browserWindowUrl)
.waitForEnabled(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/navbar-components/navigatorTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {urlInput, braveMenu, braveryPanel, braveryPanelContainer} = require('../l
describe('navigator component tests', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/navbar-components/siteInfoTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const {urlInput, urlbarIcon, siteInfoDialog, viewCertificateButton} = require('.
describe('siteInfo component tests', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/navbar-components/urlBarSuggestionsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const aboutHistoryState = require('../../app/common/state/aboutHistoryState')
describe('urlBarSuggestions', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForVisible(urlInput)
Expand Down
1 change: 1 addition & 0 deletions test/navbar-components/urlBarTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config = require('../../js/constants/config')
describe('urlBar tests', function () {
function * setup (client) {
yield client
.changeSetting('tabs.show-dashboard-images', false)
.waitForUrl(Brave.newTabUrl)
.waitForBrowserWindow()
.waitForEnabled(urlInput)
Expand Down
Loading

0 comments on commit 4dae74f

Please sign in to comment.