| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "content/public/browser/render_widget_host_view.h" | 9 #include "content/public/browser/render_widget_host_view.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 } | 710 } |
| 711 | 711 |
| 712 void OnTargetCrashed(const inspector::TargetCrashedParams& params) override { | 712 void OnTargetCrashed(const inspector::TargetCrashedParams& params) override { |
| 713 FinishAsynchronousTest(); | 713 FinishAsynchronousTest(); |
| 714 render_process_exited_ = true; | 714 render_process_exited_ = true; |
| 715 } | 715 } |
| 716 | 716 |
| 717 // Make sure we don't fail because the renderer crashed! | 717 // Make sure we don't fail because the renderer crashed! |
| 718 void RenderProcessExited(base::TerminationStatus status, | 718 void RenderProcessExited(base::TerminationStatus status, |
| 719 int exit_code) override { | 719 int exit_code) override { |
| 720 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 721 EXPECT_EQ(base::TERMINATION_STATUS_PROCESS_CRASHED, status); |
| 722 #else |
| 720 EXPECT_EQ(base::TERMINATION_STATUS_ABNORMAL_TERMINATION, status); | 723 EXPECT_EQ(base::TERMINATION_STATUS_ABNORMAL_TERMINATION, status); |
| 724 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 721 } | 725 } |
| 722 }; | 726 }; |
| 723 | 727 |
| 724 HEADLESS_ASYNC_DEVTOOLED_TEST_F(HeadlessCrashObserverTest); | 728 HEADLESS_ASYNC_DEVTOOLED_TEST_F(HeadlessCrashObserverTest); |
| 725 | 729 |
| 726 class HeadlessDevToolsClientAttachTest | 730 class HeadlessDevToolsClientAttachTest |
| 727 : public HeadlessAsyncDevTooledBrowserTest { | 731 : public HeadlessAsyncDevTooledBrowserTest { |
| 728 public: | 732 public: |
| 729 void RunDevTooledTest() override { | 733 void RunDevTooledTest() override { |
| 730 other_devtools_client_ = HeadlessDevToolsClient::Create(); | 734 other_devtools_client_ = HeadlessDevToolsClient::Create(); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 kDevToolsEmulateNetworkConditionsClientId)); | 931 kDevToolsEmulateNetworkConditionsClientId)); |
| 928 FinishAsynchronousTest(); | 932 FinishAsynchronousTest(); |
| 929 } | 933 } |
| 930 | 934 |
| 931 TestProtocolHandler* test_handler_; // NOT OWNED | 935 TestProtocolHandler* test_handler_; // NOT OWNED |
| 932 }; | 936 }; |
| 933 | 937 |
| 934 HEADLESS_ASYNC_DEVTOOLED_TEST_F(DevToolsHeaderStrippingTest); | 938 HEADLESS_ASYNC_DEVTOOLED_TEST_F(DevToolsHeaderStrippingTest); |
| 935 | 939 |
| 936 } // namespace headless | 940 } // namespace headless |
| OLD | NEW |