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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_view_unittest.cc

Issue 12298037: Revert 183123 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1417/src/
Patch Set: Created 7 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/ui/omnibox/omnibox_view.h" 5 #include "chrome/browser/ui/omnibox/omnibox_view.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 ui::Clipboard::BUFFER_STANDARD); 56 ui::Clipboard::BUFFER_STANDARD);
57 clipboard_writer.WriteText(kPlainText); 57 clipboard_writer.WriteText(kPlainText);
58 } 58 }
59 EXPECT_EQ(kPlainText, OmniboxView::GetClipboardText()); 59 EXPECT_EQ(kPlainText, OmniboxView::GetClipboardText());
60 60
61 // TODO(shess): Aura hits a DCHECK() at CommitToClipboard() if 61 // TODO(shess): Aura hits a DCHECK() at CommitToClipboard() if
62 // ObjectMap is empty. http://crbug.com/133848 62 // ObjectMap is empty. http://crbug.com/133848
63 #if !defined(USE_AURA) 63 #if !defined(USE_AURA)
64 // Does an empty clipboard get empty text? 64 // Does an empty clipboard get empty text?
65 clipboard->WriteObjects(ui::Clipboard::BUFFER_STANDARD, 65 clipboard->WriteObjects(ui::Clipboard::BUFFER_STANDARD,
66 ui::Clipboard::ObjectMap(), 66 ui::Clipboard::ObjectMap());
67 ui::Clipboard::SourceTag());
68 EXPECT_EQ(string16(), OmniboxView::GetClipboardText()); 67 EXPECT_EQ(string16(), OmniboxView::GetClipboardText());
69 #endif 68 #endif
70 69
71 // Bookmark clipboard apparently not supported on Linux. 70 // Bookmark clipboard apparently not supported on Linux.
72 // See TODO on ClipboardText.BookmarkTest. 71 // See TODO on ClipboardText.BookmarkTest.
73 #if !defined(OS_POSIX) || defined(OS_MACOSX) 72 #if !defined(OS_POSIX) || defined(OS_MACOSX)
74 const string16 kTitle(ASCIIToUTF16("The Example Company")); 73 const string16 kTitle(ASCIIToUTF16("The Example Company"));
75 // Can we pull a bookmark off the clipboard? 74 // Can we pull a bookmark off the clipboard?
76 { 75 {
77 ui::ScopedClipboardWriter clipboard_writer(clipboard, 76 ui::ScopedClipboardWriter clipboard_writer(clipboard,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 ui::Clipboard::BUFFER_STANDARD); 121 ui::Clipboard::BUFFER_STANDARD);
123 clipboard_writer.WriteText(kWrappedAddress); 122 clipboard_writer.WriteText(kWrappedAddress);
124 } 123 }
125 124
126 const string16 kFixedAddress(ASCIIToUTF16( 125 const string16 kFixedAddress(ASCIIToUTF16(
127 "1600 Amphitheatre Parkway Mountain View, CA")); 126 "1600 Amphitheatre Parkway Mountain View, CA"));
128 EXPECT_EQ(kFixedAddress, OmniboxView::GetClipboardText()); 127 EXPECT_EQ(kFixedAddress, OmniboxView::GetClipboardText());
129 } 128 }
130 129
131 } // namespace 130 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698