| 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"]);
|
| +}
|
|
|