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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html

Issue 2615713005: Added layout test for issue 318468. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html
new file mode 100644
index 0000000000000000000000000000000000000000..e8a7c780b3a0342601fd4fb64d166c0e87864d34
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<style></style>
+<div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <span></span>
+</div>
+<script>
+ test(() => {
+ assert_true(!!window.internals, "Test requires window.internals.");
+ document.body.offsetTop;
+ document.styleSheets[0].insertRule("span{background:green}", 0);
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Check that only the span is affected.");
+ }, "Inserting a style rule with a type selector should only invalidate elements with that type.");
+</script>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698