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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/crashes/link-style-change-href-assert.html

Issue 2472973002: Link stylesheets in shadow trees do not belong to document scope. (Closed)
Patch Set: Rebased Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('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 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <div id="host">This text should not be red and there should be no asserts.</div>
5 <script>
6 var root = host.attachShadow({mode:'open'});
7 root.innerHTML = '<slot/><link rel="stylesheet" href="data:text/css,:host{co lor:red}">';
8
9 test(() => {
10 assert_equals(getComputedStyle(host).color, "rgb(255, 0, 0)", "Host colo r is red.");
11 }, "Check initial color from applied stylesheet.");
12
13 test(() => {
14 root.querySelector("link").setAttribute("href", "data:text/css,");
15 assert_equals(getComputedStyle(host).color, "rgb(0, 0, 0)", "Host color is black after href is changed.");
16 }, "Changing href on a link in shadow should not trigger an assert.");
17 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698