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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentTest.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/DocumentTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/DocumentTest.cpp b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
index d9e2f2fa11a05e89f2ccce87903289a10a8db15c..193e693cd02d509b8a112c42640c0de7f71521f0 100644
--- a/third_party/WebKit/Source/core/dom/DocumentTest.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
@@ -53,6 +53,7 @@ class DocumentTest : public ::testing::Test {
void TearDown() override { ThreadState::current()->collectAllGarbage(); }
+ LocalFrame& frame() const { return m_dummyPageHolder->frame(); }
Document& document() const { return m_dummyPageHolder->document(); }
Page& page() const { return m_dummyPageHolder->page(); }
@@ -575,6 +576,9 @@ TEST_F(DocumentTest, SynchronousMutationNotifieReplaceChild) {
}
TEST_F(DocumentTest, SynchronousMutationNotifierSplitTextNode) {
+ ScriptState* scriptState = ScriptState::forMainWorld(&frame());
+ ScriptState::Scope scope(scriptState);
+
auto& observer = *new TestSynchronousMutationObserver(document());
Text* splitSample = document().createTextNode("0123456789");

Powered by Google App Engine
This is Rietveld 408576698