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

Unified Diff: native_client_sdk/src/tests/nacl_io_test/event_test.cc

Issue 242533005: [NaCl SDK] nacl_io: Add flow control the JavaScript pipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: native_client_sdk/src/tests/nacl_io_test/event_test.cc
diff --git a/native_client_sdk/src/tests/nacl_io_test/event_test.cc b/native_client_sdk/src/tests/nacl_io_test/event_test.cc
index 8ca754da4808841c0466532e87f8c62ba041ff30..fefeb1a9a6805e2d76f1af3e36c9ff04f8f2a497 100644
--- a/native_client_sdk/src/tests/nacl_io_test/event_test.cc
+++ b/native_client_sdk/src/tests/nacl_io_test/event_test.cc
@@ -174,14 +174,18 @@ TEST(PipeTest, Listener) {
{
EventListenerLock locker(&pipe);
EXPECT_EQ(0, locker.WaitOnEvent(POLLOUT, 0));
- EXPECT_EQ(sizeof(hello), pipe.Write_Locked(hello, sizeof(hello)));
+ int out_bytes = 0;
+ EXPECT_EQ(0, pipe.Write_Locked(hello, sizeof(hello), &out_bytes));
+ EXPECT_EQ(sizeof(hello), out_bytes);
}
// We should now be able to poll
{
EventListenerLock locker(&pipe);
EXPECT_EQ(0, locker.WaitOnEvent(POLLIN, 0));
- EXPECT_EQ(sizeof(hello), pipe.Read_Locked(tmp, sizeof(tmp)));
+ int out_bytes = -1;
+ EXPECT_EQ(0, pipe.Read_Locked(tmp, sizeof(tmp), &out_bytes));
+ EXPECT_EQ(sizeof(hello), out_bytes);
}
// Verify we can read it correctly.

Powered by Google App Engine
This is Rietveld 408576698