| 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 "content/public/browser/utility_process_mojo_client.h" | 5 #include "content/public/browser/utility_process_mojo_client.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 base::Bind(&UtilityProcessMojoClientBrowserTest::OnResponseReceived, | 77 base::Bind(&UtilityProcessMojoClientBrowserTest::OnResponseReceived, |
| 78 base::Unretained(this))); | 78 base::Unretained(this))); |
| 79 | 79 |
| 80 run_loop.Run(); | 80 run_loop.Run(); |
| 81 EXPECT_TRUE(response_received_); | 81 EXPECT_TRUE(response_received_); |
| 82 EXPECT_FALSE(error_happened_); | 82 EXPECT_FALSE(error_happened_); |
| 83 } | 83 } |
| 84 | 84 |
| 85 // Call the Mojo service but the utility process terminates before getting | 85 // Call the Mojo service but the utility process terminates before getting |
| 86 // the result back. | 86 // the result back. |
| 87 // TODO(pmonette): Re-enable when crbug.com/618206 is fixed. | 87 IN_PROC_BROWSER_TEST_F(UtilityProcessMojoClientBrowserTest, ConnectionError) { |
| 88 IN_PROC_BROWSER_TEST_F(UtilityProcessMojoClientBrowserTest, | |
| 89 DISABLED_ConnectionError) { | |
| 90 base::RunLoop run_loop; | 88 base::RunLoop run_loop; |
| 91 done_closure_ = run_loop.QuitClosure(); | 89 done_closure_ = run_loop.QuitClosure(); |
| 92 | 90 |
| 93 StartMojoService(false); | 91 StartMojoService(false); |
| 94 | 92 |
| 95 mojo_client_->service()->DoTerminateProcess( | 93 mojo_client_->service()->DoTerminateProcess( |
| 96 base::Bind(&UtilityProcessMojoClientBrowserTest::OnResponseReceived, | 94 base::Bind(&UtilityProcessMojoClientBrowserTest::OnResponseReceived, |
| 97 base::Unretained(this))); | 95 base::Unretained(this))); |
| 98 | 96 |
| 99 run_loop.Run(); | 97 run_loop.Run(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 base::Unretained(this))); | 132 base::Unretained(this))); |
| 135 | 133 |
| 136 run_loop.Run(); | 134 run_loop.Run(); |
| 137 EXPECT_TRUE(response_received_); | 135 EXPECT_TRUE(response_received_); |
| 138 EXPECT_TRUE(sandbox_succeeded_); | 136 EXPECT_TRUE(sandbox_succeeded_); |
| 139 EXPECT_FALSE(error_happened_); | 137 EXPECT_FALSE(error_happened_); |
| 140 } | 138 } |
| 141 #endif | 139 #endif |
| 142 | 140 |
| 143 } // namespace content | 141 } // namespace content |
| OLD | NEW |