Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(758)

Side by Side Diff: chrome/browser/resources/chromeos/switch_access/test_support.js

Issue 2902033002: WebUI: Fix violations of no-extra-semi lint rule. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function TestSupport() {}; 5 function TestSupport() {}
6 6
7 TestSupport.prototype = { 7 TestSupport.prototype = {
8 /** 8 /**
9 * Connect |parent| and |children| to each other. 9 * Connect |parent| and |children| to each other.
10 * 10 *
11 * @param {!Object} parent 11 * @param {!Object} parent
12 * @param {Array<Object>} children 12 * @param {Array<Object>} children
13 */ 13 */
14 setChildren: function(parent, children) { 14 setChildren: function(parent, children) {
15 // Connect parent to its children. 15 // Connect parent to its children.
16 parent.children = children; 16 parent.children = children;
17 parent.firstChild = children[0]; 17 parent.firstChild = children[0];
18 parent.lastChild = children[children.length - 1]; 18 parent.lastChild = children[children.length - 1];
19 19
20 for (let i = 0; i < children.length; i++) { 20 for (let i = 0; i < children.length; i++) {
21 let child = children[i]; 21 let child = children[i];
22 22
23 // Connect children to their parent. 23 // Connect children to their parent.
24 child.parent = parent; 24 child.parent = parent;
25 25
26 // Connect children to each other 26 // Connect children to each other
27 if (i < children.length - 1) 27 if (i < children.length - 1)
28 child.nextSibling = children[i + 1]; 28 child.nextSibling = children[i + 1];
29 if (i > 0) 29 if (i > 0)
30 child.previousSibling = children[i - 1]; 30 child.previousSibling = children[i - 1];
31 } 31 }
32 }, 32 },
33 }; 33 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698