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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/cascade-upgrade-from-v0-to-v1.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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src='../resources/testharness.js'></script>
3 <script src='../resources/testharnessreport.js'></script>
4 <style>
5 div { color: red; }
6 </style>
7 <div id='host'></div>
8 <div id='dummy'></div>
9 <script>
10 'use strict';
11
12 var root = host.createShadowRoot();
13 root.innerHTML = '<style>:host(#host) { color: green; }</style>';
14
15 test(() => {
16 assert_equals(window.getComputedStyle(host).color, 'rgb(0, 128, 0)');
17 // Trigger "V1" shadow cascading order.
18 dummy.attachShadow({mode: 'open'});
19 assert_equals(window.getComputedStyle(host).color, 'rgb(255, 0, 0)');
20 }, 'Upgrading V0 to V1 should cause style recalculation.');
21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698