Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Side by Side Diff: chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc

Issue 5967003: Refactor UITestBase/ProxyLauncher. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add POD struct to hold some launcher variables. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <sstream> 5 #include <sstream>
6 #include <string> 6 #include <string>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Tests that the onbeforeunload and onunload logic is shortcutted if the old 195 // Tests that the onbeforeunload and onunload logic is shortcutted if the old
196 // renderer is gone. In that case, we don't want to wait for the old renderer 196 // renderer is gone. In that case, we don't want to wait for the old renderer
197 // to run the handlers. 197 // to run the handlers.
198 // We need to disable this on Mac because the crash causes the OS CrashReporter 198 // We need to disable this on Mac because the crash causes the OS CrashReporter
199 // process to kick in to analyze the poor dead renderer. Unfortunately, if the 199 // process to kick in to analyze the poor dead renderer. Unfortunately, if the
200 // app isn't stripped of debug symbols, this takes about five minutes to 200 // app isn't stripped of debug symbols, this takes about five minutes to
201 // complete and isn't conducive to quick turnarounds. As we don't currently 201 // complete and isn't conducive to quick turnarounds. As we don't currently
202 // strip the app on the build bots, this is bad times. 202 // strip the app on the build bots, this is bad times.
203 TEST_F(ResourceDispatcherTest, CrossSiteAfterCrash) { 203 TEST_F(ResourceDispatcherTest, CrossSiteAfterCrash) {
204 // This test only works in multi-process mode 204 // This test only works in multi-process mode
205 if (in_process_renderer()) 205 if (ProxyLauncher::in_process_renderer())
206 return; 206 return;
207 207
208 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); 208 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
209 ASSERT_TRUE(browser_proxy.get()); 209 ASSERT_TRUE(browser_proxy.get());
210 scoped_refptr<TabProxy> tab(browser_proxy->GetActiveTab()); 210 scoped_refptr<TabProxy> tab(browser_proxy->GetActiveTab());
211 ASSERT_TRUE(tab.get()); 211 ASSERT_TRUE(tab.get());
212 212
213 // Cause the renderer to crash. 213 // Cause the renderer to crash.
214 #if defined(OS_WIN) || defined(USE_LINUX_BREAKPAD) 214 #if defined(OS_WIN) || defined(USE_LINUX_BREAKPAD)
215 expected_crashes_ = 1; 215 expected_crashes_ = 1;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 GURL broken_url("chrome://theme"); 326 GURL broken_url("chrome://theme");
327 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(broken_url)); 327 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(broken_url));
328 328
329 // Make sure the navigation finishes. 329 // Make sure the navigation finishes.
330 std::wstring tab_title; 330 std::wstring tab_title;
331 EXPECT_TRUE(tab->GetTabTitle(&tab_title)); 331 EXPECT_TRUE(tab->GetTabTitle(&tab_title));
332 EXPECT_EQ(L"chrome://theme/ is not available", tab_title); 332 EXPECT_EQ(L"chrome://theme/ is not available", tab_title);
333 } 333 }
334 334
335 } // namespace 335 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698