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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/surround-contents-with-shadow-dom.html

Issue 2074393002: Clean up shadow-dom layout tests so that they are well organized (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
Index: third_party/WebKit/LayoutTests/shadow-dom/surround-contents-with-shadow-dom.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/surround-contents-with-shadow-dom.html b/third_party/WebKit/LayoutTests/shadow-dom/surround-contents-with-shadow-dom.html
deleted file mode 100644
index 806466289c24abe1c924af055f6eb30f52592589..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/shadow-dom/surround-contents-with-shadow-dom.html
+++ /dev/null
@@ -1,47 +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="targets">
- <div id="T0">
- <div id="normal-target">Normal</div>
- </div>
-
- <div id="T1">
- <template><div id="target">Shadow</div></template>
- </div>
-
- <div id="T2">
- <template>
- <div id="H">
- <template><div id="target">Shadow in shadow</div></template>
- </div>
- </template>
- </div>
-
- <details id="T3"><div id="details-target">P3</div></details>
-</div>
-<script>
-convertTemplatesToShadowRootsWithin(targets);
-
-testSurroundContents("Normal", "normal-target", T0);
-testSurroundContents("Shadow", "T1/target", T1);
-testSurroundContents("Multi-level shadow", "T2/H/target", T2);
-testSurroundContents("<details>", "details-target", T3);
-
-function testSurroundContents(description, targetPath, newParent) {
- test(function () {
- var target = getNodeInComposedTree(targetPath);
- var range = document.createRange();
- range.selectNode(target);
- assert_throws("HierarchyRequestError", function () {
- range.surroundContents(newParent);
- });
- var targetAfter = getNodeInComposedTree(targetPath);
- assert_equals(targetAfter, target, "DOM should not change after HierarchyRequestError");
- }, description);
-}
-
-if (window.testRunner)
- targets.style.display = "none";
-</script>

Powered by Google App Engine
This is Rietveld 408576698