From b486b63a64946f6090c6a850f2f09b5dc2f43579 Mon Sep 17 00:00:00 2001 From: Elliott Sprehn Date: Wed, 17 Dec 2014 14:24:34 -0800 Subject: [PATCH] Custom elements should have class side inheritance. We were not setting the __proto__ property of the generated constructor so the generated class didn't inherit from the passed class which meant that statics were not available. This patch adds the missing call to setPrototype (which sets __proto__). R=eseidel@chromium.org Review URL: https://codereview.chromium.org/814683002 --- .../generated-constructor-expected.txt | 5 +++++ .../custom-elements/generated-constructor.sky | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 engine/src/flutter/tests/custom-elements/generated-constructor-expected.txt create mode 100644 engine/src/flutter/tests/custom-elements/generated-constructor.sky diff --git a/engine/src/flutter/tests/custom-elements/generated-constructor-expected.txt b/engine/src/flutter/tests/custom-elements/generated-constructor-expected.txt new file mode 100644 index 0000000000..458b095a91 --- /dev/null +++ b/engine/src/flutter/tests/custom-elements/generated-constructor-expected.txt @@ -0,0 +1,5 @@ +Running 1 tests +ok 1 Custom element constructor should inherit from the passed constructor +1 tests +1 pass +0 fail diff --git a/engine/src/flutter/tests/custom-elements/generated-constructor.sky b/engine/src/flutter/tests/custom-elements/generated-constructor.sky new file mode 100644 index 0000000000..619ebc7432 --- /dev/null +++ b/engine/src/flutter/tests/custom-elements/generated-constructor.sky @@ -0,0 +1,18 @@ + + + + +