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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/reschedule-for-removed-sibling.html

Issue 2592423002: Reschedule sibling invalidations as descendant on removal. (Closed)
Patch Set: Moved DCHECK. Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/invalidation/reschedule-for-removed-sibling.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/reschedule-for-removed-sibling.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/reschedule-for-removed-sibling.html
new file mode 100644
index 0000000000000000000000000000000000000000..49b1249915985029e0d0417e853c7625599d626d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/reschedule-for-removed-sibling.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<style>
+ div {
+ background-color: green;
+ width: 100px;
+ height: 100px;
+ }
+ .red + div { background-color: red }
+</style>
+<p>You should see a green square below.</p>
+<div id="toRemove" class="red"></div>
+<div id="sibling"></div>
+<script>
+ test(() => {
+ assert_equals(getComputedStyle(sibling).backgroundColor, "rgb(255, 0, 0)", "Background is initially red.");
+ }, "Initial background color.");
+
+ test(() => {
+ toRemove.className = "";
+ toRemove.remove();
+ assert_equals(getComputedStyle(sibling).backgroundColor, "rgb(0, 128, 0)", "Background is green after sibling is removed.");
+ }, "Background color changed after sibling removed.");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698