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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/named-constructor-prototype-chain.html

Issue 2647643002: Fix V8 bindings for named constructors to set prototype object correctly (Closed)
Patch Set: Review feedback Created 3 years, 11 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/Source/bindings/core/v8/V8PrivateProperty.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/named-constructor-prototype-chain.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/named-constructor-prototype-chain.html b/third_party/WebKit/LayoutTests/fast/dom/named-constructor-prototype-chain.html
new file mode 100644
index 0000000000000000000000000000000000000000..e22af9d025431730cdc1a76247a1d7ade97a5f3c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/named-constructor-prototype-chain.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function(t)
+{
+ assert_equals(Image.name, "Image", "Image name should be Image (not HTMLImageElement)");
sashab 2017/01/20 04:37:05 This was failing - fixed by updating setClassName(
+ assert_equals(Image.__proto__, HTMLElement, "Image __proto__ is HTMLElement");
sashab 2017/01/20 04:37:05 This test fails with the error: FAIL NamedConstruc
+ assert_equals(Image.prototype, HTMLImageElement.prototype, "Image.prototype is same as HTMLImageElement.prototype");
+ assert_equals(new Image().__proto__, HTMLImageElement.prototype, "Image __proto__ is HTMLImageElement prototype ");
+ assert_equals(Image.prototype.__proto__, HTMLElement.prototype, "Image.prototype __proto__ is HTMLElement prototype");
+}, "NamedConstructor creates the correct object structure.");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698