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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details.html

Issue 2112673003: [DevTools] Move suspended generator location to internal properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details.html
index 5f5af6d85c227c96c03102687d31b42c82b58720..e9f5add86fa38f418a39efa0f95bb59a8a78667e 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details.html
@@ -42,15 +42,6 @@ forward(anonymousGenIter, 3);
function test()
{
- function dumpGeneratorObjectDetails(details)
- {
- InspectorTest.addResult("functionName: \"" + details.functionName + "\"");
- InspectorTest.addResult("lineNumber: " + (details.location.lineNumber + 1));
- InspectorTest.addResult("columnNumber: " + details.location.columnNumber);
- InspectorTest.addResult("scriptId is valid: " + !!details.location.scriptId);
- InspectorTest.addResult("status: " + details.status);
- }
-
function performStandardTestCase(pageExpression, next)
{
InspectorTest.evaluateInPage(pageExpression, didEvaluate);
@@ -58,13 +49,22 @@ function test()
function didEvaluate(remote)
{
InspectorTest.addResult(pageExpression + ": type = " + remote.type + ", subtype = " + remote.subtype);
- InspectorTest.DebuggerAgent.getGeneratorObjectDetails(remote.objectId, didGetDetails);
+ remote.getOwnPropertiesPromise().then(dumpInternalProperties.bind(null, remote));
+ }
+
+ function dumpInternalProperties(remote, properties)
+ {
+ InspectorTest.assertTrue(properties && properties.internalProperties, "FAIL: no properties");
+ for (var prop of properties.internalProperties)
+ InspectorTest.addResult(prop.name + " = " + prop.value.description);
+ remote.debuggerModel().generatorObjectLocation(remote).then(dumpLocation);
}
- function didGetDetails(error, response)
+ function dumpLocation(location)
{
- InspectorTest.assertTrue(!error, "FAIL: " + error);
- dumpGeneratorObjectDetails(response);
+ InspectorTest.addResult("lineNumber = " + location.lineNumber);
+ InspectorTest.addResult("columnNumber = " + location.columnNumber);
+ InspectorTest.addResult("script is valid: " + (location.script() ? "yes" : "no"));
next();
}
}

Powered by Google App Engine
This is Rietveld 408576698