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 #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 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 } | 1257 } |
1258 | 1258 |
1259 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, AcceptKeywordBySpace) { | 1259 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, AcceptKeywordBySpace) { |
1260 AcceptKeywordBySpaceTest(); | 1260 AcceptKeywordBySpaceTest(); |
1261 } | 1261 } |
1262 | 1262 |
1263 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, NonSubstitutingKeywordTest) { | 1263 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, NonSubstitutingKeywordTest) { |
1264 NonSubstitutingKeywordTest(); | 1264 NonSubstitutingKeywordTest(); |
1265 } | 1265 } |
1266 | 1266 |
1267 #if defined(OS_POSIX) | |
1268 // Flaky on Mac 10.6, Linux http://crbug.com/84420 | |
1269 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, DISABLED_DeleteItem) { | |
1270 #else | |
1271 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, DeleteItem) { | 1267 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, DeleteItem) { |
1272 #endif | |
1273 DeleteItemTest(); | 1268 DeleteItemTest(); |
1274 } | 1269 } |
1275 | 1270 |
1276 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, TabAcceptKeyword) { | 1271 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, TabAcceptKeyword) { |
1277 TabAcceptKeyword(); | 1272 TabAcceptKeyword(); |
1278 } | 1273 } |
1279 | 1274 |
1280 #if !defined(OS_MACOSX) | 1275 #if !defined(OS_MACOSX) |
1281 // Mac intentionally does not support this behavior. | 1276 // Mac intentionally does not support this behavior. |
1282 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, TabTraverseResultsTest) { | 1277 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, TabTraverseResultsTest) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 | 1393 |
1399 // Move the cursor to the end. | 1394 // Move the cursor to the end. |
1400 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_END, 0)); | 1395 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_END, 0)); |
1401 | 1396 |
1402 // Backspace should delete one character. | 1397 // Backspace should delete one character. |
1403 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, 0)); | 1398 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, 0)); |
1404 EXPECT_EQ(UTF8ToUTF16("\357\276\200"), omnibox_view->GetText()); | 1399 EXPECT_EQ(UTF8ToUTF16("\357\276\200"), omnibox_view->GetText()); |
1405 } | 1400 } |
1406 | 1401 |
1407 // http://crbug.com/12316 | 1402 // http://crbug.com/12316 |
1408 // Flaky, http://crbug.com/80934. | 1403 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, PasteReplacingAll) { |
1409 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, DISABLED_PasteReplacingAll) { | |
1410 OmniboxView* omnibox_view = NULL; | 1404 OmniboxView* omnibox_view = NULL; |
1411 ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); | 1405 ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); |
1412 AutocompletePopupModel* popup_model = omnibox_view->model()->popup_model(); | 1406 AutocompletePopupModel* popup_model = omnibox_view->model()->popup_model(); |
1413 ASSERT_TRUE(popup_model); | 1407 ASSERT_TRUE(popup_model); |
1414 | 1408 |
1415 SetClipboardText(kSearchText); | 1409 SetClipboardText(kSearchText); |
1416 | 1410 |
1417 // Paste text. | 1411 // Paste text. |
1418 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, ui::EF_CONTROL_DOWN)); | 1412 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, ui::EF_CONTROL_DOWN)); |
1419 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); | 1413 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); |
1420 ASSERT_TRUE(popup_model->IsOpen()); | 1414 ASSERT_TRUE(popup_model->IsOpen()); |
1421 | 1415 |
1422 // Inline autocomplete shouldn't be triggered. | 1416 // Inline autocomplete shouldn't be triggered. |
1423 ASSERT_EQ(ASCIIToUTF16("abc"), omnibox_view->GetText()); | 1417 ASSERT_EQ(ASCIIToUTF16("abc"), omnibox_view->GetText()); |
1424 } | 1418 } |
1425 #endif | 1419 #endif |
OLD | NEW |