mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-03 19:44:22 +00:00
Tests: Require rounded bezel style for programmatically created pop-up buttons
DropInCompatibilityTest required a pop-up button to have the same bezel style as a plain button.
AppKit has no such rule; the shared value on main came from inheritance.
In AppKit a pop-up button uses the rounded bezel style, which CPPopUpButton has set since e0c9bd10a. The test now requires the rounded bezel style, and the CPPopUpButton bezelStyle entry
in DropInBaseline.json changes from 12 to 1 accordingly.
This commit is contained in:
1 parent
c6a463399a
commit
4e474ba54f
2 files changed
+12
-6
No files matched your search
@@ -92,13 +92,19 @@ function DropInWindowButton(aStyleMask, aName)
|
||||
[self assertFalse:[DropInWindowButton(CPTitledWindowMask | CPClosableWindowMask, @"_zoomButton") isEnabled]];
|
||||
}
|
||||
|
||||
- (void)testPopUpButtonKeepsTheDefaultButtonBezelStyle
|
||||
/*
|
||||
2026-11-30: this test required a pop-up button to have the same bezel style
|
||||
as a plain button. Cocoa has no such rule; the shared value on main came from
|
||||
inheritance. In Cocoa a pop-up button has the rounded bezel style, and
|
||||
Interface Builder writes bezelStyle="rounded" for a new one. A cib sets the
|
||||
bezel style from the archive, so this covers pop-up buttons made in code.
|
||||
*/
|
||||
- (void)testAPopUpButtonMadeInCodeHasTheRoundedBezelStyle
|
||||
{
|
||||
var frame = CGRectMake(0.0, 0.0, 100.0, 24.0),
|
||||
popUpButton = [[CPPopUpButton alloc] initWithFrame:frame pullsDown:NO],
|
||||
button = [[CPButton alloc] initWithFrame:frame];
|
||||
var frame = CGRectMake(0.0, 0.0, 100.0, 24.0);
|
||||
|
||||
[self assert:[button bezelStyle] equals:[popUpButton bezelStyle]];
|
||||
[self assert:CPRoundedBezelStyle equals:[[[CPPopUpButton alloc] initWithFrame:frame pullsDown:NO] bezelStyle]];
|
||||
[self assert:CPRoundedBezelStyle equals:[[[CPPopUpButton alloc] initWithFrame:frame pullsDown:YES] bezelStyle]];
|
||||
}
|
||||
|
||||
- (void)testTableViewGridColorHasAClassDefault
|
||||
|
||||
@@ -7734,7 +7734,7 @@
|
||||
"alignment": "0",
|
||||
"autoresizingMask": "0",
|
||||
"backgroundColor": "nil",
|
||||
"bezelStyle": "12",
|
||||
"bezelStyle": "1",
|
||||
"controlSize": "{\"_stateNameCount\":1,\"_stateNameString\":\"controlSizeRegular\",\"_stateNames\":{\"controlSizeRegular\":true}}",
|
||||
"isBordered": "true",
|
||||
"isEnabled": "true",
|
||||
|
||||
Reference in new issue
Block a user