Chromium Code Reviews| Index: headless/public/util/protocol_handler_request_id_browsertest.cc |
| diff --git a/headless/public/util/protocol_handler_request_id_browsertest.cc b/headless/public/util/protocol_handler_request_id_browsertest.cc |
| index 986bf1f1298e8c2b67327cfca53885cc8da72e6d..d6bbdffa5fc6896fd5e2eb872b78090fb4be5e08 100644 |
| --- a/headless/public/util/protocol_handler_request_id_browsertest.cc |
| +++ b/headless/public/util/protocol_handler_request_id_browsertest.cc |
| @@ -2,6 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include "base/run_loop.h" |
| +#include "content/public/common/browser_side_navigation_policy.h" |
| #include "content/public/test/browser_test.h" |
| #include "headless/public/devtools/domains/network.h" |
| #include "headless/public/devtools/domains/page.h" |
| @@ -168,11 +170,24 @@ class ProtocolHandlerRequestIdCorrelationTest |
| public page::Observer { |
| public: |
| void RunDevTooledTest() override { |
| + if (content::IsBrowserSideNavigationEnabled()) { |
| + // TODO: get this working with PlzNavigate. |
| + // See discussion on https://codereview.chromium.org/2695923010/ |
| + FinishAsynchronousTest(); |
| + return; |
| + } |
| + |
| EXPECT_TRUE(embedded_test_server()->Start()); |
| devtools_client_->GetPage()->AddObserver(this); |
| devtools_client_->GetPage()->Enable(); |
| + |
| + base::RunLoop run_loop; |
| devtools_client_->GetNetwork()->AddObserver(this); |
| - devtools_client_->GetNetwork()->Enable(); |
| + devtools_client_->GetNetwork()->Enable(run_loop.QuitClosure()); |
| + base::MessageLoop::ScopedNestableTaskAllower nest_loop( |
| + base::MessageLoop::current()); |
| + run_loop.Run(); |
|
nasko
2017/03/06 18:38:49
The explanation of why this is needed is at https:
|
| + |
| devtools_client_->GetPage()->Navigate("http://foo.com/index.html"); |
| } |