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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp

Issue 1428883002: Oilpan: fix webkit unit tests following r356852. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp b/third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp
index 301b6deccf379dc2bc3751ff3390747a3984d936..869f189ed7ce52e7da5982ebd77342f854abe8c6 100644
--- a/third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp
@@ -104,6 +104,12 @@ public:
void cryptographicallyRandomValues(unsigned char* buffer, size_t length) override { }
+ const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) override
+ {
+ static const unsigned char tracingIsDisabled = 0;
+ return &tracingIsDisabled;
+ }
+
WebThread* currentThread() override { return &m_mockWebThread; }
WebTaskRunner* loadingTaskRunner() override
@@ -524,8 +530,8 @@ TEST_F(ScriptRunnerTest, LateNotifications)
TEST_F(ScriptRunnerTest, TasksWithDeadScriptRunner)
{
- OwnPtrWillBeRawPtr<MockScriptLoader> scriptLoader1 = MockScriptLoader::create(m_element.get());
- OwnPtrWillBeRawPtr<MockScriptLoader> scriptLoader2 = MockScriptLoader::create(m_element.get());
+ OwnPtrWillBePersistent<MockScriptLoader> scriptLoader1 = MockScriptLoader::create(m_element.get());
+ OwnPtrWillBePersistent<MockScriptLoader> scriptLoader2 = MockScriptLoader::create(m_element.get());
EXPECT_CALL(*scriptLoader1, isReady()).WillRepeatedly(Return(true));
EXPECT_CALL(*scriptLoader2, isReady()).WillRepeatedly(Return(true));
@@ -538,6 +544,10 @@ TEST_F(ScriptRunnerTest, TasksWithDeadScriptRunner)
m_scriptRunner.release();
+#if ENABLE(OILPAN)
+ Heap::collectAllGarbage();
+#endif
+
// m_scriptRunner is gone. We need to make sure that ScriptRunner::Task do not access dead object.
EXPECT_CALL(*scriptLoader1, execute()).Times(0);
EXPECT_CALL(*scriptLoader2, execute()).Times(0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698