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

Side by Side Diff: LayoutTests/fast/dom/shadow/getComputedStyle-with-distribution.html

Issue 240293007: Added layout test for getComputedStyle with distribution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/getComputedStyle-with-distribution-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <script src="resources/shadow-dom.js"></script>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 </body>
8 <script>
9 description('crbug.com/337618: computedStyle should be cleared when distribution is updated');
10
11 document.body.appendChild(
12 createDOM('div', {'id': 'host'},
13 createShadowRoot(
14 createDOM('div', {'class': 'foo'},
15 createDOM('content', {'id': 'content', 'select': '*'}))),
16 createDOM('div', {'id': 'child'},
17 createShadowRoot(
18 createDOM('style', {},
19 document.createTextNode(":host-context(.foo) div { color: g reen; }")),
20 createDOM('div', {'id': 'bar'},
21 document.createTextNode("bar"))))));
22
23 shouldBe('window.getComputedStyle(getNodeInTreeOfTrees("child/bar")).color', '"r gb(0, 128, 0)"');
24
25 var content = getNodeInTreeOfTrees('host/content');
26 content.setAttribute('select', '.foobar');
27 shouldBe('window.getComputedStyle(getNodeInTreeOfTrees("child/bar")).color', '"r gb(0, 0, 0)"');
28 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/getComputedStyle-with-distribution-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698