Commit 9fbb79b2 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Remove pesky JS presubmit nits for the runtime loaded test utils

Bug: None
Change-Id: Ief982eb1150918c8f995f6b26332bc594924b856
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1950374Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721905}
parent c991714b
......@@ -75,14 +75,14 @@ function extractElementInfo(element, contentWindow, opt_styleNames) {
*/
test.util.sync.getWindows = () => {
const windows = {};
for (var id in window.appWindows) {
for (const id in window.appWindows) {
const windowWrapper = window.appWindows[id];
windows[id] = {
outerWidth: windowWrapper.contentWindow.outerWidth,
outerHeight: windowWrapper.contentWindow.outerHeight
};
}
for (var id in window.background.dialogs) {
for (const id in window.background.dialogs) {
windows[id] = {
outerWidth: window.background.dialogs[id].outerWidth,
outerHeight: window.background.dialogs[id].outerHeight
......@@ -341,8 +341,8 @@ test.util.sync.setScrollTop = (contentWindow, query, position) => {
*/
test.util.sync.setElementStyles = (contentWindow, query, properties) => {
const element = contentWindow.document.querySelector(query);
for (let [prop, value] of Object.entries(properties)) {
element.style[prop] = value;
for (const [key, value] of Object.entries(properties)) {
element.style[key] = value;
}
};
......@@ -370,10 +370,10 @@ test.util.sync.sendEvent = (contentWindow, targetQuery, event) => {
} else if (typeof targetQuery === 'string') {
target = contentWindow.document.querySelector(targetQuery);
} else if (Array.isArray(targetQuery)) {
let elems = test.util.sync.deepQuerySelectorAll_(
const elements = test.util.sync.deepQuerySelectorAll_(
contentWindow.document, targetQuery);
if (elems.length > 0) {
target = elems[0];
if (elements.length > 0) {
target = elements[0];
}
}
......
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