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

Unified Diff: content/browser/cocoa/system_hotkey_map_unittest.mm

Issue 374643002: Mac: Enable delegated renderer by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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: content/browser/cocoa/system_hotkey_map_unittest.mm
diff --git a/content/browser/cocoa/system_hotkey_map_unittest.mm b/content/browser/cocoa/system_hotkey_map_unittest.mm
deleted file mode 100644
index b37549fdaddc8bc6b6c754c48fad8a7edeb12990..0000000000000000000000000000000000000000
--- a/content/browser/cocoa/system_hotkey_map_unittest.mm
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2014 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.
-
-#include <gtest/gtest.h>
-
-#import <Carbon/Carbon.h>
-#import <Cocoa/Cocoa.h>
-
-#include "base/files/file_path.h"
-#include "base/path_service.h"
-#import "content/browser/cocoa/system_hotkey_map.h"
-#include "content/public/common/content_paths.h"
-
-namespace content {
-
-class SystemHotkeyMapTest : public ::testing::Test {
- public:
- SystemHotkeyMapTest() {}
-};
-
-TEST_F(SystemHotkeyMapTest, Parse) {
- base::FilePath test_data_dir;
- ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &test_data_dir));
-
- base::FilePath test_path =
- test_data_dir.AppendASCII("mac/mac_system_hotkeys.plist");
- std::string test_path_string = test_path.AsUTF8Unsafe();
- NSString* file_path =
- [NSString stringWithUTF8String:test_path_string.c_str()];
- NSData* data = [NSData dataWithContentsOfFile:file_path];
- ASSERT_TRUE(data);
-
- NSDictionary* dictionary = SystemHotkeyMap::DictionaryFromData(data);
- ASSERT_TRUE(dictionary);
-
- SystemHotkeyMap map;
- bool result = map.ParseDictionary(dictionary);
- EXPECT_TRUE(result);
-
- // Command + ` is a common key binding. It should exist.
- int key_code = kVK_ANSI_Grave;
- int modifiers = NSCommandKeyMask;
- EXPECT_TRUE(map.IsHotkeyReserved(key_code, modifiers));
-
- // Command + Shift + ` is a common key binding. It should exist.
- modifiers = NSCommandKeyMask | NSShiftKeyMask;
- EXPECT_TRUE(map.IsHotkeyReserved(key_code, modifiers));
-
- // Command + Shift + Ctr + ` is not a common key binding.
- modifiers = NSCommandKeyMask | NSShiftKeyMask | NSControlKeyMask;
- EXPECT_FALSE(map.IsHotkeyReserved(key_code, modifiers));
-
- // Command + L is not a common key binding.
- key_code = kVK_ANSI_L;
- modifiers = NSCommandKeyMask;
- EXPECT_FALSE(map.IsHotkeyReserved(key_code, modifiers));
-}
-
-TEST_F(SystemHotkeyMapTest, ParseNil) {
- NSDictionary* dictionary = nil;
-
- SystemHotkeyMap map;
- bool result = map.ParseDictionary(dictionary);
- EXPECT_FALSE(result);
-}
-
-} // namespace content
« no previous file with comments | « content/browser/cocoa/system_hotkey_map.mm ('k') | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698