Commit a4cf9021 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Adding namespaces to prevent AppendToVectorTestTask clashes

Several test classes in scheduler have implemented
AppendToVectorTestTask and this patch gives those unique namespaces
to prevent them from clashing in jumbo builds.

Bug: 745732
Change-Id: I265c5507cbcc0f934f5904cc62033443442163f9
Reviewed-on: https://chromium-review.googlesource.com/692018Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#505364}
parent f9b5acd2
......@@ -18,16 +18,14 @@ using ::testing::ElementsAreArray;
namespace blink {
namespace scheduler {
namespace {
// To avoid symbol collisions in jumbo builds.
namespace worker_global_scope_scheduler_unittest {
void AppendToVectorTestTask(std::vector<std::string>* vector,
std::string value) {
vector->push_back(value);
}
} // namespace
class WorkerGlobalScopeSchedulerTest : public ::testing::Test {
public:
WorkerGlobalScopeSchedulerTest()
......@@ -87,5 +85,6 @@ TEST_F(WorkerGlobalScopeSchedulerTest, TestPostTasks) {
EXPECT_TRUE(run_order.empty());
}
} // namespace worker_global_scope_scheduler_unittest
} // namespace scheduler
} // namespace blink
......@@ -20,8 +20,9 @@ using ::testing::ElementsAreArray;
namespace blink {
namespace scheduler {
// To avoid symbol collisions in jumbo builds.
namespace worker_scheduler_impl_unittest {
namespace {
void NopTask() {}
int TimeTicksToIntMs(const base::TimeTicks& time) {
......@@ -51,8 +52,6 @@ void TimelineIdleTestTask(std::vector<std::string>* timeline,
TimeTicksToIntMs(deadline)));
}
}; // namespace
class WorkerSchedulerImplForTest : public WorkerSchedulerImpl {
public:
WorkerSchedulerImplForTest(
......@@ -399,5 +398,6 @@ TEST_F(WorkerSchedulerImplTest, TestLongIdlePeriodTimeline) {
EXPECT_THAT(timeline, ElementsAreArray(expected_timeline));
}
} // namespace worker_scheduler_impl_unittest
} // namespace scheduler
} // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment