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

Side by Side Diff: chrome/browser/unload_browsertest.cc

Issue 15682009: Eliminate SwapOut message parameters, keeping state in RVHM instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to get Android build fix Created 7 years, 6 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
« no previous file with comments | « no previous file | content/browser/cross_site_request_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #if defined(OS_POSIX) 5 #if defined(OS_POSIX)
6 #include <signal.h> 6 #include <signal.h>
7 #endif 7 #endif
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 NavigateToDataURL(INFINITE_UNLOAD_HTML, "infiniteunload"); 211 NavigateToDataURL(INFINITE_UNLOAD_HTML, "infiniteunload");
212 // Must navigate to a non-data URL to trigger cross-site codepath. 212 // Must navigate to a non-data URL to trigger cross-site codepath.
213 NavigateToNolistenersFileTwice(); 213 NavigateToNolistenersFileTwice();
214 } 214 }
215 215
216 // Navigate to a page with an infinite beforeunload handler. 216 // Navigate to a page with an infinite beforeunload handler.
217 // Then two two async crosssite requests to ensure 217 // Then two two async crosssite requests to ensure
218 // we don't get confused and think we're closing the tab. 218 // we don't get confused and think we're closing the tab.
219 // This test is flaky on the valgrind UI bots. http://crbug.com/39057 and 219 // This test is flaky on the valgrind UI bots. http://crbug.com/39057 and
220 // http://crbug.com/86469 220 // http://crbug.com/86469
221 IN_PROC_BROWSER_TEST_F(UnloadTest, 221 IN_PROC_BROWSER_TEST_F(UnloadTest, CrossSiteInfiniteBeforeUnloadAsync) {
222 DISABLED_CrossSiteInfiniteBeforeUnloadAsync) {
223 // Tests makes no sense in single-process mode since the renderer is hung. 222 // Tests makes no sense in single-process mode since the renderer is hung.
224 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) 223 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess))
225 return; 224 return;
226 225
227 NavigateToDataURL(INFINITE_BEFORE_UNLOAD_HTML, "infinitebeforeunload"); 226 NavigateToDataURL(INFINITE_BEFORE_UNLOAD_HTML, "infinitebeforeunload");
228 // Must navigate to a non-data URL to trigger cross-site codepath. 227 // Must navigate to a non-data URL to trigger cross-site codepath.
229 NavigateToNolistenersFileTwiceAsync(); 228 NavigateToNolistenersFileTwiceAsync();
230 } 229 }
231 230
232 // Navigate to a page with an infinite beforeunload handler. 231 // Navigate to a page with an infinite beforeunload handler.
233 // Then two two sync crosssite requests to ensure 232 // Then two two sync crosssite requests to ensure
234 // we correctly nav to each one. 233 // we correctly nav to each one.
235 // If this flakes, reopen bug http://crbug.com/86469. 234 // If this flakes, see bug http://crbug.com/86469.
236 IN_PROC_BROWSER_TEST_F(UnloadTest, DISABLED_CrossSiteInfiniteBeforeUnloadSync) { 235 IN_PROC_BROWSER_TEST_F(UnloadTest, CrossSiteInfiniteBeforeUnloadSync) {
237 // Tests makes no sense in single-process mode since the renderer is hung. 236 // Tests makes no sense in single-process mode since the renderer is hung.
238 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) 237 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess))
239 return; 238 return;
240 239
241 NavigateToDataURL(INFINITE_BEFORE_UNLOAD_HTML, "infinitebeforeunload"); 240 NavigateToDataURL(INFINITE_BEFORE_UNLOAD_HTML, "infinitebeforeunload");
242 // Must navigate to a non-data URL to trigger cross-site codepath. 241 // Must navigate to a non-data URL to trigger cross-site codepath.
243 NavigateToNolistenersFileTwice(); 242 NavigateToNolistenersFileTwice();
244 } 243 }
245 244
246 // Tests closing the browser on a page with no unload listeners registered. 245 // Tests closing the browser on a page with no unload listeners registered.
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 content::WindowedNotificationObserver window_observer( 611 content::WindowedNotificationObserver window_observer(
613 chrome::NOTIFICATION_BROWSER_CLOSED, 612 chrome::NOTIFICATION_BROWSER_CLOSED,
614 content::NotificationService::AllSources()); 613 content::NotificationService::AllSources());
615 chrome::CloseWindow(browser()); 614 chrome::CloseWindow(browser());
616 CrashTab(beforeunload_contents); 615 CrashTab(beforeunload_contents);
617 window_observer.Wait(); 616 window_observer.Wait();
618 } 617 }
619 618
620 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs 619 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs
621 // and multiple windows. 620 // and multiple windows.
OLDNEW
« no previous file with comments | « no previous file | content/browser/cross_site_request_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698