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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/css-focus-pseudo-match-shadow-host4.html

Issue 1685063002: Make 'mode' required parameter for Element.attachShadow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes for tests Created 4 years, 10 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/css-focus-pseudo-match-shadow-host4.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/css-focus-pseudo-match-shadow-host4.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/css-focus-pseudo-match-shadow-host4.html
deleted file mode 100644
index 8a436552884950b15655e51fab66e81efc22b8f1..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/shadow/css-focus-pseudo-match-shadow-host4.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE html>
kochi 2016/02/10 06:57:27 Deleted this file as multiple shadow does not exis
hayato 2016/02/10 07:06:21 I do not understand the reason. We should keep thi
kochi 2016/02/10 07:09:48 But we don't allow parameter on Element.createShad
hayato 2016/02/10 08:07:21 Acknowledged. I did not notice that delegatesFocus
-<script src="../../../resources/js-test.js"></script>
-<script src="resources/shadow-dom.js"></script>
-<style>
-div {
- background-color: white;
-}
-
-div#shadow-host:focus {
- background-color: green;
-}
-</style>
-<body>
-<div id="sandbox"></div>
-</body>
-<script>
-function testDistributedNodes() {
- debug('Testing shadow host :focus and distributed nodes');
-
- // Setting up the DOM tree
- var sandbox = document.querySelector('#sandbox');
- sandbox.innerHTML = '';
- sandbox.appendChild(
- createDOM('div', {},
- createDOM('input', {'id': 'outer-input'}),
- createDOM('div', {'id': 'shadow-host', 'tabindex': '0'},
- createDOM('input', {'id': 'light-input'}),
- createShadowRoot(
- createDOM('content', {}),
- createDOM('div', {'id': 'inner-div'},
- document.createTextNode('Blink')),
- createDOM('input', {'id': 'older-input'})),
- createShadowRoot(
- {'delegatesFocus': true},
- createDOM('shadow', {}),
- createDOM('div', {'id': 'inner-div2'},
- document.createTextNode('Blink')),
- createDOM('input', {'id': 'younger-input'})))));
- sandbox.offsetTop;
-
- backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)');
-
- var host = getNodeInComposedTree('shadow-host');
- var outerInput = getNodeInComposedTree('outer-input');
- var lightInput = getNodeInComposedTree('light-input');
- var olderInput = getNodeInComposedTree('shadow-host/older-input');
- var youngerInput = getNodeInComposedTree('shadow-host//younger-input');
-
- debug('(1/3) shadow host without tabindex');
- outerInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)');
- lightInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)');
- olderInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)');
- youngerInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)');
- host.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)');
-
- debug('(2/3) shadow host with tabindex=-1');
- host.tabIndex = -1;
- outerInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)');
- lightInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)');
- olderInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)');
- youngerInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)');
- host.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)');
-
- debug('(3/3) shadow host with tabindex=0');
- host.tabIndex = 0;
- outerInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)');
- lightInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(255, 255, 255)');
- olderInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)');
- youngerInput.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)');
- host.focus();
- backgroundColorShouldBe('shadow-host', 'rgb(0, 128, 0)');
-}
-
-testDistributedNodes();
-</script>

Powered by Google App Engine
This is Rietveld 408576698