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

Unified Diff: services/native_support/process_controller_impl_unittest.cc

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « services/native_support/process_controller_impl.cc ('k') | services/native_support/process_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/native_support/process_controller_impl_unittest.cc
diff --git a/services/native_support/process_controller_impl_unittest.cc b/services/native_support/process_controller_impl_unittest.cc
index 123c266d9a21566165a6388fc5e213e6c4b31703..ed3a42ee628cde531ba28212fa1322cc7ae7102f 100644
--- a/services/native_support/process_controller_impl_unittest.cc
+++ b/services/native_support/process_controller_impl_unittest.cc
@@ -35,7 +35,7 @@ TEST_F(ProcessControllerImplTest, Wait) {
{
ProcessControllerPtr process_controller;
- error = mojo::files::ERROR_INTERNAL;
+ error = mojo::files::Error::INTERNAL;
const char kPath[] = "/bin/sh";
mojo::Array<mojo::String> argv;
argv.push_back(kPath);
@@ -45,13 +45,13 @@ TEST_F(ProcessControllerImplTest, Wait) {
nullptr, nullptr, GetProxy(&process_controller),
Capture(&error));
ASSERT_TRUE(process().WaitForIncomingResponse());
- EXPECT_EQ(mojo::files::ERROR_OK, error);
+ EXPECT_EQ(mojo::files::Error::OK, error);
- error = mojo::files::ERROR_INTERNAL;
+ error = mojo::files::Error::INTERNAL;
int32_t exit_status = 0;
process_controller->Wait(Capture(&error, &exit_status));
ASSERT_TRUE(process_controller.WaitForIncomingResponse());
- EXPECT_EQ(mojo::files::ERROR_OK, error);
+ EXPECT_EQ(mojo::files::Error::OK, error);
EXPECT_EQ(42, exit_status);
}
}
@@ -127,7 +127,7 @@ TEST_F(ProcessControllerImplTest, Kill) {
QuitOnReadyFile ofile_impl(GetProxy(&ofile));
ProcessControllerPtr process_controller;
- mojo::files::Error error = mojo::files::ERROR_INTERNAL;
+ mojo::files::Error error = mojo::files::Error::INTERNAL;
const char kPath[] = "/bin/bash";
mojo::Array<mojo::String> argv;
argv.push_back(kPath);
@@ -137,23 +137,23 @@ TEST_F(ProcessControllerImplTest, Kill) {
ifile.Pass(), ofile.Pass(), nullptr,
GetProxy(&process_controller), Capture(&error));
ASSERT_TRUE(process().WaitForIncomingResponse());
- EXPECT_EQ(mojo::files::ERROR_OK, error);
+ EXPECT_EQ(mojo::files::Error::OK, error);
// |ofile_impl| will quit the message loop once it sees "ready".
RunMessageLoop();
ASSERT_TRUE(ofile_impl.got_ready());
// Send SIGINT.
- error = mojo::files::ERROR_INTERNAL;
+ error = mojo::files::Error::INTERNAL;
process_controller->Kill(static_cast<int32_t>(SIGINT), Capture(&error));
ASSERT_TRUE(process_controller.WaitForIncomingResponse());
- EXPECT_EQ(mojo::files::ERROR_OK, error);
+ EXPECT_EQ(mojo::files::Error::OK, error);
- error = mojo::files::ERROR_INTERNAL;
+ error = mojo::files::Error::INTERNAL;
int32_t exit_status = 0;
process_controller->Wait(Capture(&error, &exit_status));
ASSERT_TRUE(process_controller.WaitForIncomingResponse());
- EXPECT_EQ(mojo::files::ERROR_OK, error);
+ EXPECT_EQ(mojo::files::Error::OK, error);
EXPECT_EQ(42, exit_status);
}
@@ -167,7 +167,7 @@ TEST_F(ProcessControllerImplTest, DestroyingControllerKills) {
QuitOnReadyFile ofile_impl(GetProxy(&ofile));
ProcessControllerPtr process_controller;
- mojo::files::Error error = mojo::files::ERROR_INTERNAL;
+ mojo::files::Error error = mojo::files::Error::INTERNAL;
const char kPath[] = "/bin/bash";
mojo::Array<mojo::String> argv;
argv.push_back(kPath);
@@ -177,7 +177,7 @@ TEST_F(ProcessControllerImplTest, DestroyingControllerKills) {
ifile.Pass(), ofile.Pass(), nullptr,
GetProxy(&process_controller), Capture(&error));
ASSERT_TRUE(process().WaitForIncomingResponse());
- EXPECT_EQ(mojo::files::ERROR_OK, error);
+ EXPECT_EQ(mojo::files::Error::OK, error);
// |ofile_impl| will quit the message loop once it sees "ready".
RunMessageLoop();
« no previous file with comments | « services/native_support/process_controller_impl.cc ('k') | services/native_support/process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698