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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
index 28f561e7f5b399a75bea0c273412c11d19193490..baba1f2760640f74562a85505056a301a2bdfa71 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js
@@ -4,12 +4,12 @@ InspectorTest.preloadPanel("elements");
InspectorTest.inlineStyleSection = function()
{
- return WebInspector.panels.elements._stylesWidget._sectionBlocks[0].sections[0];
+ return UI.panels.elements._stylesWidget._sectionBlocks[0].sections[0];
}
InspectorTest.computedStyleWidget = function()
{
- return WebInspector.panels.elements._computedStyleWidget;
+ return UI.panels.elements._computedStyleWidget;
}
InspectorTest.dumpComputedStyle = function(doNotAutoExpand)
@@ -18,7 +18,7 @@ InspectorTest.dumpComputedStyle = function(doNotAutoExpand)
var treeOutline = computed._propertiesOutline;
var children = treeOutline.rootElement().children();
for (var treeElement of children) {
- var property = treeElement[WebInspector.ComputedStyleWidget._propertySymbol];
+ var property = treeElement[Elements.ComputedStyleWidget._propertySymbol];
if (property.name === "width" || property.name === "height")
continue;
var dumpText = "";
@@ -50,7 +50,7 @@ InspectorTest.findComputedPropertyWithName = function(name)
var treeOutline = computed._propertiesOutline;
var children = treeOutline.rootElement().children();
for (var treeElement of children) {
- var property = treeElement[WebInspector.ComputedStyleWidget._propertySymbol];
+ var property = treeElement[Elements.ComputedStyleWidget._propertySymbol];
if (property.name === name)
return treeElement;
}
@@ -59,7 +59,7 @@ InspectorTest.findComputedPropertyWithName = function(name)
InspectorTest.firstMatchedStyleSection = function()
{
- return WebInspector.panels.elements._stylesWidget._sectionBlocks[0].sections[1];
+ return UI.panels.elements._stylesWidget._sectionBlocks[0].sections[1];
}
InspectorTest.firstMediaTextElementInSection = function(section)
@@ -168,7 +168,7 @@ InspectorTest.expandedNodeWithId = function(idValue)
InspectorTest.selectNode = function(node)
{
- return WebInspector.Revealer.revealPromise(node);
+ return Common.Revealer.revealPromise(node);
}
InspectorTest.selectNodeWithId = function(idValue, callback)
@@ -189,7 +189,7 @@ function waitForStylesRebuild(matchFunction, callback, requireRebuild)
callback();
return;
}
- InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_nodeStylesUpdatedForTest", sniff);
+ InspectorTest.addSniffer(Elements.StylesSidebarPane.prototype, "_nodeStylesUpdatedForTest", sniff);
})(null);
}
@@ -220,17 +220,17 @@ InspectorTest.waitForStylesForClass = function(classValue, callback, requireRebu
InspectorTest.waitForSelectorCommitted = function(callback)
{
- InspectorTest.addSniffer(WebInspector.StylePropertiesSection.prototype, "_editingSelectorCommittedForTest", callback);
+ InspectorTest.addSniffer(Elements.StylePropertiesSection.prototype, "_editingSelectorCommittedForTest", callback);
}
InspectorTest.waitForMediaTextCommitted = function(callback)
{
- InspectorTest.addSniffer(WebInspector.StylePropertiesSection.prototype, "_editingMediaTextCommittedForTest", callback);
+ InspectorTest.addSniffer(Elements.StylePropertiesSection.prototype, "_editingMediaTextCommittedForTest", callback);
}
InspectorTest.waitForStyleApplied = function(callback)
{
- InspectorTest.addSniffer(WebInspector.StylePropertyTreeElement.prototype, "styleTextAppliedForTest", callback);
+ InspectorTest.addSniffer(Elements.StylePropertyTreeElement.prototype, "styleTextAppliedForTest", callback);
}
InspectorTest.selectNodeAndWaitForStyles = function(idValue, callback)
@@ -265,7 +265,7 @@ InspectorTest.selectPseudoElementAndWaitForStyles = function(parentId, pseudoTyp
function nodeFound(node)
{
targetNode = node;
- WebInspector.Revealer.reveal(node);
+ Common.Revealer.reveal(node);
}
function stylesUpdated()
@@ -292,19 +292,19 @@ InspectorTest.selectNodeAndWaitForStylesWithComputed = function(idValue, callbac
InspectorTest.firstElementsTreeOutline = function()
{
- return WebInspector.panels.elements._treeOutlines[0];
+ return UI.panels.elements._treeOutlines[0];
}
InspectorTest.filterMatchedStyles = function(text)
{
var regex = text ? new RegExp(text, "i") : null;
InspectorTest.addResult("Filtering styles by: " + text);
- WebInspector.panels.elements._stylesWidget.onFilterChanged(regex);
+ UI.panels.elements._stylesWidget.onFilterChanged(regex);
}
InspectorTest.dumpRenderedMatchedStyles = function()
{
- var sectionBlocks = WebInspector.panels.elements._stylesWidget._sectionBlocks;
+ var sectionBlocks = UI.panels.elements._stylesWidget._sectionBlocks;
for (var block of sectionBlocks) {
for (var section of block.sections) {
// Skip sections which were filtered out.
@@ -352,7 +352,7 @@ InspectorTest.dumpRenderedMatchedStyles = function()
InspectorTest.dumpSelectedElementStyles = function(excludeComputed, excludeMatched, omitLonghands, includeSelectorGroupMarks)
{
- var sectionBlocks = WebInspector.panels.elements._stylesWidget._sectionBlocks;
+ var sectionBlocks = UI.panels.elements._stylesWidget._sectionBlocks;
if (!excludeComputed)
InspectorTest.dumpComputedStyle();
for (var block of sectionBlocks) {
@@ -402,7 +402,7 @@ function extractLinkText(element)
if (!anchor)
return element.textContent;
var anchorText = anchor.textContent;
- var uiLocation = anchor[WebInspector.Linkifier._uiLocationSymbol];
+ var uiLocation = anchor[Components.Linkifier._uiLocationSymbol];
var anchorTarget = uiLocation ? (uiLocation.uiSourceCode.name() + ":" + (uiLocation.lineNumber + 1) + ":" + (uiLocation.columnNumber + 1)) : "";
return anchorText + " -> " + anchorTarget;
}
@@ -433,13 +433,13 @@ InspectorTest.toggleMatchedStyleProperty = function(propertyName, checked)
InspectorTest.eventListenersWidget = function()
{
- WebInspector.viewManager.showView("elements.eventListeners");
- return self.runtime.sharedInstance(WebInspector.EventListenersWidget);
+ UI.viewManager.showView("elements.eventListeners");
+ return self.runtime.sharedInstance(Elements.EventListenersWidget);
}
InspectorTest.showEventListenersWidget = function()
{
- return WebInspector.viewManager.showView("elements.eventListeners");
+ return UI.viewManager.showView("elements.eventListeners");
}
InspectorTest.expandAndDumpSelectedElementEventListeners = function(callback)
@@ -479,7 +479,7 @@ InspectorTest.getElementStylePropertyTreeItem = function(propertyName)
// FIXME: this returns the first tree item found (may fail for same-named properties in a style).
InspectorTest.getMatchedStylePropertyTreeItem = function(propertyName)
{
- var sectionBlocks = WebInspector.panels.elements._stylesWidget._sectionBlocks;
+ var sectionBlocks = UI.panels.elements._stylesWidget._sectionBlocks;
for (var block of sectionBlocks) {
for (var section of block.sections) {
var treeItem = InspectorTest.getFirstPropertyTreeItemForSection(section, propertyName);
@@ -623,7 +623,7 @@ InspectorTest.dumpDOMUpdateHighlights = function(rootNode, callback, depth)
{
var hasHighlights = false;
- InspectorTest.addSniffer(WebInspector.ElementsTreeOutline.prototype, "_updateModifiedNodes", didUpdate);
+ InspectorTest.addSniffer(Elements.ElementsTreeOutline.prototype, "_updateModifiedNodes", didUpdate);
function didUpdate()
{
@@ -638,7 +638,7 @@ InspectorTest.dumpDOMUpdateHighlights = function(rootNode, callback, depth)
function print(treeItem, prefix, depth)
{
if (!treeItem.root) {
- var elementXPath = WebInspector.DOMPresentationUtils.xPath(treeItem.node(), true);
+ var elementXPath = Components.DOMPresentationUtils.xPath(treeItem.node(), true);
var highlightedElements = treeItem.listItemElement.querySelectorAll(".dom-update-highlight");
for (var i = 0; i < highlightedElements.length; ++i) {
var element = highlightedElements[i];
@@ -906,7 +906,7 @@ InspectorTest.dumpBreadcrumb = function(message)
if (message)
InspectorTest.addResult(message + ":");
var result = [];
- var crumbs = WebInspector.panels.elements._breadcrumbs.crumbsElement;
+ var crumbs = UI.panels.elements._breadcrumbs.crumbsElement;
var crumb = crumbs.lastChild;
while (crumb) {
result.unshift(crumb.textContent);
@@ -926,15 +926,15 @@ InspectorTest.matchingSelectors = function(matchedStyles, rule)
InspectorTest.addNewRuleInStyleSheet = function(styleSheetHeader, selector, callback)
{
- InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_addBlankSection", onBlankSection.bind(null, selector, callback));
- WebInspector.panels.elements._stylesWidget._createNewRuleInStyleSheet(styleSheetHeader);
+ InspectorTest.addSniffer(Elements.StylesSidebarPane.prototype, "_addBlankSection", onBlankSection.bind(null, selector, callback));
+ UI.panels.elements._stylesWidget._createNewRuleInStyleSheet(styleSheetHeader);
}
InspectorTest.addNewRule = function(selector, callback)
{
// Click "Add new rule".
document.querySelector(".styles-pane-toolbar").shadowRoot.querySelector(".largeicon-add").click();
- InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_addBlankSection", onBlankSection.bind(null, selector, callback));
+ InspectorTest.addSniffer(Elements.StylesSidebarPane.prototype, "_addBlankSection", onBlankSection.bind(null, selector, callback));
}
function onBlankSection(selector, callback)
@@ -964,7 +964,7 @@ InspectorTest.dumpInspectorHighlightJSON = function(idValue, callback)
InspectorTest.waitForAnimationAdded = function(callback)
{
- InspectorTest.addSniffer(WebInspector.AnimationTimeline.prototype, "_addAnimationGroup", callback);
+ InspectorTest.addSniffer(Animation.AnimationTimeline.prototype, "_addAnimationGroup", callback);
}
InspectorTest.dumpAnimationTimeline = function(timeline)

Powered by Google App Engine
This is Rietveld 408576698