| OLD | NEW |
| 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 <stdio.h> | 5 #include <stdio.h> |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 EXPECT_EQ(L"Hello ", edit_view->GetText()); | 354 EXPECT_EQ(L"Hello ", edit_view->GetText()); |
| 355 | 355 |
| 356 #if !defined(OS_CHROMEOS) | 356 #if !defined(OS_CHROMEOS) |
| 357 // Try alt-f4 to close the browser. | 357 // Try alt-f4 to close the browser. |
| 358 ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait( | 358 ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait( |
| 359 browser(), ui::VKEY_F4, false, false, true, false, | 359 browser(), ui::VKEY_F4, false, false, true, false, |
| 360 NotificationType::BROWSER_CLOSED, Source<Browser>(browser()))); | 360 NotificationType::BROWSER_CLOSED, Source<Browser>(browser()))); |
| 361 #endif | 361 #endif |
| 362 } | 362 } |
| 363 | 363 |
| 364 IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, PopupAccelerators) { | 364 // Flake on Win only. http://crbug.com/69941 |
| 365 #if defined(OS_WIN) |
| 366 #define MAYBE_PopupAccelerators FLAKY_PopupAccelerators |
| 367 #else |
| 368 #define MAYBE_PopupAccelerators PopupAccelerators |
| 369 #endif |
| 370 |
| 371 IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, MAYBE_PopupAccelerators) { |
| 365 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 372 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
| 366 | 373 |
| 367 // Create a popup. | 374 // Create a popup. |
| 368 Browser* popup = CreateBrowserForPopup(browser()->profile()); | 375 Browser* popup = CreateBrowserForPopup(browser()->profile()); |
| 369 AutocompleteEditView* edit_view = NULL; | 376 AutocompleteEditView* edit_view = NULL; |
| 370 ASSERT_NO_FATAL_FAILURE(GetAutocompleteEditViewForBrowser(popup, &edit_view)); | 377 ASSERT_NO_FATAL_FAILURE(GetAutocompleteEditViewForBrowser(popup, &edit_view)); |
| 371 popup->FocusLocationBar(); | 378 popup->FocusLocationBar(); |
| 372 EXPECT_TRUE(edit_view->IsSelectAll()); | 379 EXPECT_TRUE(edit_view->IsSelectAll()); |
| 373 | 380 |
| 374 // Try ctrl-w to close the popup. | 381 // Try ctrl-w to close the popup. |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 | 850 |
| 844 // Paste text. | 851 // Paste text. |
| 845 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, true, false, false)); | 852 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, true, false, false)); |
| 846 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); | 853 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); |
| 847 ASSERT_TRUE(popup_model->IsOpen()); | 854 ASSERT_TRUE(popup_model->IsOpen()); |
| 848 | 855 |
| 849 // Inline autocomplete shouldn't be triggered. | 856 // Inline autocomplete shouldn't be triggered. |
| 850 ASSERT_EQ(L"abc", edit_view->GetText()); | 857 ASSERT_EQ(L"abc", edit_view->GetText()); |
| 851 } | 858 } |
| 852 #endif | 859 #endif |
| OLD | NEW |