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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/v1-slots-text-nodes.html

Issue 2053503003: Clean up layout tests in LayoutTests/shadow-dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/shadow-dom/v1-slots-in-v0-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/shadow-dom/v1-slots-text-nodes.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/v1-slots-text-nodes.html b/third_party/WebKit/LayoutTests/shadow-dom/v1-slots-text-nodes.html
deleted file mode 100644
index c71e7e6dbe2788dc62eed9dbba5b22ed667f7bce..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/shadow-dom/v1-slots-text-nodes.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE html>
-<script src='../resources/testharness.js'></script>
-<script src='../resources/testharnessreport.js'></script>
-<script src='resources/shadow-dom.js'></script>
-<div id='host'>
- <template data-mode='open'>
- <div id='shadow-child1'></div>
- <slot></slot>
- <slot name='slot1'></slot>
- <div id='shadow-child2'></div>
- </template>
- <div id='child1' slot='slot1'></div>
- Hello
- <div id='child2'></div>
- World
- <div id='child3' slot='nonexistent'></div>
- <!-- comment node -->
-</div>
-<script>
-'use strict';
-convertTemplatesToShadowRootsWithin(host);
-removeWhiteSpaceOnlyTextNodes(host);
-document.body.offsetLeft;
-
-const slot1 = host.shadowRoot.querySelector('slot[name=slot1]');
-const defaultSlot = host.shadowRoot.querySelector('slot');
-const shadowChild1 = host.shadowRoot.querySelector('#shadow-child1');
-const shadowChild2 = host.shadowRoot.querySelector('#shadow-child2');
-
-const textHello = host.childNodes[1];
-const textWorld = host.childNodes[3];
-const commentNode = child3.nextSibling;
-
-test(() => {
- assert_equals(textHello.nodeValue.trim(), 'Hello');
- assert_equals(textWorld.nodeValue.trim(), 'World');
- assert_equals(commentNode.nodeType, Node.COMMENT_NODE);
-
- assert_equals(textHello.assignedSlot, defaultSlot);
- assert_equals(textWorld.assignedSlot, defaultSlot);
- assert_equals(commentNode.assignedSlot, undefined, "Comment Node does not define assignedSlot");
- assert_equals(child1.assignedSlot, slot1);
- assert_equals(child2.assignedSlot, defaultSlot);
- assert_equals(child3.assignedSlot, null);
-}, "assignedSlot");
-
-test(() => {
- assert_array_equals(defaultSlot.assignedNodes({flatten: true}), [textHello, child2, textWorld]);
- assert_array_equals(slot1.assignedNodes({flatten: true}), [child1]);
-}, "assignedNodes");
-
-add_completion_callback(() => {
- if (window.testRunner)
- host.style.display = "none";
-});
-</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/shadow-dom/v1-slots-in-v0-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698