Commit 2f243850 authored by tasak@google.com's avatar tasak@google.com

Added layout test for getComputedStyle with distribution.

BUG=337618
TEST=fast/dom/shadow/getComputedStyle-with-distribution.html

Review URL: https://codereview.chromium.org/240293007

git-svn-id: svn://svn.chromium.org/blink/trunk@175873 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8b87bc24
crbug.com/337618: computedStyle should be cleared when distribution is updated
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS window.getComputedStyle(getNodeInTreeOfTrees("child/bar")).color is "rgb(0, 128, 0)"
PASS window.getComputedStyle(getNodeInTreeOfTrees("child/bar")).color is "rgb(0, 0, 0)"
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<head>
<script src="resources/shadow-dom.js"></script>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
</body>
<script>
description('crbug.com/337618: computedStyle should be cleared when distribution is updated');
document.body.appendChild(
createDOM('div', {'id': 'host'},
createShadowRoot(
createDOM('div', {'class': 'foo'},
createDOM('content', {'id': 'content', 'select': '*'}))),
createDOM('div', {'id': 'child'},
createShadowRoot(
createDOM('style', {},
document.createTextNode(":host-context(.foo) div { color: green; }")),
createDOM('div', {'id': 'bar'},
document.createTextNode("bar"))))));
shouldBe('window.getComputedStyle(getNodeInTreeOfTrees("child/bar")).color', '"rgb(0, 128, 0)"');
var content = getNodeInTreeOfTrees('host/content');
content.setAttribute('select', '.foobar');
shouldBe('window.getComputedStyle(getNodeInTreeOfTrees("child/bar")).color', '"rgb(0, 0, 0)"');
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment