OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/gfx/native_widget_types.h" | 5 #include "app/gfx/native_widget_types.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } | 236 } |
237 #endif | 237 #endif |
238 | 238 |
239 class ShowModalDialogTest : public UITest { | 239 class ShowModalDialogTest : public UITest { |
240 public: | 240 public: |
241 ShowModalDialogTest() { | 241 ShowModalDialogTest() { |
242 launch_arguments_.AppendSwitch(switches::kDisablePopupBlocking); | 242 launch_arguments_.AppendSwitch(switches::kDisablePopupBlocking); |
243 } | 243 } |
244 }; | 244 }; |
245 | 245 |
246 TEST_F(ShowModalDialogTest, BasicTest) { | 246 // Flakiness returned. Re-opened crbug.com/17806 |
| 247 TEST_F(ShowModalDialogTest, FLAKY_BasicTest) { |
247 FilePath test_file(test_data_directory_); | 248 FilePath test_file(test_data_directory_); |
248 test_file = test_file.AppendASCII("showmodaldialog.html"); | 249 test_file = test_file.AppendASCII("showmodaldialog.html"); |
249 | 250 |
250 // This navigation should show a modal dialog that will be immediately | 251 // This navigation should show a modal dialog that will be immediately |
251 // closed, but the fact that it was shown should be recorded. | 252 // closed, but the fact that it was shown should be recorded. |
252 NavigateToURL(net::FilePathToFileURL(test_file)); | 253 NavigateToURL(net::FilePathToFileURL(test_file)); |
253 | 254 |
254 // At this point the modal dialog should not be showing. | 255 // At this point the modal dialog should not be showing. |
255 int window_count = 0; | 256 int window_count = 0; |
256 EXPECT_TRUE(automation()->GetBrowserWindowCount(&window_count)); | 257 EXPECT_TRUE(automation()->GetBrowserWindowCount(&window_count)); |
(...skipping 24 matching lines...) Expand all Loading... |
281 | 282 |
282 GURL url = net::FilePathToFileURL(test_file); | 283 GURL url = net::FilePathToFileURL(test_file); |
283 ASSERT_TRUE(tab->NavigateToURL(url)); | 284 ASSERT_TRUE(tab->NavigateToURL(url)); |
284 | 285 |
285 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, | 286 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, |
286 "status", kTestIntervalMs, kTestWaitTimeoutMs); | 287 "status", kTestIntervalMs, kTestWaitTimeoutMs); |
287 ASSERT_STREQ("Disallowed", value.c_str()); | 288 ASSERT_STREQ("Disallowed", value.c_str()); |
288 } | 289 } |
289 | 290 |
290 } // namespace | 291 } // namespace |
OLD | NEW |