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

Unified Diff: third_party/WebKit/Source/core/dom/RangeTest.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/dom/RangeTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/RangeTest.cpp b/third_party/WebKit/Source/core/dom/RangeTest.cpp
index 18762ae057dca43843925470908c0a40543d310e..0e853d751a3a4be70778e04a7235f096ffb1afec 100644
--- a/third_party/WebKit/Source/core/dom/RangeTest.cpp
+++ b/third_party/WebKit/Source/core/dom/RangeTest.cpp
@@ -63,6 +63,9 @@ TEST_F(RangeTest, extractContentsWithDOMMutationEvent) {
}
TEST_F(RangeTest, SplitTextNodeRangeWithinText) {
+ ScriptState* scriptState = ScriptState::forMainWorld(&frame());
+ ScriptState::Scope scope(scriptState);
haraken 2017/03/08 09:25:25 Can we use V8TestingScope instead? The same comme
adithyas 2017/03/08 18:20:10 Yup, fixed.
+
document().body()->setInnerHTML("1234");
Text* oldText = toText(document().body()->firstChild());
@@ -102,6 +105,9 @@ TEST_F(RangeTest, SplitTextNodeRangeWithinText) {
}
TEST_F(RangeTest, SplitTextNodeRangeOutsideText) {
+ ScriptState* scriptState = ScriptState::forMainWorld(&frame());
+ ScriptState::Scope scope(scriptState);
+
document().body()->setInnerHTML(
"<span id=\"outer\">0<span id=\"inner-left\">1</span>SPLITME<span "
"id=\"inner-right\">2</span>3</span>");

Powered by Google App Engine
This is Rietveld 408576698