Tim van der Lippe | 83f02be | 2020-01-23 11:11:40 | [diff] [blame^] | 1 | // Copyright 2017 The Chromium Authors. All rights reserved. |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 2 | // 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 | |
| 10 | SecurityTestRunner.dumpSecurityPanelSidebarOrigins = function() { |
Livvie Lin | 8370dd4 | 2019-04-22 22:34:15 | [diff] [blame] | 11 | 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 Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 14 | |
Tim van der Lippe | 1d6e57a | 2019-09-30 11:55:34 | [diff] [blame] | 15 | if (element.hidden) { |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 16 | continue; |
Tim van der Lippe | 1d6e57a | 2019-09-30 11:55:34 | [diff] [blame] | 17 | } |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 18 | |
Livvie Lin | 8370dd4 | 2019-04-22 22:34:15 | [diff] [blame] | 19 | TestRunner.addResult('Group: ' + element.title); |
| 20 | const originTitles = element.childrenListElement.getElementsByTagName('span'); |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 21 | |
| 22 | for (const originTitle of originTitles) { |
Tim van der Lippe | 1d6e57a | 2019-09-30 11:55:34 | [diff] [blame] | 23 | if (originTitle.className !== 'tree-element-title') { |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 24 | TestRunner.dumpDeepInnerHTML(originTitle); |
Tim van der Lippe | 1d6e57a | 2019-09-30 11:55:34 | [diff] [blame] | 25 | } |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 26 | } |
| 27 | } |
| 28 | }; |
| 29 | |
| 30 | SecurityTestRunner.dispatchRequestFinished = function(request) { |
| 31 | TestRunner.networkManager.dispatchEventToListeners(SDK.NetworkManager.Events.RequestFinished, request); |
| 32 | }; |