summaryrefslogtreecommitdiffstats
path: root/sandbox/src/handle_table_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/src/handle_table_unittest.cc')
-rw-r--r--sandbox/src/handle_table_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sandbox/src/handle_table_unittest.cc b/sandbox/src/handle_table_unittest.cc
index 696037f..3977c4a 100644
--- a/sandbox/src/handle_table_unittest.cc
+++ b/sandbox/src/handle_table_unittest.cc
@@ -47,6 +47,8 @@ TEST(HandleTable, FindHandle) {
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_NE(sandbox::GetHandleName(file, &handle_name), FALSE);
// Look for the handle in our process
bool handle_found = false;
@@ -54,7 +56,7 @@ TEST(HandleTable, FindHandle) {
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;
}