Index: LayoutTests/inspector/elements/styles-4/styles-source-offsets.html |
diff --git a/LayoutTests/inspector/elements/styles-4/styles-source-offsets.html b/LayoutTests/inspector/elements/styles-4/styles-source-offsets.html |
index 9cfc402e4ad58902b4615166153336682eb877cf..1cb6012476ed212f98df376d6598e5cdf99784dd 100644 |
--- a/LayoutTests/inspector/elements/styles-4/styles-source-offsets.html |
+++ b/LayoutTests/inspector/elements/styles-4/styles-source-offsets.html |
@@ -37,47 +37,19 @@ function test() |
InspectorTest.addResult("['" + property.name + "':'" + property.value + "'" + (property.important ? " !important" : "") + (("parsedOk" in property) ? " non-parsed" : "") +"] @" + InspectorTest.rangeText(property.range)); |
} |
} |
- |
- InspectorTest.selectNodeWithId("mainBody", step1); |
- |
- var resultStyles = {}; |
- |
- function inlineCallback(error, inlineStyle) |
- { |
- if (error) { |
- InspectorTest.addResult("error: " + error); |
- InspectorTest.completeTest(); |
- return; |
- } |
- resultStyles.inlineStyle = inlineStyle; |
- } |
- |
- function matchedCallback(error, matchedCSSRules) |
- { |
- if (error) { |
- InspectorTest.addResult("error: " + error); |
- InspectorTest.completeTest(); |
- return; |
- } |
- resultStyles.matchedCSSRules = matchedCSSRules; |
- } |
+ InspectorTest.selectNodeWithId("mainBody", step1); |
function step1(node) |
{ |
- var promises = [ |
- InspectorTest.CSSAgent.getInlineStylesForNode(node.id, inlineCallback), |
- InspectorTest.CSSAgent.getMatchedStylesForNode(node.id, matchedCallback) |
- ]; |
- Promise.all(promises).then(step2); |
+ InspectorTest.CSSAgent.getMatchedStylesForNode(node.id, onMatchedStyles) |
} |
- function step2() |
+ function onMatchedStyles(error, inlineStyle, attributeStyle, matchedCSSRules) |
{ |
- var matchedCSSRules = resultStyles.matchedCSSRules; |
for (var i = 0; i < matchedCSSRules.length; ++i) |
dumpStyleData(matchedCSSRules[i].rule); |
- dumpStyleData(resultStyles.inlineStyle); |
+ dumpStyleData(inlineStyle); |
InspectorTest.completeTest(); |
} |
} |