| Index: third_party/WebKit/LayoutTests/custom-elements/v0-v1-interop.html
|
| diff --git a/third_party/WebKit/LayoutTests/custom-elements/v0-v1-interop.html b/third_party/WebKit/LayoutTests/custom-elements/v0-v1-interop.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a1c7288e84021ca14ce1ab2672328877dbc8e3f1
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/custom-elements/v0-v1-interop.html
|
| @@ -0,0 +1,26 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharness-helpers.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="spec/resources/custom-elements-helpers.js"></script>
|
| +<body>
|
| +<script>
|
| +'use strict';
|
| +
|
| +test_with_window((w) => {
|
| + class X extends w.HTMLElement {}
|
| +
|
| + w.customElements.define('new-old', X);
|
| + assert_throws(null, () => {
|
| + w.document.registerElement('new-old', {prototype: X.prototype});
|
| + }, '"registering" (v0) a name already "defined" should throw');
|
| +
|
| + w.document.registerElement('old-new', {
|
| + prototype: Object.create(w.HTMLElement.prototype)
|
| + });
|
| + class Y extends w.HTMLElement {}
|
| + assert_throws(null, () => {
|
| + w.customElements.define('old-new', Y);
|
| + }, '"defining" (v1) a name already "registered" (v0) should throw');
|
| +}, 'Overlapping old and new-style custom elements are not allowed');
|
| +</script>
|
|
|