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

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

Issue 1024013002: Revert of Oilpan: fix webkit unit tests following r192243. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« 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: Source/core/dom/ScriptRunnerTest.cpp
diff --git a/Source/core/dom/ScriptRunnerTest.cpp b/Source/core/dom/ScriptRunnerTest.cpp
index 5b85aa62937e44c2b70a338b44f3f54a1d0cbc45..14a3c3a00be0e193ee6496737005057031e33133 100644
--- a/Source/core/dom/ScriptRunnerTest.cpp
+++ b/Source/core/dom/ScriptRunnerTest.cpp
@@ -382,13 +382,9 @@
TEST_F(ScriptRunnerTest, QueueReentrantScript_ManyAsyncScripts)
{
- const int loaderCount = 20;
- OwnPtrWillBeRawPtr<MockScriptLoader> scriptLoaders[loaderCount];
- for (int i = 0; i < loaderCount; i++)
- scriptLoaders[i] = nullptr;
-
- for (int i = 0; i < loaderCount; i++) {
- scriptLoaders[i] = adoptPtrWillBeNoop(new MockScriptLoader(m_element.get()));
+ OwnPtr<MockScriptLoader> scriptLoaders[20];
+ for (int i = 0; i < 20; i++) {
+ scriptLoaders[i] = adoptPtr(new MockScriptLoader(m_element.get()));
EXPECT_CALL(*scriptLoaders[i], isReady()).WillRepeatedly(Return(true));
m_scriptRunner->queueScriptForExecution(scriptLoaders[i].get(), ScriptRunner::ASYNC_EXECUTION);
@@ -405,7 +401,7 @@
m_scriptRunner->resume();
EXPECT_CALL(*scriptLoaders[0], execute()).WillOnce(Invoke([&scriptLoaders, this] {
- for (int i = 2; i < loaderCount; i++)
+ for (int i = 2; i < 20; i++)
m_scriptRunner->notifyScriptReady(scriptLoaders[i].get(), ScriptRunner::ASYNC_EXECUTION);
m_scriptRunner->resume();
m_order.push_back(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