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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/null-ruleset-non-matching-media-crash.html

Issue 2650743002: Return ActiveSheetsChanged when rulesets change in common prefix. (Closed)
Patch Set: Documentation and more descriptive variable name. Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/ActiveStyleSheets.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 <style>#t1 { color: red }</style>
5 <div id="t1">Should be green.</div>
6 <script>
7 test(() => {
8 // Triggers synch active stylesheet update.
9 var sheet = document.styleSheets[0];
10 // Clears the previous RuleSet for rebuild.
11 sheet.insertRule("#dummy {}", 0);
12 // No Ruleset recreated since media does not match.
13 sheet.media.mediaText = "nomatch";
14 var newStyle = document.createElement("style");
15 newStyle.appendChild(document.createTextNode("div { color: green }"));
16 // New sheet triggers active stylesheet update and style recalc for #t1.
17 document.head.appendChild(newStyle);
18 }, "Check that appending a stylesheet while clearing the RuleSet of an exist ing sheet does not crash");
19
20 test(() => assert_equals(getComputedStyle(t1).color, "rgb(0, 128, 0)"),
21 "Check that the #t1 rule no longer applies.");
22 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698