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

Unified Diff: chrome/browser/cocoa/location_bar_view_mac_unittest.mm

Issue 2078021: First pass at experimental omnibox API. There are plenty of rough edges and (Closed)
Patch Set: no prefer_keyword Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/location_bar_view_mac_unittest.mm
diff --git a/chrome/browser/cocoa/location_bar_view_mac_unittest.mm b/chrome/browser/cocoa/location_bar_view_mac_unittest.mm
index ecb2a7b0d52c90559889d010fca728acbd211d01..c3b1f9a662ce81a3d9f78799adecf0f37d89aa47 100644
--- a/chrome/browser/cocoa/location_bar_view_mac_unittest.mm
+++ b/chrome/browser/cocoa/location_bar_view_mac_unittest.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -89,19 +89,21 @@ TEST_F(LocationBarViewMacTest, OnChangedImpl) {
[NSString stringWithFormat:@"Search Go%C:", 0x2026];
// With no special hints requested, none set.
- LocationBarViewMac::OnChangedImpl(field_, std::wstring(), std::wstring(), false, image);
+ LocationBarViewMac::OnChangedImpl(field_, std::wstring(), std::wstring(),
+ false, false, image);
EXPECT_FALSE([cell keywordString]);
EXPECT_FALSE([cell hintString]);
// Request a keyword hint.
- LocationBarViewMac::OnChangedImpl(field_, kKeyword, kKeyword, true, image);
+ LocationBarViewMac::OnChangedImpl(field_, kKeyword, kKeyword,
+ true, false, image);
EXPECT_FALSE([cell keywordString]);
EXPECT_TRUE([[[cell hintString] string] hasPrefix:kKeywordPrefix]);
EXPECT_TRUE([[[cell hintString] string] hasSuffix:kKeywordSuffix]);
// Request keyword-search mode.
LocationBarViewMac::OnChangedImpl(
- field_, kKeyword, kKeyword, false, image);
+ field_, kKeyword, kKeyword, false, false, image);
EXPECT_TRUE([[[cell keywordString] string] hasSuffix:kKeywordString]);
EXPECT_FALSE([cell hintString]);
@@ -112,13 +114,14 @@ TEST_F(LocationBarViewMacTest, OnChangedImpl) {
NSRect frame([field_ frame]);
frame.size.width = 10.0;
[field_ setFrame:frame];
- LocationBarViewMac::OnChangedImpl(field_, kKeyword, kKeyword, false, image);
+ LocationBarViewMac::OnChangedImpl(field_, kKeyword, kKeyword, false,
+ false, image);
EXPECT_TRUE([[[cell keywordString] string] isEqualToString:kPartialString]);
EXPECT_FALSE([cell hintString]);
// Transition back to baseline.
LocationBarViewMac::OnChangedImpl(
- field_, std::wstring(), std::wstring(), false, image);
+ field_, std::wstring(), std::wstring(), false, false, image);
EXPECT_FALSE([cell keywordString]);
EXPECT_FALSE([cell hintString]);
}
« no previous file with comments | « chrome/browser/cocoa/location_bar_view_mac.mm ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698