| 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 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/gfx/rect.h" | 9 #include "base/gfx/rect.h" |
| 10 #include "base/keyboard_codes.h" | 10 #include "base/keyboard_codes.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 while (offset < title.size() && iswdigit(title[offset])) { | 127 while (offset < title.size() && iswdigit(title[offset])) { |
| 128 number += title[offset]; | 128 number += title[offset]; |
| 129 offset++; | 129 offset++; |
| 130 } | 130 } |
| 131 | 131 |
| 132 return StringToInt(WideToUTF16(number), output); | 132 return StringToInt(WideToUTF16(number), output); |
| 133 } | 133 } |
| 134 | 134 |
| 135 // Tests that in the window.open() equivalent of a fork bomb, we stop building | 135 // Tests that in the window.open() equivalent of a fork bomb, we stop building |
| 136 // windows. | 136 // windows. |
| 137 TEST_F(BlockedPopupContainerInteractiveTest, DontSpawnEndlessPopups) { | 137 // Flaky, http://crbug.com/26692. |
| 138 TEST_F(BlockedPopupContainerInteractiveTest, FLAKY_DontSpawnEndlessPopups) { |
| 138 NavigateMainTabTo("infinite_popups.html"); | 139 NavigateMainTabTo("infinite_popups.html"); |
| 139 SimulateClickInCenterOf(window_); | 140 SimulateClickInCenterOf(window_); |
| 140 | 141 |
| 141 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, 1000)); | 142 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, 1000)); |
| 142 | 143 |
| 143 scoped_refptr<BrowserProxy> popup_browser(automation()->GetBrowserWindow(1)); | 144 scoped_refptr<BrowserProxy> popup_browser(automation()->GetBrowserWindow(1)); |
| 144 ASSERT_TRUE(popup_browser.get()); | 145 ASSERT_TRUE(popup_browser.get()); |
| 145 scoped_refptr<TabProxy> popup_tab(popup_browser->GetTab(0)); | 146 scoped_refptr<TabProxy> popup_tab(popup_browser->GetTab(0)); |
| 146 ASSERT_TRUE(popup_tab.get()); | 147 ASSERT_TRUE(popup_tab.get()); |
| 147 | 148 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 base::VKEY_TAB, views::Event::EF_CONTROL_DOWN)); | 280 base::VKEY_TAB, views::Event::EF_CONTROL_DOWN)); |
| 280 ASSERT_TRUE(browser->WaitForTabToBecomeActive(0, action_max_timeout_ms())); | 281 ASSERT_TRUE(browser->WaitForTabToBecomeActive(0, action_max_timeout_ms())); |
| 281 | 282 |
| 282 #if !defined(OS_MACOSX) // see BrowserWindowCocoa::GetCommandId | 283 #if !defined(OS_MACOSX) // see BrowserWindowCocoa::GetCommandId |
| 283 ASSERT_TRUE(browser->ActivateTab(1)); | 284 ASSERT_TRUE(browser->ActivateTab(1)); |
| 284 ASSERT_TRUE(window->SimulateOSKeyPress( | 285 ASSERT_TRUE(window->SimulateOSKeyPress( |
| 285 base::VKEY_W, views::Event::EF_CONTROL_DOWN)); | 286 base::VKEY_W, views::Event::EF_CONTROL_DOWN)); |
| 286 ASSERT_TRUE(browser->WaitForTabCountToBecome(1, action_max_timeout_ms())); | 287 ASSERT_TRUE(browser->WaitForTabCountToBecome(1, action_max_timeout_ms())); |
| 287 #endif | 288 #endif |
| 288 } | 289 } |
| OLD | NEW |