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"');
* 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.
*/
SigninSyncConfirmationTest = class extends PolymerTest {
// eslint-disable-next-line no-var
var SigninSyncConfirmationTest = class extends PolymerTest {
/** @override */
get typedefCppFixture() {
return 'SigninBrowserTest';
......
......@@ -9,7 +9,7 @@ cr.define('signin_sync_confirmation', function() {
setup(function() {
PolymerTest.clearBody();
app = document.createElement('sync-confirmation-app');
var accountImageRequested = false;
let accountImageRequested = false;
registerMessageCallback('accountImageRequest', this, function() {
accountImageRequested = true;
});
......@@ -62,11 +62,8 @@ cr.define('signin_sync_confirmation', function() {
// button.
test('recordConsentOnConfirm', function() {
app.$$('#confirmButton').click();
return browserProxy.whenCalled('confirm').then(function(arguments) {
assertEquals(2, arguments.length);
var description = arguments[0];
var confirmation = arguments[1];
return browserProxy.whenCalled('confirm').then(function(
[description, confirmation]) {
assertEquals(
JSON.stringify(STANDARD_CONSENT_DESCRIPTION_TEXT),
JSON.stringify(description));
......@@ -78,11 +75,9 @@ cr.define('signin_sync_confirmation', function() {
// button.
test('recordConsentOnSettingsLink', function() {
app.$$('#settingsButton').click();
return browserProxy.whenCalled('goToSettings').then(function(arguments) {
assertEquals(2, arguments.length);
var description = arguments[0];
var confirmation = arguments[1];
return browserProxy.whenCalled('goToSettings').then(function([
description, confirmation
]) {
assertEquals(
JSON.stringify(STANDARD_CONSENT_DESCRIPTION_TEXT),
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