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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_browsertest.mm

Issue 1855423003: Interpret '?' and Ctrl-K or Ctrl-E as putting omnibox in keyword search mode for Default Search Pro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add includes for mac tests Created 4 years, 6 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
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 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" 5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
11 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h" 11 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h"
12 #include "chrome/browser/ui/location_bar/location_bar.h" 12 #include "chrome/browser/ui/location_bar/location_bar.h"
13 #include "chrome/test/base/in_process_browser_test.h" 13 #include "chrome/test/base/in_process_browser_test.h"
14 #include "components/omnibox/browser/omnibox_edit_model.h"
14 #include "ui/base/clipboard/clipboard_util_mac.h" 15 #include "ui/base/clipboard/clipboard_util_mac.h"
15 16
16 class OmniboxViewMacBrowserTest : public InProcessBrowserTest { 17 class OmniboxViewMacBrowserTest : public InProcessBrowserTest {
17 public: 18 public:
18 OmniboxViewMac* GetOmnibox() { 19 OmniboxViewMac* GetOmnibox() {
19 return static_cast<OmniboxViewMac*>( 20 return static_cast<OmniboxViewMac*>(
20 browser()->window()->GetLocationBar()->GetOmniboxView()); 21 browser()->window()->GetLocationBar()->GetOmniboxView());
21 } 22 }
22 }; 23 };
23 24
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 GetOmnibox()->CopyToPasteboard(pasteboard->get()); 87 GetOmnibox()->CopyToPasteboard(pasteboard->get());
87 88
88 // Check that the custom Pboard type is no longer present. 89 // Check that the custom Pboard type is no longer present.
89 EXPECT_FALSE([pasteboard->get() 90 EXPECT_FALSE([pasteboard->get()
90 stringForType:ui::ClipboardUtil::UTIForPasteboardType(pboard_type)]); 91 stringForType:ui::ClipboardUtil::UTIForPasteboardType(pboard_type)]);
91 92
92 // Check that the contents of the omnibox were copied to the clipboard. 93 // Check that the contents of the omnibox were copied to the clipboard.
93 pasteboard_string = [pasteboard->get() stringForType:NSPasteboardTypeString]; 94 pasteboard_string = [pasteboard->get() stringForType:NSPasteboardTypeString];
94 EXPECT_EQ(text, pasteboard_string.UTF8String); 95 EXPECT_EQ(text, pasteboard_string.UTF8String);
95 } 96 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698