summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 14:36:44 +0000
committerjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 14:36:44 +0000
commit66b04fce0c27d32ee428cd48fc0d89da4e8e46e4 (patch)
tree1b2b9b0ec11e0fefcd58df948226c646569568bc /chrome_frame
parent74e51408fd3361b11d3e981cab925a6ed960c905 (diff)
downloadchromium_src-66b04fce0c27d32ee428cd48fc0d89da4e8e46e4.zip
chromium_src-66b04fce0c27d32ee428cd48fc0d89da4e8e46e4.tar.gz
chromium_src-66b04fce0c27d32ee428cd48fc0d89da4e8e46e4.tar.bz2
Fix crashing test
This is not a real crash, it is caused by wrapping TestSuite::Run in an exception filter. DllRedirector test uses VerQueryValue to query version from version resource. VerQueryValue, on windows XP, takes a const pointer but tries to modify it causing access violation. So where do you fix this bug? You guessed it right: in kernel32!UnhandledExceptionFilter :) UnhandledExceptionfilter checks if the crash address belongs to a resource section of a binary and then makes it writable. If we install exception filter around VerQueryValue this does not happen and we treat it as a crashed test. solution is to remove the exception filter. This might result in tests crashing levaing around zombie IE/Firefox. We will deal with that when that happens. TEST=DllRedirectorLoadingTest.TestDllRedirection BUG=78209 Review URL: http://codereview.chromium.org/6792053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/dll_redirector_loading_test.cc3
-rw-r--r--chrome_frame/test/run_all_unittests.cc33
2 files changed, 3 insertions, 33 deletions
diff --git a/chrome_frame/test/dll_redirector_loading_test.cc b/chrome_frame/test/dll_redirector_loading_test.cc
index b7aa0ae..c9508b0 100644
--- a/chrome_frame/test/dll_redirector_loading_test.cc
+++ b/chrome_frame/test/dll_redirector_loading_test.cc
@@ -123,8 +123,7 @@ scoped_ptr<Version> DllRedirectorLoadingTest::original_version_;
scoped_ptr<Version> DllRedirectorLoadingTest::new_version_;
ScopedTempDir DllRedirectorLoadingTest::temp_dir_;
-// bug: http://crbug.com/78209
-TEST_F(DllRedirectorLoadingTest, DISABLED_TestDllRedirection) {
+TEST_F(DllRedirectorLoadingTest, TestDllRedirection) {
struct TestData {
FilePath first_dll;
FilePath second_dll;
diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc
index 49957b9..89a2b56 100644
--- a/chrome_frame/test/run_all_unittests.cc
+++ b/chrome_frame/test/run_all_unittests.cc
@@ -31,36 +31,13 @@ void PureCall() {
__debugbreak();
}
-// This class implements the Run method and registers an exception handler to
-// ensure that any ChromeFrame processes like IE, Firefox, etc are terminated
-// if there is a crash in the chrome frame test suite.
-class ChromeFrameTestSuite : public base::TestSuite {
- public:
- ChromeFrameTestSuite(int argc, char** argv)
- : base::TestSuite(argc, argv) {}
-
- int Run() {
- // Register a stack based exception handler to catch any exceptions which
- // occur in the course of the test.
- int ret = -1;
- __try {
- ret = base::TestSuite::Run();
- }
-
- __except(EXCEPTION_EXECUTE_HANDLER) {
- ret = -1;
- }
- return ret;
- }
-};
-
int main(int argc, char **argv) {
base::EnableTerminationOnHeapCorruption();
base::PlatformThread::SetName("ChromeFrame tests");
_set_purecall_handler(PureCall);
- ChromeFrameTestSuite test_suite(argc, argv);
+ base::TestSuite test_suite(argc, argv);
SetConfigBool(kChromeFrameHeadlessMode, true);
SetConfigBool(kChromeFrameAccessibleMode, true);
@@ -84,13 +61,7 @@ int main(int argc, char **argv) {
ScopedChromeFrameRegistrar ia2_registrar(
chrome_frame_test::GetIAccessible2ProxyStubPath().value(),
ScopedChromeFrameRegistrar::SYSTEM_LEVEL);
- ret = test_suite.Run();
- }
-
- if (ret == -1) {
- LOG(ERROR) << "ChromeFrame tests crashed";
- chrome_frame_test::KillProcesses(L"iexplore.exe", 0, false);
- chrome_frame_test::KillProcesses(L"firefox.exe", 0, false);
+ test_suite.Run();
}
DeleteConfigValue(kChromeFrameHeadlessMode);