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

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: addressed comments 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a63a2f3a3336fe3e8100f123a6b231ab4aedfed0 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,15 +49,27 @@ function test()
function didEvaluate(remote)
{
InspectorTest.addResult(pageExpression + ": type = " + remote.type + ", subtype = " + remote.subtype);
- InspectorTest.DebuggerAgent.getGeneratorObjectDetails(remote.objectId, didGetDetails);
+ remote.getOwnPropertiesPromise().then(dumpInternalProperties);
}
- function didGetDetails(error, response)
+ function dumpInternalProperties(properties)
{
- InspectorTest.assertTrue(!error, "FAIL: " + error);
- dumpGeneratorObjectDetails(response);
+ InspectorTest.assertTrue(properties && properties.internalProperties, "FAIL: no properties");
+ for (var prop of properties.internalProperties) {
+ if (prop.name !== "[[GeneratorLocation]]")
+ InspectorTest.addResult(prop.name + " = " + prop.value.description);
+ else
+ dumpLocation(prop.value.value);
+ }
next();
}
+
+ function dumpLocation(location)
+ {
+ InspectorTest.addResult("lineNumber = " + location.lineNumber);
+ InspectorTest.addResult("columnNumber = " + location.columnNumber);
+ InspectorTest.addResult("script is valid: " + (location.scriptId ? "yes" : "no"));
+ }
}
var expressions = [
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/function-generator-details-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698