@ -814,7 +814,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
var window = PreparedWindow ( popup ) ;
var window = PreparedWindow ( popup ) ;
window . Show ( ) ;
window . Show ( ) ;
popup . Open ( ) ;
popup . Open ( ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender , TestContext . Current . CancellationToken ) ;
var raised = false ;
var raised = false ;
if ( popup . Host is PopupRoot popupRoot )
if ( popup . Host is PopupRoot popupRoot )
@ -837,7 +837,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
} ;
} ;
}
}
window . Position = new PixelPoint ( 1 0 , 1 0 ) ;
window . Position = new PixelPoint ( 1 0 , 1 0 ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender , TestContext . Current . CancellationToken ) ;
Assert . False ( raised ) ;
Assert . False ( raised ) ;
}
}
}
}
@ -867,7 +867,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
var window = PreparedWindow ( placementTarget ) ;
var window = PreparedWindow ( placementTarget ) ;
window . Show ( ) ;
window . Show ( ) ;
popup . Open ( ) ;
popup . Open ( ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender , TestContext . Current . CancellationToken ) ;
// The target's initial placement is (395,295) which is a 10x10 panel centered in a 800x600 window
// The target's initial placement is (395,295) which is a 10x10 panel centered in a 800x600 window
Assert . Equal ( placementTarget . Bounds , new Rect ( 3 9 5D , 2 9 5D , 1 0 , 1 0 ) ) ;
Assert . Equal ( placementTarget . Bounds , new Rect ( 3 9 5D , 2 9 5D , 1 0 , 1 0 ) ) ;
@ -898,7 +898,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
} ;
} ;
}
}
window . PlatformImpl ? . Resize ( new Size ( 7 0 0D , 5 0 0D ) , WindowResizeReason . Unspecified ) ;
window . PlatformImpl ? . Resize ( new Size ( 7 0 0D , 5 0 0D ) , WindowResizeReason . Unspecified ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender , TestContext . Current . CancellationToken ) ;
Assert . True ( raised ) ;
Assert . True ( raised ) ;
}
}
}
}
@ -928,7 +928,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
var window = PreparedWindow ( placementTarget ) ;
var window = PreparedWindow ( placementTarget ) ;
window . Show ( ) ;
window . Show ( ) ;
popup . Open ( ) ;
popup . Open ( ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender , TestContext . Current . CancellationToken ) ;
// The target's initial placement is (395,295) which is a 10x10 panel centered in a 800x600 window
// The target's initial placement is (395,295) which is a 10x10 panel centered in a 800x600 window
Assert . Equal ( placementTarget . Bounds , new Rect ( 3 9 5D , 2 9 5D , 1 0 , 1 0 ) ) ;
Assert . Equal ( placementTarget . Bounds , new Rect ( 3 9 5D , 2 9 5D , 1 0 , 1 0 ) ) ;
@ -954,7 +954,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
} ;
} ;
}
}
window . PlatformImpl ? . Resize ( new Size ( 7 0 0D , 5 0 0D ) , WindowResizeReason . Unspecified ) ;
window . PlatformImpl ? . Resize ( new Size ( 7 0 0D , 5 0 0D ) , WindowResizeReason . Unspecified ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender , TestContext . Current . CancellationToken ) ;
Assert . False ( raised ) ;
Assert . False ( raised ) ;
}
}
}
}
@ -983,7 +983,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
var window = PreparedWindow ( placementTarget ) ;
var window = PreparedWindow ( placementTarget ) ;
window . Show ( ) ;
window . Show ( ) ;
popup . Open ( ) ;
popup . Open ( ) ;
Dispatcher . UIThread . RunJobs ( ) ;
Dispatcher . UIThread . RunJobs ( null , TestContext . Current . CancellationToken ) ;
// The target's initial placement is (395,295) which is a 10x10 panel centered in a 800x600 window
// The target's initial placement is (395,295) which is a 10x10 panel centered in a 800x600 window
Assert . Equal ( placementTarget . Bounds , new Rect ( 3 9 5D , 2 9 5D , 1 0 , 1 0 ) ) ;
Assert . Equal ( placementTarget . Bounds , new Rect ( 3 9 5D , 2 9 5D , 1 0 , 1 0 ) ) ;
@ -1013,7 +1013,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
} ;
} ;
}
}
placementTarget . Margin = new Thickness ( 1 0 , 0 , 0 , 0 ) ;
placementTarget . Margin = new Thickness ( 1 0 , 0 , 0 , 0 ) ;
Dispatcher . UIThread . RunJobs ( ) ;
Dispatcher . UIThread . RunJobs ( null , TestContext . Current . CancellationToken ) ;
Assert . True ( raised ) ;
Assert . True ( raised ) ;
}
}
}
}
@ -1043,7 +1043,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
var window = PreparedWindow ( placementTarget ) ;
var window = PreparedWindow ( placementTarget ) ;
window . Show ( ) ;
window . Show ( ) ;
popup . Open ( ) ;
popup . Open ( ) ;
Dispatcher . UIThread . RunJobs ( ) ;
Dispatcher . UIThread . RunJobs ( null , TestContext . Current . CancellationToken ) ;
// The target's initial placement is (395,295) which is a 10x10 panel centered in a 800x600 window
// The target's initial placement is (395,295) which is a 10x10 panel centered in a 800x600 window
Assert . Equal ( placementTarget . Bounds , new Rect ( 3 9 5D , 2 9 5D , 1 0 , 1 0 ) ) ;
Assert . Equal ( placementTarget . Bounds , new Rect ( 3 9 5D , 2 9 5D , 1 0 , 1 0 ) ) ;
@ -1069,7 +1069,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
} ;
} ;
}
}
placementTarget . Margin = new Thickness ( 1 0 , 0 , 0 , 0 ) ;
placementTarget . Margin = new Thickness ( 1 0 , 0 , 0 , 0 ) ;
Dispatcher . UIThread . RunJobs ( ) ;
Dispatcher . UIThread . RunJobs ( null , TestContext . Current . CancellationToken ) ;
Assert . False ( raised ) ;
Assert . False ( raised ) ;
}
}
}
}
@ -1240,7 +1240,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
root . LayoutManager . ExecuteInitialLayoutPass ( ) ;
root . LayoutManager . ExecuteInitialLayoutPass ( ) ;
popup . Open ( ) ;
popup . Open ( ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender ) ;
Dispatcher . UIThread . RunJobs ( DispatcherPriority . AfterRender , TestContext . Current . CancellationToken ) ;
// X: Adorned Canvas.Left + Adorner Margin Left + Adorner Width
// X: Adorned Canvas.Left + Adorner Margin Left + Adorner Width
// Y: Adorned Canvas.Top + Adorner Margin Top + Adorner Height
// Y: Adorned Canvas.Top + Adorner Margin Top + Adorner Height