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

Unified Diff: third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp

Issue 2726593002: Use mayNotBeMainThread() for wrapper optimization (Closed)
Patch Set: Renaming + move decrement to destructor Created 3 years, 9 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: third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp b/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
index 93c9e3b3b4ce83c460d0ee7a2d0bbf914f48f061..09be59c7a6d29231e1409e0c0fb0f9a55f31c0bd 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
@@ -107,6 +107,9 @@ TEST_F(VisibleUnitsTest, associatedLayoutObjectOfFirstLetterPunctuations) {
}
TEST_F(VisibleUnitsTest, associatedLayoutObjectOfFirstLetterSplit) {
+ ScriptState* scriptState = ScriptState::forMainWorld(document().frame());
+ ScriptState::Scope scope(scriptState);
+
const char* bodyContent =
"<style>p:first-letter {color:red;}</style><p id=sample>abc</p>";
setBodyContent(bodyContent);
@@ -1365,6 +1368,9 @@ TEST_F(VisibleUnitsTest, mostBackwardCaretPositionFirstLetter) {
}
TEST_F(VisibleUnitsTest, mostBackwardCaretPositionFirstLetterSplit) {
+ ScriptState* scriptState = ScriptState::forMainWorld(document().frame());
+ ScriptState::Scope scope(scriptState);
+
const char* bodyContent =
"<style>p:first-letter {color:red;}</style><p id=sample>abc</p>";
setBodyContent(bodyContent);

Powered by Google App Engine
This is Rietveld 408576698