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

Unified Diff: LayoutTests/fast/css/modify-stylesheet-minimal-recalc-style.html

Issue 242883002: Remove MediaValues' dependency on RenderStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified minimal recalc tests to represent reduced recalc. Created 6 years, 8 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
Index: LayoutTests/fast/css/modify-stylesheet-minimal-recalc-style.html
diff --git a/LayoutTests/fast/css/modify-stylesheet-minimal-recalc-style.html b/LayoutTests/fast/css/modify-stylesheet-minimal-recalc-style.html
index c10b8e24bb8cf0a02a9d5d66dd02044650b0d0cb..40814c59175bf4f780e1183fbe7436752fbac9a4 100644
--- a/LayoutTests/fast/css/modify-stylesheet-minimal-recalc-style.html
+++ b/LayoutTests/fast/css/modify-stylesheet-minimal-recalc-style.html
@@ -36,28 +36,28 @@ if (window.internals) {
// Add non-existant classname.
forceRecalc();
sheet.textContent = ".nonexistant { color: red; }";
- shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0");
// Add two existing classnames.
forceRecalc();
sheet.textContent = ".bar { color: red; }\n.baz { color: red; }";
- shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "7");
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "6");
// Remove the classnames from the previous step.
forceRecalc();
sheet.textContent = "";
- shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "7");
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "6");
// Test innerHTML.
forceRecalc();
sheet.innerHTML = ".bar { color: red; }\n.baz { color: red; }";
- shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "7");
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "6");
// Test deleteRule
forceRecalc();
sheet.sheet.deleteRule(0); // Deletes .bar rule.
// FIXME: Ideally we'd do StyleInvalidationAnalysis here and only recalc 3 bar's, 3 baz's + documentElement
- shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "44");
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "43");
shouldBe("getComputedStyle(document.querySelector('.foo')).color", '"rgb(0, 0, 0)"');
shouldBe("getComputedStyle(document.querySelector('.baz')).color", '"rgb(255, 0, 0)"');
@@ -67,11 +67,11 @@ if (window.internals) {
forceRecalc();
sheet.sheet.insertRule(".foo { color: red; }", 0);
// FIXME: Ideally we'd do StyleInvalidationAnalysis here and only recalc 3 foo's, 3 baz's + documentElement
- shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "60");
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "59");
shouldBe("getComputedStyle(document.querySelector('.foo')).color", '"rgb(255, 0, 0)"');
shouldBe("getComputedStyle(document.querySelector('.baz')).color", '"rgb(255, 0, 0)"');
shouldBe("getComputedStyle(document.querySelector('.bar')).color", '"rgb(0, 0, 0)"');
}
-</script>
+</script>

Powered by Google App Engine
This is Rietveld 408576698