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

Unified Diff: third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp

Issue 2335063003: Prepare DedicatedWorker for per thread heap (Closed)
Patch Set: fix Created 4 years, 3 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 | third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
index f162eb40f57fa79fa9fc239fe3306fa725f958fd..36a938b558e0d1f7b638ac29857f29b0065f1ed9 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
@@ -87,7 +87,8 @@ KURL redirectLoopURL() { return KURL(KURL(), "http://example.com/loop"); }
enum ThreadableLoaderToTest {
DocumentThreadableLoaderTest,
- WorkerThreadableLoaderTest
+ WorkerThreadableLoaderTest,
+ PerThreadHeapEnabledWorkerThreadableLoaderTest
};
class ThreadableLoaderTestHelper {
@@ -162,8 +163,9 @@ private:
class WorkerThreadableLoaderTestHelper : public ThreadableLoaderTestHelper, public WorkerLoaderProxyProvider {
public:
- WorkerThreadableLoaderTestHelper()
+ WorkerThreadableLoaderTestHelper(BlinkGC::ThreadHeapMode threadHeapMode)
: m_dummyPageHolder(DummyPageHolder::create(IntSize(1, 1)))
+ , m_threadHeapMode(threadHeapMode)
{
}
@@ -241,7 +243,8 @@ public:
m_securityOrigin = document().getSecurityOrigin();
m_workerThread = wrapUnique(new WorkerThreadForTest(
this,
- *m_mockWorkerReportingProxy));
+ *m_mockWorkerReportingProxy,
+ m_threadHeapMode));
expectWorkerLifetimeReportingCalls();
m_workerThread->startWithSourceCode(m_securityOrigin.get(), "//fake source code");
@@ -339,6 +342,7 @@ private:
Checkpoint m_checkpoint;
// |m_loader| must be touched only from the worker thread only.
CrossThreadPersistent<ThreadableLoader> m_loader;
+ const BlinkGC::ThreadHeapMode m_threadHeapMode;
};
class ThreadableLoaderTest : public ::testing::TestWithParam<ThreadableLoaderToTest> {
@@ -350,7 +354,10 @@ public:
m_helper = wrapUnique(new DocumentThreadableLoaderTestHelper);
break;
case WorkerThreadableLoaderTest:
- m_helper = wrapUnique(new WorkerThreadableLoaderTestHelper);
+ m_helper = wrapUnique(new WorkerThreadableLoaderTestHelper(BlinkGC::MainThreadHeapMode));
+ break;
+ case PerThreadHeapEnabledWorkerThreadableLoaderTest:
+ m_helper = wrapUnique(new WorkerThreadableLoaderTestHelper(BlinkGC::PerThreadHeapMode));
break;
}
}
@@ -457,6 +464,10 @@ INSTANTIATE_TEST_CASE_P(Worker,
ThreadableLoaderTest,
::testing::Values(WorkerThreadableLoaderTest));
+INSTANTIATE_TEST_CASE_P(PerThreadHeapEnabledWorker,
+ ThreadableLoaderTest,
+ ::testing::Values(PerThreadHeapEnabledWorkerThreadableLoaderTest));
+
TEST_P(ThreadableLoaderTest, StartAndStop)
{
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698