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

Unified Diff: services/native_support/process_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_impl.cc ('k') | services/native_support/redirectors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/native_support/process_impl_unittest.cc
diff --git a/services/native_support/process_impl_unittest.cc b/services/native_support/process_impl_unittest.cc
index 348a1d84d22ea1265a3d929f7687f90fab80f0ab..88a0805c792b257599a949ad3a5ded733e10bcad 100644
--- a/services/native_support/process_impl_unittest.cc
+++ b/services/native_support/process_impl_unittest.cc
@@ -28,35 +28,35 @@ TEST_F(ProcessImplTest, Spawn) {
{
ProcessControllerPtr process_controller;
- error = mojo::files::ERROR_INTERNAL;
+ error = mojo::files::Error::INTERNAL;
process()->Spawn("/bin/true", mojo::Array<mojo::String>(),
mojo::Array<mojo::String>(), nullptr, 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 = 42;
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(0, exit_status);
}
{
ProcessControllerPtr process_controller;
- error = mojo::files::ERROR_INTERNAL;
+ error = mojo::files::Error::INTERNAL;
process()->Spawn("/bin/false", mojo::Array<mojo::String>(),
mojo::Array<mojo::String>(), nullptr, 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_NE(exit_status, 0);
}
}
@@ -108,23 +108,23 @@ TEST_F(ProcessImplTest, SpawnRedirectStdout) {
argv.push_back("/bin/echo");
argv.push_back(kOutput);
ProcessControllerPtr process_controller;
- mojo::files::Error error = mojo::files::ERROR_INTERNAL;
+ mojo::files::Error error = mojo::files::Error::INTERNAL;
process()->Spawn("/bin/echo", argv.Pass(), mojo::Array<mojo::String>(),
nullptr, file.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);
// Since |file|'s impl is on our thread, we have to spin our message loop.
RunMessageLoop();
// /bin/echo adds a newline (alas, POSIX /bin/echo doesn't specify "-n").
EXPECT_EQ(std::string(kOutput) + "\n", file_impl.output());
- 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(0, exit_status);
// TODO(vtl): Currently, |file| won't be closed until the process controller
« no previous file with comments | « services/native_support/process_impl.cc ('k') | services/native_support/redirectors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698