OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/keyboard_codes.h" | 8 #include "base/keyboard_codes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // Delete all text in omnibox. | 351 // Delete all text in omnibox. |
352 ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_BACK, false, false, false)); | 352 ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_BACK, false, false, false)); |
353 EXPECT_TRUE(edit_view->GetText().empty()); | 353 EXPECT_TRUE(edit_view->GetText().empty()); |
354 | 354 |
355 // Escape shall revert the text in omnibox. | 355 // Escape shall revert the text in omnibox. |
356 ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_ESCAPE, false, false, false)); | 356 ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_ESCAPE, false, false, false)); |
357 EXPECT_EQ(old_text, edit_view->GetText()); | 357 EXPECT_EQ(old_text, edit_view->GetText()); |
358 EXPECT_TRUE(edit_view->IsSelectAll()); | 358 EXPECT_TRUE(edit_view->IsSelectAll()); |
359 } | 359 } |
360 | 360 |
361 IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, DesiredTLD) { | 361 IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, DISABLED_DesiredTLD) { |
362 ASSERT_NO_FATAL_FAILURE(SetupHostResolver()); | 362 ASSERT_NO_FATAL_FAILURE(SetupHostResolver()); |
363 ASSERT_NO_FATAL_FAILURE(SetupSearchEngine()); | 363 ASSERT_NO_FATAL_FAILURE(SetupSearchEngine()); |
364 browser()->FocusLocationBar(); | 364 browser()->FocusLocationBar(); |
365 | 365 |
366 AutocompleteEditView* edit_view = NULL; | 366 AutocompleteEditView* edit_view = NULL; |
367 ASSERT_NO_FATAL_FAILURE(GetAutocompleteEditView(&edit_view)); | 367 ASSERT_NO_FATAL_FAILURE(GetAutocompleteEditView(&edit_view)); |
368 AutocompletePopupModel* popup_model = edit_view->model()->popup_model(); | 368 AutocompletePopupModel* popup_model = edit_view->model()->popup_model(); |
369 ASSERT_TRUE(popup_model); | 369 ASSERT_TRUE(popup_model); |
370 | 370 |
371 // Test ctrl-Enter. | 371 // Test ctrl-Enter. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 break; | 492 break; |
493 } | 493 } |
494 | 494 |
495 EXPECT_NE(old_text, edit_view->GetText()); | 495 EXPECT_NE(old_text, edit_view->GetText()); |
496 | 496 |
497 // Escape shall revert back to the default match item. | 497 // Escape shall revert back to the default match item. |
498 ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_ESCAPE, false, false, false)); | 498 ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_ESCAPE, false, false, false)); |
499 EXPECT_EQ(old_text, edit_view->GetText()); | 499 EXPECT_EQ(old_text, edit_view->GetText()); |
500 EXPECT_EQ(old_selected_line, popup_model->selected_line()); | 500 EXPECT_EQ(old_selected_line, popup_model->selected_line()); |
501 } | 501 } |
OLD | NEW |