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

Unified Diff: third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js

Issue 2449173002: DevTools: fix jsdoc validator to recognize `this' usage within arrow functions (Closed)
Patch Set: review comments + moar tests Created 4 years, 2 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 | « third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/golden.dat ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js
diff --git a/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js b/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js
index b769a2858c3a8f6eb438ef75fc07f9b5ab85afec..2aafe13b1720785b5bfbae459117677396714ceb 100644
--- a/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js
+++ b/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js
@@ -282,3 +282,46 @@ ReceiverTest.prototype = {
memberTwo: function(arg) {}
}
+
+/**
+ * @constructor
+ */
+function ReceiverWithArrowsTest()
+{
+ this._q = [];
+}
+
+ReceiverWithArrowsTest.prototype = {
+ /**
+ * @param {string} s
+ */
+ memberOne: function(s)
+ {
+ /**
+ * @param {string} a
+ * @this {C}
+ */
+ function testArrowFunctionReferencingThis(a)
+ {
+ (x => this._q.push(x))(a);
+ }
+
+ /**
+ * @param {string} a
+ * @this {C}
+ */
+ function testNestedArrowFunctionReferencingThis(a)
+ {
+ (x => (y => this._q.push(y))(x))(a);
+ }
+
+ /**
+ * @param {string} a
+ */
+ function testArrowFunctionReferencingThisMissingAnnotation(a)
+ {
+ (x => this._q.push(x))(a);
+ }
+
+ }
+};
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/golden.dat ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698