OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 #include <windows.h> | 6 #include <windows.h> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 if (UITest::in_process_renderer()) { | 109 if (UITest::in_process_renderer()) { |
110 // in process mode doesn't do the crashing. | 110 // in process mode doesn't do the crashing. |
111 expected_crashes_ = 0; | 111 expected_crashes_ = 0; |
112 } else { | 112 } else { |
113 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 113 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
114 ASSERT_TRUE(browser.get()); | 114 ASSERT_TRUE(browser.get()); |
115 ASSERT_TRUE(browser->WaitForTabCountToBecome(1, action_max_timeout_ms())); | 115 ASSERT_TRUE(browser->WaitForTabCountToBecome(1, action_max_timeout_ms())); |
116 expected_crashes_ = 1; | 116 expected_crashes_ = 1; |
117 } | 117 } |
118 } | 118 } |
119 | |
120 // Tests whether we correctly fail on browser crashes during UI Tests. | |
121 class BrowserCrashTest : public UITest { | |
122 protected: | |
123 BrowserCrashTest() : UITest() | |
124 { | |
125 // Initial loads will never complete due to crash. | |
126 wait_for_initial_loads_ = false; | |
127 | |
128 launch_arguments_.AppendSwitch(switches::kBrowserCrashTest); | |
129 } | |
130 }; | |
131 | |
132 // Launch the app in browser crash test mode. | |
133 // This test is disabled. See bug 6910. | |
134 TEST_F(BrowserCrashTest, DISABLED_Crash) { | |
135 // Wait while the process is writing the crash dump. | |
136 PlatformThread::Sleep(5000); | |
137 expected_crashes_ = 1; | |
138 } | |
OLD | NEW |