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

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

Issue 2464463002: Revert of DevTools: clean up scripts folder (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/proto.js
diff --git a/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/proto.js b/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/proto.js
new file mode 100644
index 0000000000000000000000000000000000000000..2d977eceb4b8cf05c52487bd8d22084afe05c216
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/proto.js
@@ -0,0 +1,137 @@
+/**
+ * @constructor
+ */
+Base = function() {}
+
+/**
+ * @constructor
+ * @extends {Base}
+ */
+DerivedNoProto = function() {}
+
+/**
+ * @constructor
+ * @extends {Base}
+ */
+DerivedBadProto = function() {}
+
+DerivedBadProto.prototype = {
+ __proto__: Base
+}
+
+/**
+ * @interface
+ */
+InterfaceWithProto = function() {}
+
+InterfaceWithProto.prototype = {
+ __proto__: Base.prototype
+}
+
+/**
+ * @constructor
+ */
+ProtoNoExtends = function() {}
+
+ProtoNoExtends.prototype = {
+ __proto__: Base.prototype
+}
+
+/**
+ * @constructor
+ * @extends {Base}
+ */
+ProtoNotSameAsExtends = function() {}
+
+ProtoNotSameAsExtends.prototype = {
+ __proto__: Object.prototype
+}
+
+/**
+ * @constructor
+ * @extends {Base}
+ */
+ProtoNotObjectLiteral = function() {}
+
+ProtoNotObjectLiteral.prototype = Object;
+
+/**
+ * @constructor
+ * @extends {Base}
+ */
+DerivedNoSuperCall = function() {
+}
+
+DerivedNoSuperCall.prototype = {
+ __proto__: Base.prototype
+}
+
+/**
+ * @constructor
+ * @extends {Base}
+ */
+DerivedBadSuperCall = function() {
+ Base.call(1);
+}
+
+DerivedBadSuperCall.prototype = {
+ __proto__: Base.prototype
+}
+
+/**
+ * @extends {Base}
+ */
+GoodDerived = function() {
+ Base.call(this);
+}
+
+GoodDerived.prototype = {
+ __proto__: Base.prototype
+}
+
+/**
+ * @constructor
+ * @template T
+ */
+var Set = function() {}
+
+Set.prototype = {
+ add: function(item) {},
+ remove: function(item) {},
+ /** @return {boolean} */
+ contains: function(item) { return true; }
+}
+
+/**
+ * @constructor
+ * @extends {Set.<T>}
+ * @template T
+ */
+var GoodSetSubclass = function()
+{
+ Set.call(this);
+}
+
+GoodSetSubclass.prototype = {
+ __proto__: Set.prototype
+}
+
+/**
+ * @constructor
+ * @extends {Set.<T>}
+ * @template T
+ */
+var BadSetSubclass = function()
+{
+}
+
+BadSetSubclass.prototype = {
+}
+
+var NS = {};
+
+/**
+ * @constructor
+ * @extends {Base}
+ */
+NS.BadSubClass = function() {}

Powered by Google App Engine
This is Rietveld 408576698