diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-01 05:37:45 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-01 05:37:45 +0000 |
commit | 8450637fa37ca5499b5ab35a669daa085a0a88a5 (patch) | |
tree | cce497ef407158887bd72718908ca4354569911c /sandbox/src/handle_table_unittest.cc | |
parent | 855b53a0bfe5039065f3795633c0b6f6c8e060f2 (diff) | |
download | chromium_src-8450637fa37ca5499b5ab35a669daa085a0a88a5.zip chromium_src-8450637fa37ca5499b5ab35a669daa085a0a88a5.tar.gz chromium_src-8450637fa37ca5499b5ab35a669daa085a0a88a5.tar.bz2 |
Revert 91270 - sbox_unittests HandleTable.FindTable failing on Win XP & Vista
Had a bug in the handle table unit test. Added GetHandleName to fix the bug and make handle management easier.
TEST=sbox_unittests --gtest_filter=HandleTable.*
Review URL: http://codereview.chromium.org/7218066
TBR=jschuh@chromium.org
Review URL: http://codereview.chromium.org/7292028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91271 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/handle_table_unittest.cc')
-rw-r--r-- | sandbox/src/handle_table_unittest.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sandbox/src/handle_table_unittest.cc b/sandbox/src/handle_table_unittest.cc index 1e8ddcb..696037f 100644 --- a/sandbox/src/handle_table_unittest.cc +++ b/sandbox/src/handle_table_unittest.cc @@ -47,8 +47,6 @@ 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_EQ(sandbox::GetHandleName(file, &handle_name), true); // Look for the handle in our process bool handle_found = false; @@ -56,7 +54,7 @@ TEST(HandleTable, FindHandle) { for (HandleTable::Iterator it = handles.HandlesForProcess(::GetCurrentProcessId()); it != handles.end(); ++it) { - if (it->IsType(HandleTable::kTypeFile) && it->Name() == handle_name) { + if (it->IsType(HandleTable::kTypeFile) && it->Name().compare(my_file)) { handle_found = true; break; } |