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

Unified Diff: third_party/WebKit/Source/web/tests/WebDocumentTest.cpp

Issue 1644543002: Moved element style recalc count and stats to StyleEngine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebDocumentTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebDocumentTest.cpp b/third_party/WebKit/Source/web/tests/WebDocumentTest.cpp
index b5b63ea26895cd2ec6d6494d87346ac2e7334936..ad1f545fe3f71494687463136db4a89094b45e8c 100644
--- a/third_party/WebKit/Source/web/tests/WebDocumentTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebDocumentTest.cpp
@@ -67,11 +67,13 @@ TEST_F(WebDocumentTest, InsertStyleSheet)
WebDocument webDoc = topWebDocument();
Document* coreDoc = topDocument();
+ unsigned startCount = coreDoc->styleEngine().styleForElementCount();
+
webDoc.insertStyleSheet("body { color: green }");
// Check insertStyleSheet did not cause a synchronous style recalc.
- unsigned accessCount = coreDoc->styleEngine().resolverAccessCount();
- ASSERT_EQ(0U, accessCount);
+ unsigned elementCount = coreDoc->styleEngine().styleForElementCount() - startCount;
+ ASSERT_EQ(0U, elementCount);
HTMLElement* bodyElement = coreDoc->body();
ASSERT(bodyElement);
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698