| Index: chrome/browser/ui/cocoa/location_bar/separator_decoration_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/separator_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/separator_decoration_unittest.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d6bc0e11143c24c6e0bdb6ad10c5e9a94c8b4e44
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/cocoa/location_bar/separator_decoration_unittest.mm
|
| @@ -0,0 +1,28 @@
|
| +// Copyright (c) 2013 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 "chrome/browser/ui/cocoa/location_bar/separator_decoration.h"
|
| +
|
| +#include "base/memory/scoped_nsobject.h"
|
| +#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +typedef CocoaTest SeparatorDecorationTest;
|
| +
|
| +TEST_F(SeparatorDecorationTest, GetWidthForSpace) {
|
| + SeparatorDecoration decoration;
|
| + CGFloat width = decoration.GetWidthForSpace(1000, 0);
|
| + EXPECT_LT(0, width);
|
| +}
|
| +
|
| +TEST_F(SeparatorDecorationTest, DrawInFrame) {
|
| + NSRect frame = NSMakeRect(0, 0, 100, 100);
|
| + scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:frame]);
|
| + [[test_window() contentView] addSubview:view];
|
| +
|
| + [view lockFocus];
|
| + SeparatorDecoration decoration;
|
| + decoration.DrawInFrame(frame, view);
|
| + [view unlockFocus];
|
| +}
|
|
|