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

Unified Diff: sandbox/src/handle_table_unittest.cc

Issue 7218066: Had a bug in the handle table unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
« sandbox/src/handle_table.cc ('K') | « sandbox/src/handle_table.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/handle_table_unittest.cc
===================================================================
--- sandbox/src/handle_table_unittest.cc (revision 90713)
+++ sandbox/src/handle_table_unittest.cc (working copy)
@@ -47,6 +47,8 @@
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, NULL);
EXPECT_NE(INVALID_HANDLE_VALUE, file);
+ string16 handle_name;
+ ASSERT_EQ(NT_SUCCESS(sandbox::GetHandleName(file, &handle_name)), true);
nsylvain 2011/06/30 19:21:46 TRUE instead of true ?
jschuh 2011/07/01 01:24:26 No, using a bool not BOOL.
nsylvain 2011/07/01 19:23:28 NT_SUCCESS returns TRUE or FALSE, and ASSERT_EQ co
// Look for the handle in our process
bool handle_found = false;
@@ -54,7 +56,7 @@
for (HandleTable::Iterator it =
handles.HandlesForProcess(::GetCurrentProcessId());
it != handles.end(); ++it) {
- if (it->IsType(HandleTable::kTypeFile) && it->Name().compare(my_file)) {
+ if (it->IsType(HandleTable::kTypeFile) && it->Name() == handle_name) {
handle_found = true;
break;
}
« sandbox/src/handle_table.cc ('K') | « sandbox/src/handle_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698