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

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

Issue 220040: [Mac] Enable "Edit Search Engines" in Omnibox context menu. (Closed)
Patch Set: nop to make sure I'm logging in. Created 11 years, 2 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/autocomplete_text_field_editor_unittest.mm
diff --git a/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm b/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm
index 3df553d3816fbf4303a98b451cb40994f499b3b6..81c51501431e92fedfb01a2ea415b5bdbdd6c73c 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm
@@ -7,6 +7,7 @@
#include "base/scoped_nsobject.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
+#include "chrome/app/chrome_dll_resource.h" // IDC_*
#import "chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h"
#import "chrome/browser/cocoa/cocoa_test_helper.h"
#include "grit/generated_resources.h"
@@ -174,13 +175,18 @@ TEST_F(AutocompleteTextFieldEditorTest, CanPasteAndGoMenu) {
NSMenu* menu = [editor_.get() menuForEvent:nil];
NSArray* items = [menu itemArray];
- ASSERT_EQ([items count], 4U);
+ ASSERT_EQ([items count], 6U);
// TODO(shess): Check the titles, too?
NSUInteger i = 0; // Use an index to make future changes easier.
EXPECT_EQ([[items objectAtIndex:i++] action], @selector(cut:));
EXPECT_EQ([[items objectAtIndex:i++] action], @selector(copy:));
EXPECT_EQ([[items objectAtIndex:i++] action], @selector(paste:));
EXPECT_EQ([[items objectAtIndex:i++] action], @selector(pasteAndGo:));
+ EXPECT_TRUE([[items objectAtIndex:i++] isSeparatorItem]);
+
+ EXPECT_EQ([[items objectAtIndex:i] action], @selector(commandDispatch:));
+ EXPECT_EQ([[items objectAtIndex:i] tag], IDC_EDIT_SEARCH_ENGINES);
+ i++;
}
// Test that the menu is constructed correctly when !CanPasteAndGo().
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field_editor.mm ('k') | chrome/browser/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698