Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: installer/src/installer-lib/test/process_test.cpp

Issue 5663180676136960: Make sure IE and Engine are actually being closed by custom action (Closed)
Patch Set: Use handle class for HMODULE. Add back a test for immersive case. Created June 26, 2014, 1:24 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « installer/src/installer-lib/process.cpp ('k') | src/plugin/AdblockPlusClient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installer/src/installer-lib/test/process_test.cpp
===================================================================
--- a/installer/src/installer-lib/test/process_test.cpp
+++ b/installer/src/installer-lib/test/process_test.cpp
@@ -9,9 +9,6 @@
// Comparison objects
//-------------------------------------------------------
-const wchar_t * multiple_module_names[] = { L"kernel32.dll", L"non-matching-name" } ;
-const wchar_t * non_existent_module_names[] = { L"non-matching-name" } ;
-
const wchar_t exact_exe_name[] = L"installer-ca-tests.exe" ;
const std::wstring exact_exe_string( exact_exe_name ) ;
const wstring_ci exact_exe_string_ci( exact_exe_name ) ;
@@ -46,16 +43,6 @@
} ;
} ;
-
-struct our_process_by_name_subclassed
- : public process_by_any_exe_not_immersive
-{
- our_process_by_name_subclassed()
- : process_by_any_exe_not_immersive( file_name_set( multiple_exe_names ))
- {}
-} ;
-
-
//-------------------------------------------------------
//-------------------------------------------------------
/**
@@ -110,9 +97,9 @@
PROCESSENTRY32 process_absent = process_with_name( L"no_such_name" ) ;
file_name_set multiple_name_set( multiple_exe_names ) ;
-file_name_set multiple_name_set_modules( multiple_module_names ) ;
-file_name_set non_existent_name_set_modules( non_existent_module_names ) ;
process_by_any_file_name_CI find_in_set( multiple_name_set ) ;
+process_by_any_exe_not_immersive find_in_set_not_immersive( multiple_name_set ) ;
+
TEST( file_name_set, validate_setup )
{
@@ -294,4 +281,13 @@
size_t size( s.size() ) ;
EXPECT_EQ( size, 1u );
ASSERT_GE( size, 1u );
+}
+
+TEST( pid_set, find_our_process_in_set_not_immersive )
+{
+ std::set< DWORD > s ;
+ initialize_process_set( s, find_in_set_not_immersive, copy_PID() ) ;
+ size_t size( s.size() ) ;
+ EXPECT_EQ( size, 1u );
+ ASSERT_GE( size, 1u );
}
« no previous file with comments | « installer/src/installer-lib/process.cpp ('k') | src/plugin/AdblockPlusClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld