blob: 96c69083c3131f05daf0cc8cab09347f72846049 [file] [log] [blame]
Tim van der Lippe83f02be2020-01-23 11:11:401// Copyright 2017 The Chromium Authors. All rights reserved.
Blink Reformat4c46d092018-04-07 15:32:372// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5/**
6 * @fileoverview using private properties isn't a Closure violation in tests.
7 * @suppress {accessControls}
8 */
9
10SecurityTestRunner.dumpSecurityPanelSidebarOrigins = function() {
Livvie Lin8370dd42019-04-22 22:34:1511 for (const key in Security.SecurityPanelSidebarTree.OriginGroup) {
12 const originGroup = Security.SecurityPanelSidebarTree.OriginGroup[key];
13 const element = Security.SecurityPanel._instance()._sidebarTree._originGroups.get(originGroup);
Blink Reformat4c46d092018-04-07 15:32:3714
Tim van der Lippe1d6e57a2019-09-30 11:55:3415 if (element.hidden) {
Blink Reformat4c46d092018-04-07 15:32:3716 continue;
Tim van der Lippe1d6e57a2019-09-30 11:55:3417 }
Blink Reformat4c46d092018-04-07 15:32:3718
Livvie Lin8370dd42019-04-22 22:34:1519 TestRunner.addResult('Group: ' + element.title);
20 const originTitles = element.childrenListElement.getElementsByTagName('span');
Blink Reformat4c46d092018-04-07 15:32:3721
22 for (const originTitle of originTitles) {
Tim van der Lippe1d6e57a2019-09-30 11:55:3423 if (originTitle.className !== 'tree-element-title') {
Blink Reformat4c46d092018-04-07 15:32:3724 TestRunner.dumpDeepInnerHTML(originTitle);
Tim van der Lippe1d6e57a2019-09-30 11:55:3425 }
Blink Reformat4c46d092018-04-07 15:32:3726 }
27 }
28};
29
30SecurityTestRunner.dispatchRequestFinished = function(request) {
31 TestRunner.networkManager.dispatchEventToListeners(SDK.NetworkManager.Events.RequestFinished, request);
32};