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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/HTMLOptionsCollection.html

Issue 2478613003: Revert of Import wpt@a99ba661fff2fb129894bdff21d63814d9b3f7e9 (Closed)
Patch Set: Created 4 years, 1 month 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/LayoutTests/imported/wpt/custom-elements/reactions/HTMLOptionsCollection.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/HTMLOptionsCollection.html b/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/HTMLOptionsCollection.html
deleted file mode 100644
index 0d64259d063182d4bb52ca6b4073d443af9ca1cf..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/HTMLOptionsCollection.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Custom Elements: CEReactions on HTMLOptionsCollection interface</title>
-<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
-<meta name="assert" content="length, the indexed setter, add, and remove of HTMLOptionsCollection interface must have CEReactions">
-<meta name="help" content="https://dom.spec.whatwg.org/#node">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="../resources/custom-elements-helpers.js"></script>
-<script src="./resources/reactions.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-
-test_with_window(function (contentWindow, contentDocument) {
- const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
- contentDocument.body.innerHTML = `<select><option></option></select>`;
- const option = contentDocument.querySelector('option');
-
- const instance = contentDocument.createElement(element.name);
- option.appendChild(instance);
- instance.textContent = 'hello';
-
- assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
- assert_equals(option.innerHTML, '<custom-element>hello</custom-element>');
-
- const select = contentDocument.querySelector('select');
- assert_equals(select.options[0], option);
- select.options.length = 0;
- assert_equals(select.firstChild, null);
- assert_array_equals(element.takeLog().types(), ['disconnected']);
-}, 'length on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element');
-
-test_with_window(function (contentWindow) {
- const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
-
- const contentDocument = contentWindow.document;
- contentDocument.body.innerHTML = `<select></select>`;
- const select = contentDocument.querySelector('select');
-
- const option = contentDocument.createElement('option');
- const instance = contentDocument.createElement(element.name);
- option.appendChild(instance);
- instance.textContent = 'hello';
-
- assert_array_equals(element.takeLog().types(), ['constructed']);
- assert_equals(option.innerHTML, '<custom-element>hello</custom-element>');
-
- assert_equals(select.options.length, 0);
- select.options[0] = option;
- assert_equals(select.options.length, 1);
- assert_array_equals(element.takeLog().types(), ['connected']);
-}, 'The indexed setter on HTMLOptionsCollection must enqueue connectedCallback when inserting a custom element');
-
-test_with_window(function (contentWindow) {
- const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
-
- const contentDocument = contentWindow.document;
- contentDocument.body.innerHTML = `<select><option></option></select>`;
- const option = contentDocument.querySelector('option');
-
- const instance = contentDocument.createElement(element.name);
- option.appendChild(instance);
- instance.textContent = 'hello';
-
- assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
- assert_equals(option.innerHTML, '<custom-element>hello</custom-element>');
-
- const select = contentDocument.querySelector('select');
- assert_equals(select.options[0], option);
- select.options[0] = null;
- assert_equals(select.options.length, 0);
- assert_array_equals(element.takeLog().types(), ['disconnected']);
-}, 'The indexed setter on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element');
-
-test_with_window(function (contentWindow) {
- const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
-
- const contentDocument = contentWindow.document;
- contentDocument.body.innerHTML = `<select></select>`;
- const select = contentDocument.querySelector('select');
-
- const option = contentDocument.createElement('option');
- const instance = contentDocument.createElement(element.name);
- option.appendChild(instance);
- instance.textContent = 'hello';
-
- assert_array_equals(element.takeLog().types(), ['constructed']);
- assert_equals(option.innerHTML, '<custom-element>hello</custom-element>');
-
- assert_equals(select.options.length, 0);
- select.options.add(option);
- assert_equals(select.options.length, 1);
- assert_array_equals(element.takeLog().types(), ['connected']);
-}, 'add on HTMLOptionsCollection must enqueue connectedCallback when inserting a custom element');
-
-test_with_window(function (contentWindow) {
- const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
-
- const contentDocument = contentWindow.document;
- contentDocument.body.innerHTML = `<select><option></option></select>`;
- const option = contentDocument.querySelector('option');
-
- const instance = contentDocument.createElement(element.name);
- option.appendChild(instance);
- instance.textContent = 'hello';
-
- assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
- assert_equals(option.innerHTML, '<custom-element>hello</custom-element>');
-
- const select = contentDocument.querySelector('select');
- assert_equals(select.options[0], option);
- select.options.remove(0);
- assert_equals(select.options.length, 0);
- assert_array_equals(element.takeLog().types(), ['disconnected']);
-}, 'remove on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element');
-
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698