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

Unified Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc

Issue 2967013002: Be explicit about namespace testing to not mix it with blink::testing (Closed)
Patch Set: Dropped mojo parts that need another review. Created 3 years, 5 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/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
index 9ac4a70272d9965166a4003f0528b46182a628cc..556ffba2b1d76d13ce1a829b0c25a2c50fd1d6e5 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
@@ -256,7 +256,7 @@ class RendererSchedulerImplForTest : public RendererSchedulerImpl {
return os << RendererSchedulerImpl::UseCaseToString(use_case);
}
-class RendererSchedulerImplTest : public testing::Test {
+class RendererSchedulerImplTest : public ::testing::Test {
public:
using UseCase = RendererSchedulerImpl::UseCase;
@@ -705,16 +705,16 @@ TEST_F(RendererSchedulerImplTest, TestPostDefaultTask) {
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D1"), std::string("D2"),
- std::string("D3"), std::string("D4")));
+ ::testing::ElementsAre(std::string("D1"), std::string("D2"),
+ std::string("D3"), std::string("D4")));
}
TEST_F(RendererSchedulerImplTest, TestPostDefaultAndCompositor) {
std::vector<std::string> run_order;
PostTestTasks(&run_order, "D1 C1");
RunUntilIdle();
- EXPECT_THAT(run_order, testing::Contains("D1"));
- EXPECT_THAT(run_order, testing::Contains("C1"));
+ EXPECT_THAT(run_order, ::testing::Contains("D1"));
+ EXPECT_THAT(run_order, ::testing::Contains("C1"));
}
TEST_F(RendererSchedulerImplTest, TestRentrantTask) {
@@ -726,7 +726,7 @@ TEST_F(RendererSchedulerImplTest, TestRentrantTask) {
&count, 5));
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre(0, 1, 2, 3, 4));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(0, 1, 2, 3, 4));
}
TEST_F(RendererSchedulerImplTest, TestPostIdleTask) {
@@ -854,9 +854,9 @@ TEST_F(RendererSchedulerImplTest, TestDefaultPolicy) {
EnableIdleTasks();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("L1"), std::string("D1"),
- std::string("D2"), std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("L1"), std::string("D1"),
+ std::string("D2"), std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::NONE, CurrentUseCase());
}
@@ -869,9 +869,9 @@ TEST_F(RendererSchedulerImplTest, TestDefaultPolicyWithSlowCompositor) {
EnableIdleTasks();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1"),
- std::string("C1"), std::string("D2"),
- std::string("C2"), std::string("I1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1"),
+ std::string("C1"), std::string("D2"),
+ std::string("C2"), std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::NONE, CurrentUseCase());
}
@@ -885,9 +885,9 @@ TEST_F(RendererSchedulerImplTest,
SimulateCompositorGestureStart(TouchEventPolicy::SEND_TOUCH_START);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1"),
- std::string("D2"), std::string("C1"),
- std::string("C2"), std::string("I1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1"),
+ std::string("D2"), std::string("C1"),
+ std::string("C2"), std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::COMPOSITOR_GESTURE,
CurrentUseCase());
}
@@ -902,9 +902,9 @@ TEST_F(RendererSchedulerImplTest,
SimulateMainThreadGestureWithoutScrollUpdates();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("L1"), std::string("D1"),
- std::string("D2"), std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("L1"), std::string("D1"),
+ std::string("D2"), std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::MAIN_THREAD_CUSTOM_INPUT_HANDLING,
CurrentUseCase());
}
@@ -919,9 +919,9 @@ TEST_F(RendererSchedulerImplTest,
SimulateMainThreadGestureWithoutPreventDefault();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1"),
- std::string("D2"), std::string("C1"),
- std::string("C2"), std::string("I1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1"),
+ std::string("D2"), std::string("C1"),
+ std::string("C2"), std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::COMPOSITOR_GESTURE,
CurrentUseCase());
}
@@ -952,9 +952,9 @@ TEST_F(RendererSchedulerImplTest,
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("L1"), std::string("D1"),
- std::string("D2")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("L1"), std::string("D1"),
+ std::string("D2")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::COMPOSITOR_GESTURE,
CurrentUseCase());
}
@@ -968,9 +968,9 @@ TEST_F(RendererSchedulerImplTest,
SimulateCompositorGestureStart(TouchEventPolicy::DONT_SEND_TOUCH_START);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1"),
- std::string("D2"), std::string("C1"),
- std::string("C2"), std::string("I1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1"),
+ std::string("D2"), std::string("C1"),
+ std::string("C2"), std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::COMPOSITOR_GESTURE,
CurrentUseCase());
}
@@ -986,9 +986,9 @@ TEST_F(RendererSchedulerImplTest,
blink::WebInputEvent::kGestureScrollBegin);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("L1"), std::string("D1"),
- std::string("D2"), std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("L1"), std::string("D1"),
+ std::string("D2"), std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::MAIN_THREAD_CUSTOM_INPUT_HANDLING,
CurrentUseCase());
scheduler_->DidHandleInputEventOnMainThread(
@@ -1006,9 +1006,9 @@ TEST_F(RendererSchedulerImplTest,
blink::WebInputEvent::kGestureScrollBegin);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("L1"), std::string("D1"),
- std::string("D2"), std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("L1"), std::string("D1"),
+ std::string("D2"), std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::MAIN_THREAD_CUSTOM_INPUT_HANDLING,
CurrentUseCase());
scheduler_->DidHandleInputEventOnMainThread(
@@ -1033,9 +1033,9 @@ TEST_F(RendererSchedulerImplTest,
// Because the main thread is performing custom input handling, we let all
// tasks run. However compositing tasks are still given priority.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("L1"), std::string("D1"),
- std::string("D2"), std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("L1"), std::string("D1"),
+ std::string("D2"), std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::MAIN_THREAD_CUSTOM_INPUT_HANDLING,
CurrentUseCase());
}
@@ -1058,9 +1058,9 @@ TEST_F(
// Because we are still waiting for the touchstart to be processed,
// non-essential tasks like loading tasks are blocked.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2"),
+ std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::TOUCHSTART, CurrentUseCase());
}
@@ -1077,9 +1077,9 @@ TEST_F(RendererSchedulerImplTest, TestCompositorPolicy_DidAnimateForInput) {
EnableIdleTasks();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D1"), std::string("D2"),
- std::string("C1"), std::string("C2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("D1"), std::string("D2"),
+ std::string("C1"), std::string("C2"),
+ std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::COMPOSITOR_GESTURE,
CurrentUseCase());
}
@@ -1101,7 +1101,7 @@ TEST_F(RendererSchedulerImplTest, Navigation_ResetsTaskCostEstimations) {
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("T1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("T1")));
}
TEST_F(RendererSchedulerImplTest,
@@ -1121,7 +1121,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_EQ(RendererSchedulerImpl::UseCase::MAIN_THREAD_GESTURE,
CurrentUseCase());
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("C1")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("C1")));
}
TEST_F(RendererSchedulerImplTest,
@@ -1142,7 +1142,7 @@ TEST_F(RendererSchedulerImplTest,
CurrentUseCase());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("T1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("T1")));
}
TEST_F(RendererSchedulerImplTest,
@@ -1163,7 +1163,7 @@ TEST_F(RendererSchedulerImplTest,
CurrentUseCase());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("T1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("T1")));
}
TEST_F(RendererSchedulerImplTest, TestTouchstartPolicy_Compositor) {
@@ -1178,8 +1178,8 @@ TEST_F(RendererSchedulerImplTest, TestTouchstartPolicy_Compositor) {
EnableIdleTasks();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2")));
// Animation or meta events like TapDown/FlingCancel shouldn't affect the
// priority.
@@ -1192,7 +1192,7 @@ TEST_F(RendererSchedulerImplTest, TestTouchstartPolicy_Compositor) {
FakeInputEvent(blink::WebInputEvent::kGestureTapDown),
RendererScheduler::InputEventState::EVENT_CONSUMED_BY_COMPOSITOR);
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
// Action events like ScrollBegin will kick us back into compositor priority,
// allowing service of the timer, loading and idle queues.
@@ -1203,8 +1203,8 @@ TEST_F(RendererSchedulerImplTest, TestTouchstartPolicy_Compositor) {
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("T1"),
- std::string("T2")));
+ ::testing::ElementsAre(std::string("L1"), std::string("T1"),
+ std::string("T2")));
}
TEST_F(RendererSchedulerImplTest, TestTouchstartPolicy_MainThread) {
@@ -1222,8 +1222,8 @@ TEST_F(RendererSchedulerImplTest, TestTouchstartPolicy_MainThread) {
EnableIdleTasks();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2")));
// Meta events like TapDown/FlingCancel shouldn't affect the priority.
run_order.clear();
@@ -1240,7 +1240,7 @@ TEST_F(RendererSchedulerImplTest, TestTouchstartPolicy_MainThread) {
FakeInputEvent(blink::WebInputEvent::kGestureTapDown),
WebInputEventResult::kHandledSystem);
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
// Action events like ScrollBegin will kick us back into compositor priority,
// allowing service of the timer, loading and idle queues.
@@ -1254,8 +1254,8 @@ TEST_F(RendererSchedulerImplTest, TestTouchstartPolicy_MainThread) {
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("T1"),
- std::string("T2")));
+ ::testing::ElementsAre(std::string("L1"), std::string("T1"),
+ std::string("T2")));
}
// TODO(alexclarke): Reenable once we've reinstaed the Loading UseCase.
@@ -1272,7 +1272,7 @@ TEST_F(RendererSchedulerImplTest, DISABLED_LoadingUseCase) {
std::string("D1"), std::string("L1"), std::string("D2"),
std::string("L2"), std::string("C1"), std::string("T1"),
std::string("C2"), std::string("T2"), std::string("I1")};
- EXPECT_THAT(run_order, testing::ElementsAreArray(loading_policy_expected));
+ EXPECT_THAT(run_order, ::testing::ElementsAreArray(loading_policy_expected));
EXPECT_EQ(RendererSchedulerImpl::UseCase::LOADING, CurrentUseCase());
// Advance 15s and try again, the loading policy should have ended and the
@@ -1288,7 +1288,7 @@ TEST_F(RendererSchedulerImplTest, DISABLED_LoadingUseCase) {
std::string("D1"), std::string("C1"), std::string("T1"),
std::string("L1"), std::string("D2"), std::string("C2"),
std::string("T2"), std::string("L2"), std::string("I1")};
- EXPECT_THAT(run_order, testing::ElementsAreArray(default_order_expected));
+ EXPECT_THAT(run_order, ::testing::ElementsAreArray(default_order_expected));
EXPECT_EQ(RendererSchedulerImpl::UseCase::NONE, CurrentUseCase());
}
@@ -1307,9 +1307,9 @@ TEST_F(RendererSchedulerImplTest,
// Note compositor tasks are not prioritized.
EXPECT_EQ(RendererSchedulerImpl::UseCase::NONE, CurrentUseCase());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D1"), std::string("C1"),
- std::string("D2"), std::string("C2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("D1"), std::string("C1"),
+ std::string("D2"), std::string("C2"),
+ std::string("I1")));
}
TEST_F(RendererSchedulerImplTest,
@@ -1327,9 +1327,9 @@ TEST_F(RendererSchedulerImplTest,
// Note compositor tasks are not prioritized.
EXPECT_EQ(RendererSchedulerImpl::UseCase::NONE, CurrentUseCase());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D1"), std::string("C1"),
- std::string("D2"), std::string("C2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("D1"), std::string("C1"),
+ std::string("D2"), std::string("C2"),
+ std::string("I1")));
}
TEST_F(RendererSchedulerImplTest,
@@ -1349,9 +1349,9 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_EQ(RendererSchedulerImpl::UseCase::COMPOSITOR_GESTURE,
CurrentUseCase());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D1"), std::string("D2"),
- std::string("C1"), std::string("C2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("D1"), std::string("D2"),
+ std::string("C1"), std::string("C2"),
+ std::string("I1")));
}
TEST_F(RendererSchedulerImplTest,
@@ -1367,9 +1367,9 @@ TEST_F(RendererSchedulerImplTest,
RunUntilIdle();
// Note compositor tasks are prioritized.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2"),
+ std::string("I1")));
scheduler_->DidHandleInputEventOnMainThread(
FakeInputEvent(blink::WebInputEvent::kMouseMove,
blink::WebInputEvent::kLeftButtonDown),
@@ -1407,9 +1407,9 @@ TEST_F(RendererSchedulerImplTest,
// Note compositor tasks are prioritized.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2"),
+ std::string("I1")));
}
TEST_F(RendererSchedulerImplTest,
@@ -1436,9 +1436,9 @@ TEST_F(RendererSchedulerImplTest,
// Note compositor tasks are prioritized.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2"),
+ std::string("I1")));
}
TEST_F(RendererSchedulerImplTest, EventConsumedOnCompositorThread_MouseWheel) {
@@ -1452,9 +1452,9 @@ TEST_F(RendererSchedulerImplTest, EventConsumedOnCompositorThread_MouseWheel) {
RunUntilIdle();
// Note compositor tasks are not prioritized.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D1"), std::string("D2"),
- std::string("C1"), std::string("C2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("D1"), std::string("D2"),
+ std::string("C1"), std::string("C2"),
+ std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::COMPOSITOR_GESTURE,
CurrentUseCase());
}
@@ -1471,9 +1471,9 @@ TEST_F(RendererSchedulerImplTest,
RunUntilIdle();
// Note compositor tasks are prioritized (since they are fast).
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2"),
+ std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::MAIN_THREAD_CUSTOM_INPUT_HANDLING,
CurrentUseCase());
}
@@ -1498,9 +1498,9 @@ TEST_F(RendererSchedulerImplTest, EventForwardedToMainThread_NoPreventDefault) {
RunUntilIdle();
// Note compositor tasks are prioritized.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2"),
+ std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::MAIN_THREAD_GESTURE,
CurrentUseCase());
}
@@ -1527,9 +1527,9 @@ TEST_F(
RunUntilIdle();
// Note compositor tasks are not prioritized.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D1"), std::string("D2"),
- std::string("C1"), std::string("C2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("D1"), std::string("D2"),
+ std::string("C1"), std::string("C2"),
+ std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::COMPOSITOR_GESTURE,
CurrentUseCase());
}
@@ -1548,9 +1548,9 @@ TEST_F(RendererSchedulerImplTest,
RunUntilIdle();
// Note compositor tasks are not prioritized.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D1"), std::string("C1"),
- std::string("D2"), std::string("C2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("D1"), std::string("C1"),
+ std::string("D2"), std::string("C2"),
+ std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::NONE, CurrentUseCase());
}
@@ -1568,9 +1568,9 @@ TEST_F(RendererSchedulerImplTest,
RunUntilIdle();
// Note compositor tasks are not prioritized.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D1"), std::string("C1"),
- std::string("D2"), std::string("C2"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("D1"), std::string("C1"),
+ std::string("D2"), std::string("C2"),
+ std::string("I1")));
EXPECT_EQ(RendererSchedulerImpl::UseCase::NONE, CurrentUseCase());
// Note compositor tasks are not prioritized.
scheduler_->DidHandleInputEventOnMainThread(
@@ -1599,8 +1599,8 @@ TEST_F(RendererSchedulerImplTest,
// Ensure that the default D1 task gets to run at some point before the final
// C2 compositor task.
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("D1"),
- std::string("C2")));
+ ::testing::ElementsAre(std::string("C1"), std::string("D1"),
+ std::string("C2")));
}
TEST_F(RendererSchedulerImplTest,
@@ -1633,8 +1633,8 @@ TEST_F(RendererSchedulerImplTest, TestTouchstartPolicyEndsAfterTimeout) {
RendererScheduler::InputEventState::EVENT_CONSUMED_BY_COMPOSITOR);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2")));
run_order.clear();
clock_->Advance(base::TimeDelta::FromMilliseconds(1000));
@@ -1646,8 +1646,8 @@ TEST_F(RendererSchedulerImplTest, TestTouchstartPolicyEndsAfterTimeout) {
// Touchstart policy mode should have ended now that the clock has advanced.
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1"),
- std::string("D2")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1"),
+ std::string("D2")));
}
TEST_F(RendererSchedulerImplTest,
@@ -1661,8 +1661,8 @@ TEST_F(RendererSchedulerImplTest,
RendererScheduler::InputEventState::EVENT_CONSUMED_BY_COMPOSITOR);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("C2"),
- std::string("D1"), std::string("D2")));
+ ::testing::ElementsAre(std::string("C1"), std::string("C2"),
+ std::string("D1"), std::string("D2")));
// Receiving the first touchmove will not affect scheduler priority.
run_order.clear();
@@ -1670,7 +1670,7 @@ TEST_F(RendererSchedulerImplTest,
FakeInputEvent(blink::WebInputEvent::kTouchMove),
RendererScheduler::InputEventState::EVENT_CONSUMED_BY_COMPOSITOR);
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
// Receiving the second touchmove will kick us back into compositor priority.
run_order.clear();
@@ -1678,7 +1678,7 @@ TEST_F(RendererSchedulerImplTest,
FakeInputEvent(blink::WebInputEvent::kTouchMove),
RendererScheduler::InputEventState::EVENT_CONSUMED_BY_COMPOSITOR);
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("L1")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("L1")));
}
TEST_F(RendererSchedulerImplTest, TestIsHighPriorityWorkAnticipated) {
@@ -2044,7 +2044,7 @@ TEST_F(RendererSchedulerImplWithMockSchedulerTest,
RunUntilIdle();
EXPECT_THAT(
mock_scheduler_->use_cases_,
- testing::ElementsAre(
+ ::testing::ElementsAre(
std::string("none"), std::string("compositor_gesture"),
std::string("compositor_gesture touchstart expected"),
std::string("none touchstart expected"), std::string("none")));
@@ -2106,9 +2106,9 @@ TEST_F(RendererSchedulerImplWithMessageLoopTest,
EnableIdleTasks();
RunUntilIdle();
// Note we expect task 3 to run last because it's non-nestable.
- EXPECT_THAT(order, testing::ElementsAre(std::string("1"), std::string("2"),
- std::string("4"), std::string("5"),
- std::string("3")));
+ EXPECT_THAT(order, ::testing::ElementsAre(std::string("1"), std::string("2"),
+ std::string("4"), std::string("5"),
+ std::string("3")));
}
TEST_F(RendererSchedulerImplTest, TestBeginMainFrameNotExpectedUntil) {
@@ -2213,7 +2213,7 @@ TEST_F(RendererSchedulerImplTest, TestLongIdlePeriodRepeating) {
EXPECT_EQ(3, run_count);
EXPECT_THAT(
actual_deadlines,
- testing::ElementsAre(
+ ::testing::ElementsAre(
clock_before + maximum_idle_period_duration(),
clock_before + idle_task_runtime + maximum_idle_period_duration(),
clock_before + (2 * idle_task_runtime) +
@@ -2351,7 +2351,7 @@ TEST_F(RendererSchedulerImplTest, TimerQueueEnabledByDefault) {
PostTestTasks(&run_order, "T1 T2");
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("T1"), std::string("T2")));
+ ::testing::ElementsAre(std::string("T1"), std::string("T2")));
}
TEST_F(RendererSchedulerImplTest, SuspendAndResumeTimerQueue) {
@@ -2360,12 +2360,12 @@ TEST_F(RendererSchedulerImplTest, SuspendAndResumeTimerQueue) {
scheduler_->SuspendTimerQueue();
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
scheduler_->ResumeTimerQueue();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("T1"), std::string("T2")));
+ ::testing::ElementsAre(std::string("T1"), std::string("T2")));
}
TEST_F(RendererSchedulerImplTest, SuspendAndThrottleTimerQueue) {
@@ -2377,7 +2377,7 @@ TEST_F(RendererSchedulerImplTest, SuspendAndThrottleTimerQueue) {
scheduler_->task_queue_throttler()->IncreaseThrottleRefCount(
static_cast<TaskQueue*>(timer_task_runner_.get()));
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
}
TEST_F(RendererSchedulerImplTest, ThrottleAndSuspendTimerQueue) {
@@ -2389,7 +2389,7 @@ TEST_F(RendererSchedulerImplTest, ThrottleAndSuspendTimerQueue) {
RunUntilIdle();
scheduler_->SuspendTimerQueue();
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
}
TEST_F(RendererSchedulerImplTest, MultipleSuspendsNeedMultipleResumes) {
@@ -2400,20 +2400,20 @@ TEST_F(RendererSchedulerImplTest, MultipleSuspendsNeedMultipleResumes) {
scheduler_->SuspendTimerQueue();
scheduler_->SuspendTimerQueue();
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
scheduler_->ResumeTimerQueue();
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
scheduler_->ResumeTimerQueue();
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
scheduler_->ResumeTimerQueue();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("T1"), std::string("T2")));
+ ::testing::ElementsAre(std::string("T1"), std::string("T2")));
}
TEST_F(RendererSchedulerImplTest, SuspendRenderer) {
@@ -2427,15 +2427,15 @@ TEST_F(RendererSchedulerImplTest, SuspendRenderer) {
EnableIdleTasks();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("D1"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("D1"),
+ std::string("I1")));
// The rest queued tasks fire when the tab goes foregrounded.
run_order.clear();
scheduler_->SetRendererBackgrounded(false);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("T1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("T1")));
run_order.clear();
PostTestTasks(&run_order, "D2 T2");
@@ -2443,7 +2443,7 @@ TEST_F(RendererSchedulerImplTest, SuspendRenderer) {
scheduler_->SuspendRenderer();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D2"), std::string("T2")));
+ ::testing::ElementsAre(std::string("D2"), std::string("T2")));
}
TEST_F(RendererSchedulerImplTest, ResumeRenderer) {
@@ -2459,15 +2459,15 @@ TEST_F(RendererSchedulerImplTest, ResumeRenderer) {
EnableIdleTasks();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("D1"),
- std::string("I1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("D1"),
+ std::string("I1")));
// The rest queued tasks fire when the renderer is resumed.
run_order.clear();
scheduler_->ResumeRenderer();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("T1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("T1")));
run_order.clear();
// No crash occurs when the renderer is suspended again, and
@@ -2477,15 +2477,15 @@ TEST_F(RendererSchedulerImplTest, ResumeRenderer) {
EnableIdleTasks();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C2"), std::string("D2"),
- std::string("I2")));
+ ::testing::ElementsAre(std::string("C2"), std::string("D2"),
+ std::string("I2")));
// The rest queued tasks fire when the renderer is resumed.
run_order.clear();
scheduler_->ResumeRenderer();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L2"), std::string("T2")));
+ ::testing::ElementsAre(std::string("L2"), std::string("T2")));
run_order.clear();
PostTestTasks(&run_order, "D3 T3");
@@ -2494,7 +2494,7 @@ TEST_F(RendererSchedulerImplTest, ResumeRenderer) {
scheduler_->SetRendererBackgrounded(false);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D3"), std::string("T3")));
+ ::testing::ElementsAre(std::string("D3"), std::string("T3")));
run_order.clear();
PostTestTasks(&run_order, "D4 T4");
@@ -2502,7 +2502,7 @@ TEST_F(RendererSchedulerImplTest, ResumeRenderer) {
scheduler_->ResumeRenderer();
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("D4"), std::string("T4")));
+ ::testing::ElementsAre(std::string("D4"), std::string("T4")));
}
TEST_F(RendererSchedulerImplTest, UseCaseToString) {
@@ -2539,7 +2539,7 @@ TEST_F(RendererSchedulerImplTest, ShutdownPreventsPostingOfNewTasks) {
std::vector<std::string> run_order;
PostTestTasks(&run_order, "D1 C1");
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
}
TEST_F(RendererSchedulerImplTest, TestRendererBackgroundedTimerSuspension) {
@@ -2556,7 +2556,7 @@ TEST_F(RendererSchedulerImplTest, TestRendererBackgroundedTimerSuspension) {
clock_->SetNowTicks(now);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("T1"), std::string("T2")));
+ ::testing::ElementsAre(std::string("T1"), std::string("T2")));
run_order.clear();
PostTestTasks(&run_order, "T3");
@@ -2564,7 +2564,7 @@ TEST_F(RendererSchedulerImplTest, TestRendererBackgroundedTimerSuspension) {
now += base::TimeDelta::FromSeconds(1);
clock_->SetNowTicks(now);
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("T3")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("T3")));
// Advance the time until after the scheduled timer queue suspension.
now = base::TimeTicks() + suspend_timers_when_backgrounded_delay() +
@@ -2579,18 +2579,18 @@ TEST_F(RendererSchedulerImplTest, TestRendererBackgroundedTimerSuspension) {
now += base::TimeDelta::FromSeconds(10);
clock_->SetNowTicks(now);
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre());
+ EXPECT_THAT(run_order, ::testing::ElementsAre());
scheduler_->SetRendererBackgrounded(false);
RunUntilIdle();
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("T4"), std::string("T5")));
+ ::testing::ElementsAre(std::string("T4"), std::string("T5")));
// Subsequent timer tasks should fire as usual.
run_order.clear();
PostTestTasks(&run_order, "T6");
RunUntilIdle();
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("T6")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("T6")));
}
TEST_F(RendererSchedulerImplTest,
@@ -2609,7 +2609,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_FALSE(TimerTasksSeemExpensive());
EXPECT_TRUE(TouchStartExpectedSoon());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1")));
// Emit a BeginMainFrame, and the loading task should get blocked.
DoMainFrame();
@@ -2623,7 +2623,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_TRUE(LoadingTasksSeemExpensive());
EXPECT_FALSE(TimerTasksSeemExpensive());
EXPECT_TRUE(TouchStartExpectedSoon());
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("D1")));
EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode());
}
@@ -2644,7 +2644,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_FALSE(TimerTasksSeemExpensive());
EXPECT_FALSE(TouchStartExpectedSoon());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1")));
EXPECT_EQ(v8::PERFORMANCE_ANIMATION, GetRAILMode());
}
@@ -2665,7 +2665,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_FALSE(LoadingTasksSeemExpensive());
EXPECT_TRUE(TimerTasksSeemExpensive());
EXPECT_TRUE(TouchStartExpectedSoon());
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("D1")));
EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode());
}
@@ -2701,7 +2701,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_TRUE(TimerTasksSeemExpensive());
EXPECT_TRUE(TouchStartExpectedSoon());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("T1"), std::string("D1")));
+ ::testing::ElementsAre(std::string("T1"), std::string("D1")));
EXPECT_EQ(v8::PERFORMANCE_ANIMATION, GetRAILMode());
}
@@ -2724,7 +2724,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_FALSE(LoadingTasksSeemExpensive());
EXPECT_TRUE(TimerTasksSeemExpensive());
EXPECT_TRUE(TouchStartExpectedSoon());
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("D1")));
EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode());
}
@@ -2746,7 +2746,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_FALSE(LoadingTasksSeemExpensive());
EXPECT_TRUE(TimerTasksSeemExpensive());
EXPECT_TRUE(TouchStartExpectedSoon());
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("D1")));
EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode());
}
@@ -2765,7 +2765,7 @@ TEST_F(RendererSchedulerImplTest,
RunUntilIdle();
// The expensive loading task gets blocked.
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("D1")));
EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode());
}
@@ -2790,7 +2790,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_TRUE(TouchStartExpectedSoon());
EXPECT_EQ(1, NavigationTaskExpectedCount());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1")));
// After the nagigation has been cancelled, the expensive loading tasks should
// get blocked.
@@ -2807,7 +2807,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_FALSE(TimerTasksSeemExpensive());
EXPECT_TRUE(TouchStartExpectedSoon());
EXPECT_EQ(0, NavigationTaskExpectedCount());
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("D1")));
EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode());
}
@@ -2834,7 +2834,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_TRUE(TouchStartExpectedSoon());
EXPECT_EQ(2, NavigationTaskExpectedCount());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1")));
run_order.clear();
scheduler_->RemovePendingNavigation(
@@ -2851,7 +2851,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_TRUE(TouchStartExpectedSoon());
EXPECT_EQ(1, NavigationTaskExpectedCount());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("L1"), std::string("D1")));
+ ::testing::ElementsAre(std::string("L1"), std::string("D1")));
run_order.clear();
scheduler_->RemovePendingNavigation(
@@ -2867,7 +2867,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_FALSE(TimerTasksSeemExpensive());
EXPECT_TRUE(TouchStartExpectedSoon());
EXPECT_EQ(0, NavigationTaskExpectedCount());
- EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1")));
+ EXPECT_THAT(run_order, ::testing::ElementsAre(std::string("D1")));
EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode());
}
@@ -2890,7 +2890,7 @@ TEST_F(RendererSchedulerImplTest,
EXPECT_TRUE(LoadingTasksSeemExpensive());
EXPECT_FALSE(TimerTasksSeemExpensive());
EXPECT_THAT(run_order,
- testing::ElementsAre(std::string("C1"), std::string("L1")));
+ ::testing::ElementsAre(std::string("C1"), std::string("L1")));
EXPECT_EQ(v8::PERFORMANCE_ANIMATION, GetRAILMode());
}
@@ -3864,8 +3864,9 @@ TEST_F(RendererSchedulerImplTest,
mock_task_runner_->RunUntilTime(base::TimeTicks() +
base::TimeDelta::FromMilliseconds(1100));
- EXPECT_THAT(run_times, testing::ElementsAre(base::TimeTicks() +
- base::TimeDelta::FromSeconds(1)));
+ EXPECT_THAT(run_times,
+ ::testing::ElementsAre(base::TimeTicks() +
+ base::TimeDelta::FromSeconds(1)));
run_times.clear();
timer_task_runner_->PostDelayedTask(
@@ -3878,8 +3879,8 @@ TEST_F(RendererSchedulerImplTest,
base::TimeDelta::FromMilliseconds(1500));
EXPECT_THAT(run_times,
- testing::ElementsAre(base::TimeTicks() +
- base::TimeDelta::FromMilliseconds(1300)));
+ ::testing::ElementsAre(base::TimeTicks() +
+ base::TimeDelta::FromMilliseconds(1300)));
}
TEST_F(RendererSchedulerImplTest, UnresponsiveMainThread) {

Powered by Google App Engine
This is Rietveld 408576698