[jumbo] Move two clashing RunPendingTasks() in blink tests
There is a ::blink::test::RunPendingTasks() but one test
imported it into ::blink with a using statement and another
test created its own ::blink::RunPendingTasks(). This cause
problems in some jumbo builds. This moves both RunPendingTasks
away from the blink namespace.
Change-Id: Ib811f27269305cc1ed2fa4019377e1a4b2e36d6e
Reviewed-on: https://chromium-review.googlesource.com/c/1386209
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#618167}
diff --git a/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc b/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc
index be55e698..ac8385db 100644
--- a/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc
+++ b/third_party/blink/renderer/core/display_lock/display_lock_context_test.cc
@@ -14,13 +14,6 @@
namespace blink {
-void RunPendingTasks() {
- base::RunLoop run_loop;
- Thread::Current()->GetTaskRunner()->PostTask(FROM_HERE,
- run_loop.QuitWhenIdleClosure());
- run_loop.Run();
-}
-
class DisplayLockContextTest : public RenderingTest {
public:
void SetUp() override {
@@ -36,6 +29,13 @@
}
}
+ static void RunPendingTasks() {
+ base::RunLoop run_loop;
+ Thread::Current()->GetTaskRunner()->PostTask(
+ FROM_HERE, run_loop.QuitWhenIdleClosure());
+ run_loop.Run();
+ }
+
DisplayLockContext::State ContextState(DisplayLockContext* context) const {
return context->state_;
}
diff --git a/third_party/blink/renderer/core/page/viewport_test.cc b/third_party/blink/renderer/core/page/viewport_test.cc
index ad676013..92591e2 100644
--- a/third_party/blink/renderer/core/page/viewport_test.cc
+++ b/third_party/blink/renderer/core/page/viewport_test.cc
@@ -58,8 +58,6 @@
namespace blink {
-using blink::test::RunPendingTasks;
-
class ViewportTest : public testing::Test {
protected:
ViewportTest()
@@ -85,7 +83,7 @@
void ExecuteScript(WebLocalFrame* frame, const WebString& code) {
frame->ExecuteScript(WebScriptSource(code));
- RunPendingTasks();
+ blink::test::RunPendingTasks();
}
std::string base_url_;
@@ -3286,7 +3284,7 @@
request.Complete(responseText);
// Pump the task queue so the meta tag gets processed.
- test::RunPendingTasks();
+ blink::test::RunPendingTasks();
}
HistogramTester histogram_tester_;