From cd9c8dfcb1bbba4f4fe006b18713ce72e65c97da Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Mon, 5 Oct 2020 16:16:10 +0100 Subject: [PATCH] Expose location symbol function for layout tests R=szuend@chromium.org Bug: 1011811 Change-Id: Iace5dc83b94f9ffcfb4393cf485f5db26dbdde4b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2450035 Auto-Submit: Tim van der Lippe Commit-Queue: Paul Lewis Reviewed-by: Paul Lewis --- front_end/sources/JavaScriptBreakpointsSidebarPane.js | 6 ++++++ front_end/sources/sources-legacy.js | 2 ++ 2 files changed, 8 insertions(+) diff --git a/front_end/sources/JavaScriptBreakpointsSidebarPane.js b/front_end/sources/JavaScriptBreakpointsSidebarPane.js index 855c3a318b..3b89d5674b 100644 --- a/front_end/sources/JavaScriptBreakpointsSidebarPane.js +++ b/front_end/sources/JavaScriptBreakpointsSidebarPane.js @@ -524,6 +524,12 @@ class BreakpointItem { } export const locationSymbol = Symbol('location'); +/** + * @param {!Element} element + */ +export function retrieveLocationForElement(element) { + return element[locationSymbol]; +} export const checkboxLabelSymbol = Symbol('checkbox-label'); export const snippetElementSymbol = Symbol('snippet-element'); export const breakpointLocationsSymbol = Symbol('locations'); diff --git a/front_end/sources/sources-legacy.js b/front_end/sources/sources-legacy.js index f62a63a1f9..b5a61e4f42 100644 --- a/front_end/sources/sources-legacy.js +++ b/front_end/sources/sources-legacy.js @@ -89,6 +89,8 @@ Sources.InplaceFormatterEditorAction = SourcesModule.InplaceFormatterEditorActio Sources.JavaScriptBreakpointsSidebarPane = SourcesModule.JavaScriptBreakpointsSidebarPane.JavaScriptBreakpointsSidebarPane; +Sources.JavaScriptBreakpointsSidebarPane.retrieveLocationForElement = + SourcesModule.JavaScriptBreakpointsSidebarPane.retrieveLocationForElement; Sources.JavaScriptBreakpointsSidebarPane._locationSymbol = SourcesModule.JavaScriptBreakpointsSidebarPane.locationSymbol; Sources.JavaScriptBreakpointsSidebarPane._checkboxLabelSymbol =