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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/focus-with-dom-mutation.html

Issue 1774113002: Move Shadow DOM V1 tests from fast/dom/shadow to shadow-dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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/fast/dom/shadow/focus-with-dom-mutation.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/focus-with-dom-mutation.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/focus-with-dom-mutation.html
deleted file mode 100644
index 6adf7ea020fdaab1f781455840c5a03edc0d5a14..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/shadow/focus-with-dom-mutation.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<script src="../../../resources/js-test.js"></script>
-<script src="resources/shadow-dom.js"></script>
-<style>
-div { background-color: white; }
-div:focus { background-color: green; }
-</style>
-<body>
-<div id="sandbox"></div>
-</body>
-<script>
-description('Test if :focus matching state of shadow host is properly handled in case of DOM mutation.');
-
-function buildTree(parent, delegatesFocus)
-{
- parent.innerHTML = '';
- parent.appendChild(
- createDOM('div', {id: 'host'},
- attachShadow({'mode': 'open', delegatesFocus: delegatesFocus},
- createDOM('input', {id: 'input'})),
- createDOM('div', {id: 'dest'})));
-
- parent.offsetTop;
-}
-
-var sandbox = document.getElementById('sandbox');
-
-debug('(1/2) DOM mutation across shadow boundary with delegatesFocus=false');
-buildTree(sandbox, false);
-var host = getNodeInComposedTree('host');
-var input = getNodeInComposedTree('host/input');
-var dest = getNodeInComposedTree('dest');
-
-backgroundColorShouldBe('host', 'rgb(255, 255, 255)');
-input.focus();
-backgroundColorShouldBe('host', 'rgb(255, 255, 255)');
-dest.appendChild(input);
-backgroundColorShouldBe('host', 'rgb(255, 255, 255)');
-input.focus();
-host.shadowRoot.appendChild(input);
-backgroundColorShouldBe('host', 'rgb(255, 255, 255)');
-
-debug('(2/2) DOM mutation across shadow boundary with delegatesFocus=true');
-buildTree(sandbox, true);
-var host = getNodeInComposedTree('host');
-var input = getNodeInComposedTree('host/input');
-var dest = getNodeInComposedTree('dest');
-
-backgroundColorShouldBe('host', 'rgb(255, 255, 255)');
-input.focus();
-backgroundColorShouldBe('host', 'rgb(0, 128, 0)');
-dest.appendChild(input);
-backgroundColorShouldBe('host', 'rgb(255, 255, 255)');
-input.focus();
-host.shadowRoot.appendChild(input);
-// appendChild() will blur the focus from input element, thus input is no longer focused.
-backgroundColorShouldBe('host', 'rgb(255, 255, 255)');
-</script>

Powered by Google App Engine
This is Rietveld 408576698