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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger/extract-javascript-identifiers-expected.txt

Issue 1887913002: DevTools: improve identifier extraction in SourceMapNamesResolver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/extract-javascript-identifiers-expected.txt
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/extract-javascript-identifiers-expected.txt b/third_party/WebKit/LayoutTests/inspector/sources/debugger/extract-javascript-identifiers-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..673cdc35fa9c17e99c861a68c54ac180c943d572
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/extract-javascript-identifiers-expected.txt
@@ -0,0 +1,77 @@
+Tests the extraction of javascript identifier names from function text.
+
+
+Running: testFunctionArguments
+Text:
+ function foo(a, b) { }
+
+Identifiers:
+ id: a offset: 13
+ id: b offset: 16
+
+Running: testSimpleVariable
+Text:
+ function foo() { var a = 1; }
+
+Identifiers:
+ id: a offset: 21
+
+Running: testMemberExpression
+Text:
+ function foo() { var a = b.c.d.e; }
+
+Identifiers:
+ id: a offset: 21
+ id: b offset: 25
+
+Running: testFunctionCall
+Text:
+ function foo() { var a = doSomething(b, true, 10); }
+
+Identifiers:
+ id: a offset: 21
+ id: doSomething offset: 25
+ id: b offset: 37
+
+Running: testPropertyLiteral
+Text:
+ function foo() { var a = b['test'];}
+
+Identifiers:
+ id: a offset: 21
+ id: b offset: 25
+
+Running: testComputedProperty
+Text:
+ function foo() { var a = b[variableName];}
+
+Identifiers:
+ id: a offset: 21
+ id: b offset: 25
+ id: variableName offset: 27
+
+Running: testNestedFunction1
+Text:
+ function foo() { var a = 1; function bar() { var b = 1; } var c = 3;}
+
+Identifiers:
+ id: a offset: 21
+ id: bar offset: 37
+ id: c offset: 62
+
+Running: testNestedFunction2
+Text:
+ function foo() { var a = 1; var bar = function (){ var b = 1; }; var c = 3;}
+
+Identifiers:
+ id: a offset: 21
+ id: bar offset: 32
+ id: c offset: 69
+
+Running: testNestedFunction3
+Text:
+ function foo() { var a = x => x * 2 }
+
+Identifiers:
+ id: a offset: 21
+

Powered by Google App Engine
This is Rietveld 408576698