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

Side by Side Diff: chrome/browser/ui/cocoa/accelerators_cocoa_browsertest.mm

Issue 1650713003: Preference for Presentation Mode/Fullscreen Toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/app/chrome_command_ids.h"
8 #import "chrome/browser/ui/cocoa/accelerators_cocoa.h" 9 #import "chrome/browser/ui/cocoa/accelerators_cocoa.h"
9 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
10 #include "testing/gtest_mac.h" 11 #include "testing/gtest_mac.h"
11 #include "ui/base/accelerators/platform_accelerator_cocoa.h" 12 #include "ui/base/accelerators/platform_accelerator_cocoa.h"
12 #import "ui/events/keycodes/keyboard_code_conversion_mac.h" 13 #import "ui/events/keycodes/keyboard_code_conversion_mac.h"
13 14
14 typedef InProcessBrowserTest AcceleratorsCocoaBrowserTest; 15 typedef InProcessBrowserTest AcceleratorsCocoaBrowserTest;
15 16
16 namespace { 17 namespace {
17 18
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 it->second.platform_accelerator()); 121 it->second.platform_accelerator());
121 122
122 // Check that there exists a corresponding NSMenuItem. 123 // Check that there exists a corresponding NSMenuItem.
123 NSMenuItem* item = 124 NSMenuItem* item =
124 MenuContainsAccelerator([NSApp mainMenu], 125 MenuContainsAccelerator([NSApp mainMenu],
125 platform_accelerator->characters(), 126 platform_accelerator->characters(),
126 platform_accelerator->modifier_mask()); 127 platform_accelerator->modifier_mask());
127 EXPECT_TRUE(item); 128 EXPECT_TRUE(item);
128 129
129 // If the menu uses a commandDispatch:, the tag must match the command id! 130 // If the menu uses a commandDispatch:, the tag must match the command id!
130 if (item.action == @selector(commandDispatch:)) 131 // Added an exception for IDC_TOGGLE_FULLSCREEN_TOOLBAR, which conflicts
132 // with IDC_PRESENTATION_MODE.
133 if (item.action == @selector(commandDispatch:)
134 && item.tag != IDC_TOGGLE_FULLSCREEN_TOOLBAR)
131 EXPECT_EQ(item.tag, it->first); 135 EXPECT_EQ(item.tag, it->first);
132 } 136 }
133 } 137 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.cc ('k') | chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698