OLD | NEW |
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 NavigateToDataURL(INFINITE_BEFORE_UNLOAD_HTML, "infinitebeforeunload"); | 224 NavigateToDataURL(INFINITE_BEFORE_UNLOAD_HTML, "infinitebeforeunload"); |
225 // Must navigate to a non-data URL to trigger cross-site codepath. | 225 // Must navigate to a non-data URL to trigger cross-site codepath. |
226 NavigateToNolistenersFileTwiceAsync(); | 226 NavigateToNolistenersFileTwiceAsync(); |
227 } | 227 } |
228 | 228 |
229 // Navigate to a page with an infinite beforeunload handler. | 229 // Navigate to a page with an infinite beforeunload handler. |
230 // Then two two sync crosssite requests to ensure | 230 // Then two two sync crosssite requests to ensure |
231 // we correctly nav to each one. | 231 // we correctly nav to each one. |
232 // If this flakes, reopen bug http://crbug.com/86469. | 232 // If this flakes, reopen bug http://crbug.com/86469. |
233 IN_PROC_BROWSER_TEST_F(UnloadTest, CrossSiteInfiniteBeforeUnloadSync) { | 233 IN_PROC_BROWSER_TEST_F(UnloadTest, DISABLED_CrossSiteInfiniteBeforeUnloadSync) { |
234 // Tests makes no sense in single-process mode since the renderer is hung. | 234 // Tests makes no sense in single-process mode since the renderer is hung. |
235 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) | 235 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) |
236 return; | 236 return; |
237 | 237 |
238 NavigateToDataURL(INFINITE_BEFORE_UNLOAD_HTML, "infinitebeforeunload"); | 238 NavigateToDataURL(INFINITE_BEFORE_UNLOAD_HTML, "infinitebeforeunload"); |
239 // Must navigate to a non-data URL to trigger cross-site codepath. | 239 // Must navigate to a non-data URL to trigger cross-site codepath. |
240 NavigateToNolistenersFileTwice(); | 240 NavigateToNolistenersFileTwice(); |
241 } | 241 } |
242 | 242 |
243 // Tests closing the browser on a page with no unload listeners registered. | 243 // Tests closing the browser on a page with no unload listeners registered. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, | 401 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, |
402 content::NotificationService::AllSources()); | 402 content::NotificationService::AllSources()); |
403 chrome::CloseTab(browser()); | 403 chrome::CloseTab(browser()); |
404 tab_close_observer.Wait(); | 404 tab_close_observer.Wait(); |
405 | 405 |
406 CheckTitle("only_one_unload"); | 406 CheckTitle("only_one_unload"); |
407 } | 407 } |
408 | 408 |
409 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs | 409 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs |
410 // and multiple windows. | 410 // and multiple windows. |
OLD | NEW |