Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Unified Diff: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc

Issue 8702002: Strip invalid characters (line breaks, tabs), javascript:schemes from the copied text while pasti... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
===================================================================
--- chrome/browser/ui/omnibox/omnibox_view_browsertest.cc (revision 110898)
+++ chrome/browser/ui/omnibox/omnibox_view_browsertest.cc (working copy)
@@ -757,20 +757,10 @@
ASSERT_EQ(text, omnibox_view->model()->keyword());
ASSERT_EQ(text, omnibox_view->GetText());
- // Keyword shouldn't be accepted by pasting.
- // Simulate pasting a whitespace to the end of content.
- omnibox_view->OnBeforePossibleChange();
- omnibox_view->model()->on_paste();
- omnibox_view->SetWindowTextAndCaretPos(
- text + char16(' '), text.length() + 1);
- omnibox_view->OnAfterPossibleChange();
- // Should be still in keyword hint mode.
- ASSERT_TRUE(omnibox_view->model()->is_keyword_hint());
- ASSERT_EQ(text, omnibox_view->model()->keyword());
- ASSERT_EQ(text + char16(' '), omnibox_view->GetText());
-
// Keyword shouldn't be accepted by pressing space with a trailing
// whitespace.
+ omnibox_view->SetWindowTextAndCaretPos(
+ text + char16(' '), text.length() + 1);
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_SPACE, 0));
ASSERT_TRUE(omnibox_view->model()->is_keyword_hint());
ASSERT_EQ(text, omnibox_view->model()->keyword());
« no previous file with comments | « chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698