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

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

Issue 2434563008: Import wpt@26c8d4e87448d1c4e5ebf2ddb4917c0633c201db (Closed)
Patch Set: Mark one more test as potentially timing out Created 4 years, 2 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
Index: third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html b/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
index 304ec9861454852a6b7f155bb4c7beb84da89fb2..4bba91e4573315187381fa18506ded13cbbe1238 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/reactions/Document.html
@@ -1,10 +1,11 @@
<!DOCTYPE html>
<html>
<head>
-<title>Custom Elements: CEReactions on ParentNode interface</title>
+<title>Custom Elements: CEReactions on Document interface</title>
<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
<meta name="assert" content="importNode and adoptNode of Document interface must have CEReactions">
<meta name="help" content="https://dom.spec.whatwg.org/#document">
+<meta name="help" content="https://html.spec.whatwg.org/#document">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/custom-elements-helpers.js"></script>
@@ -42,6 +43,23 @@ test(function () {
assert_equals(logEntries.last().newDocument, newDoc);
}, 'adoptNode on Document must enqueue an adopted reaction when importing a custom element');
+test(function () {
+ var element = define_new_custom_element();
+ var instance = document.createElement(element.name);
+
+ var container = document.createElement('div');
+ container.contentEditable = true;
+ container.appendChild(instance);
+ document.body.appendChild(container);
+
+ assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+
+ container.focus();
+ document.execCommand('delete', false, null);
+
+ assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'execCommand on Document must enqueue a disconnected reaction when deleting a custom element from a contenteditable element');
+
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698