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

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

Issue 268293003: DevTools: Get rid of WebInspector.panels (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/inspector/elements-test.js
diff --git a/LayoutTests/http/tests/inspector/elements-test.js b/LayoutTests/http/tests/inspector/elements-test.js
index 009560abf71259717556d0df6c41a035c8a92d62..ebf86f6eaac3404cfbdf79f9f54413d15f02e54a 100644
--- a/LayoutTests/http/tests/inspector/elements-test.js
+++ b/LayoutTests/http/tests/inspector/elements-test.js
@@ -164,7 +164,7 @@ InspectorTest.selectNodeAndWaitForStylesWithComputed = function(idValue, callbac
function stylesCallback(targetNode)
{
InspectorTest.addSniffer(WebInspector.ComputedStyleSidebarPane.prototype, "onContentReady", callback);
- WebInspector.panels.elements.sidebarPanes.computedStyle.expand();
+ WebInspector.inspectorView.panel("elements").sidebarPanes.computedStyle.expand();
}
InspectorTest.selectNodeAndWaitForStyles(idValue, stylesCallback);
@@ -172,7 +172,7 @@ InspectorTest.selectNodeAndWaitForStylesWithComputed = function(idValue, callbac
InspectorTest.firstElementsTreeOutline = function()
{
- return WebInspector.panels.elements._treeOutlines[0];
+ return WebInspector.inspectorView.panel("elements")._treeOutlines[0];
}
InspectorTest.dumpSelectedElementStyles = function(excludeComputed, excludeMatched, omitLonghands, includeSelectorGroupMarks)
@@ -203,7 +203,7 @@ InspectorTest.dumpSelectedElementStyles = function(excludeComputed, excludeMatch
return result;
}
- var styleSections = WebInspector.panels.elements.sidebarPanes.styles.sections;
+ var styleSections = WebInspector.inspectorView.panel("elements").sidebarPanes.styles.sections;
for (var pseudoId in styleSections) {
var pseudoName = WebInspector.StylesSidebarPane.PseudoIdNames[pseudoId];
var sections = styleSections[pseudoId];
@@ -260,7 +260,7 @@ InspectorTest.expandAndDumpSelectedElementEventListeners = function(callback)
InspectorTest.expandSelectedElementEventListeners = function(callback)
{
- var sidebarPane = WebInspector.panels.elements.sidebarPanes.eventListeners;
+ var sidebarPane = WebInspector.inspectorView.panel("elements").sidebarPanes.eventListeners;
sidebarPane.expand();
InspectorTest.runAfterPendingDispatches(function() {
@@ -270,7 +270,7 @@ InspectorTest.expandSelectedElementEventListeners = function(callback)
InspectorTest.expandSelectedElementEventListenersSubsections = function(callback)
{
- var eventListenerSections = WebInspector.panels.elements.sidebarPanes.eventListeners.sections;
+ var eventListenerSections = WebInspector.inspectorView.panel("elements").sidebarPanes.eventListeners.sections;
for (var i = 0; i < eventListenerSections.length; ++i)
eventListenerSections[i].expand();
@@ -282,7 +282,7 @@ InspectorTest.expandSelectedElementEventListenersSubsections = function(callback
InspectorTest.expandSelectedElementEventListenersEventBars = function(callback)
{
- var eventListenerSections = WebInspector.panels.elements.sidebarPanes.eventListeners.sections;
+ var eventListenerSections = WebInspector.inspectorView.panel("elements").sidebarPanes.eventListeners.sections;
for (var i = 0; i < eventListenerSections.length; ++i) {
var eventBarChildren = eventListenerSections[i]._eventBars.children;
for (var j = 0; j < eventBarChildren.length; ++j)
@@ -300,7 +300,7 @@ InspectorTest.dumpSelectedElementEventListeners = function(callback)
return "[clipped-for-test]/" + value.replace(/(.*?\/)LayoutTests/, "LayoutTests");
}
- var eventListenerSections = WebInspector.panels.elements.sidebarPanes.eventListeners.sections;
+ var eventListenerSections = WebInspector.inspectorView.panel("elements").sidebarPanes.eventListeners.sections;
for (var i = 0; i < eventListenerSections.length; ++i) {
var section = eventListenerSections[i];
var eventType = section._title;
@@ -361,7 +361,7 @@ InspectorTest.dumpObjectPropertySectionDeep = function(section)
// FIXME: this returns the first tree item found (may fail for same-named properties in a style).
InspectorTest.getElementStylePropertyTreeItem = function(propertyName)
{
- var styleSections = WebInspector.panels.elements.sidebarPanes.styles.sections[0];
+ var styleSections = WebInspector.inspectorView.panel("elements").sidebarPanes.styles.sections[0];
var elementStyleSection = styleSections[1];
return InspectorTest.getFirstPropertyTreeItemForSection(elementStyleSection, propertyName);
};
@@ -369,7 +369,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 styleSections = WebInspector.panels.elements.sidebarPanes.styles.sections[0];
+ var styleSections = WebInspector.inspectorView.panel("elements").sidebarPanes.styles.sections[0];
for (var i = 1; i < styleSections.length; ++i) {
var treeItem = InspectorTest.getFirstPropertyTreeItemForSection(styleSections[i], propertyName);
if (treeItem)
@@ -728,7 +728,7 @@ InspectorTest.addNewRule = function(selector, callback)
{
// Click "Add new rule".
document.getElementById("add-style-button-test-id").click();
- var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
+ var section = WebInspector.inspectorView.panel("elements").sidebarPanes.styles.sections[0][2];
if (typeof selector === "string")
section._selectorElement.textContent = selector;
section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));

Powered by Google App Engine
This is Rietveld 408576698