Index: tests/html/js_interop_constructor_name_test_js.js |
diff --git a/tests/html/js_interop_constructor_name_test_js.js b/tests/html/js_interop_constructor_name_test_js.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..828cbc94779de9f66179bfde60dbd1891d8890e4 |
--- /dev/null |
+++ b/tests/html/js_interop_constructor_name_test_js.js |
@@ -0,0 +1,20 @@ |
+(function() { |
+ |
+ // A constructor function with the same name as a HTML element. |
+ function HTMLDivElement(a) { |
+ this.a = a; |
+ } |
+ |
+ HTMLDivElement.prototype.bar = function() { |
+ return this.a; |
+ } |
+ |
+ HTMLDivElement.prototype.toString = function() { |
+ return "HTMLDivElement(" + this.a + ")"; |
+ } |
+ |
+ self.makeDiv = function(text) { |
+ return new HTMLDivElement(text); |
+ }; |
+ |
+})(); |