Commit 3bce5306 authored by James Cook's avatar James Cook Committed by Commit Bot

Add .eslintrc.js to chrome/test/data/webui/signin

Fix implicit global, use of 'var', and binding a variable 'arguments'.

Bug: none
Test: browser_tests
Change-Id: Ibfecdac67163f2b09e0c10ea9fc17696e1eaf1dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1641519
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665972}
parent cff68299
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module.exports = {
'rules': {
'no-var': 'error',
},
};
...@@ -14,7 +14,8 @@ GEN('#include "chrome/test/data/webui/signin_browsertest.h"'); ...@@ -14,7 +14,8 @@ GEN('#include "chrome/test/data/webui/signin_browsertest.h"');
* chrome/browser/resources/signin/dice_sync_confirmation/sync_confirmation.html. * chrome/browser/resources/signin/dice_sync_confirmation/sync_confirmation.html.
* This has to be declared as a variable for TEST_F to find it correctly. * This has to be declared as a variable for TEST_F to find it correctly.
*/ */
SigninSyncConfirmationTest = class extends PolymerTest { // eslint-disable-next-line no-var
var SigninSyncConfirmationTest = class extends PolymerTest {
/** @override */ /** @override */
get typedefCppFixture() { get typedefCppFixture() {
return 'SigninBrowserTest'; return 'SigninBrowserTest';
......
...@@ -9,7 +9,7 @@ cr.define('signin_sync_confirmation', function() { ...@@ -9,7 +9,7 @@ cr.define('signin_sync_confirmation', function() {
setup(function() { setup(function() {
PolymerTest.clearBody(); PolymerTest.clearBody();
app = document.createElement('sync-confirmation-app'); app = document.createElement('sync-confirmation-app');
var accountImageRequested = false; let accountImageRequested = false;
registerMessageCallback('accountImageRequest', this, function() { registerMessageCallback('accountImageRequest', this, function() {
accountImageRequested = true; accountImageRequested = true;
}); });
...@@ -62,11 +62,8 @@ cr.define('signin_sync_confirmation', function() { ...@@ -62,11 +62,8 @@ cr.define('signin_sync_confirmation', function() {
// button. // button.
test('recordConsentOnConfirm', function() { test('recordConsentOnConfirm', function() {
app.$$('#confirmButton').click(); app.$$('#confirmButton').click();
return browserProxy.whenCalled('confirm').then(function(arguments) { return browserProxy.whenCalled('confirm').then(function(
assertEquals(2, arguments.length); [description, confirmation]) {
var description = arguments[0];
var confirmation = arguments[1];
assertEquals( assertEquals(
JSON.stringify(STANDARD_CONSENT_DESCRIPTION_TEXT), JSON.stringify(STANDARD_CONSENT_DESCRIPTION_TEXT),
JSON.stringify(description)); JSON.stringify(description));
...@@ -78,11 +75,9 @@ cr.define('signin_sync_confirmation', function() { ...@@ -78,11 +75,9 @@ cr.define('signin_sync_confirmation', function() {
// button. // button.
test('recordConsentOnSettingsLink', function() { test('recordConsentOnSettingsLink', function() {
app.$$('#settingsButton').click(); app.$$('#settingsButton').click();
return browserProxy.whenCalled('goToSettings').then(function(arguments) { return browserProxy.whenCalled('goToSettings').then(function([
assertEquals(2, arguments.length); description, confirmation
var description = arguments[0]; ]) {
var confirmation = arguments[1];
assertEquals( assertEquals(
JSON.stringify(STANDARD_CONSENT_DESCRIPTION_TEXT), JSON.stringify(STANDARD_CONSENT_DESCRIPTION_TEXT),
JSON.stringify(description)); JSON.stringify(description));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment