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

Unified Diff: ui/base/cocoa/touch_bar_util_unittest.mm

Issue 2921083003: [Mac] Touch Bar Support for Dialogs (Closed)
Patch Set: Added test and renamed methods Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/cocoa/touch_bar_util.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/touch_bar_util_unittest.mm
diff --git a/ui/base/cocoa/touch_bar_util_unittest.mm b/ui/base/cocoa/touch_bar_util_unittest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..d0235c3056c02a3a4603947a19ef57f291a25e45
--- /dev/null
+++ b/ui/base/cocoa/touch_bar_util_unittest.mm
@@ -0,0 +1,33 @@
+// Copyright 2017 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.
+
+#import "ui/base/cocoa/touch_bar_util.h"
+
+#include "base/mac/foundation_util.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/platform_test.h"
+#import "ui/gfx/test/ui_cocoa_test_helper.h"
+
+namespace {
+
+const char kTestChromeBundleId[] = "test.bundleid";
+
+NSString* const kTestTouchBarId = @"test-touch-bar";
+
+NSString* const kTestTouchBarItemId = @"TEST-ITEM";
+
+} // namespace
+
+class TouchBarUtilTest : public ui::CocoaTest {
+ public:
+ TouchBarUtilTest() {}
+};
+
+TEST_F(TouchBarUtilTest, TouchBarIdentifiers) {
+ base::mac::SetBaseBundleID(kTestChromeBundleId);
+ EXPECT_TRUE([ui::GetTouchBarId(kTestTouchBarId)
+ isEqualToString:@"test.bundleid.test-touch-bar"]);
+ EXPECT_TRUE([ui::GetTouchBarItemId(kTestTouchBarId, kTestTouchBarItemId)
+ isEqualToString:@"test.bundleid.test-touch-bar-TEST-ITEM"]);
+}
« no previous file with comments | « ui/base/cocoa/touch_bar_util.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698