|
@@ -723,7 +723,7 @@ public class TextViewTests
|
|
|
var top = new Toplevel ();
|
|
|
top.Add (tv);
|
|
|
Application.Begin (top);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
Assert.False (tv.WordWrap);
|
|
|
Assert.Equal (Point.Empty, tv.CursorPosition);
|
|
@@ -796,7 +796,7 @@ This is the second line.
|
|
|
var top = new Toplevel ();
|
|
|
top.Add (tv);
|
|
|
Application.Begin (top);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
Assert.True (tv.WordWrap);
|
|
|
Assert.Equal (Point.Empty, tv.CursorPosition);
|
|
@@ -869,7 +869,7 @@ This is the second line.
|
|
|
var top = new Toplevel ();
|
|
|
top.Add (tv);
|
|
|
Application.Begin (top);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
Assert.False (tv.WordWrap);
|
|
|
Assert.Equal (Point.Empty, tv.CursorPosition);
|
|
@@ -942,7 +942,7 @@ This is the second line.
|
|
|
var top = new Toplevel ();
|
|
|
top.Add (tv);
|
|
|
Application.Begin (top);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
Assert.True (tv.WordWrap);
|
|
|
Assert.Equal (Point.Empty, tv.CursorPosition);
|
|
@@ -6738,7 +6738,7 @@ This is the second line.
|
|
|
Assert.True (_textView.Multiline);
|
|
|
_textView.NewKeyDownEvent (Key.Tab);
|
|
|
Assert.Equal ("\tTAB to jump between text fields.", _textView.Text);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
@"
|
|
@@ -6747,7 +6747,7 @@ TAB to jump between text field",
|
|
|
);
|
|
|
|
|
|
_textView.TabWidth = 4;
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
@"
|
|
@@ -6758,7 +6758,7 @@ TAB to jump between text field",
|
|
|
_textView.NewKeyDownEvent (Key.Tab.WithShift);
|
|
|
Assert.Equal ("TAB to jump between text fields.", _textView.Text);
|
|
|
Assert.True (_textView.NeedsDisplay);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
@"
|
|
@@ -6824,7 +6824,7 @@ TAB to jump between text field",
|
|
|
top.Add (win);
|
|
|
Application.Begin (top);
|
|
|
((FakeDriver)Application.Driver!).SetBufferSize (15, 15);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
//this passes
|
|
|
Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (
|
|
@@ -6853,7 +6853,7 @@ TAB to jump between text field",
|
|
|
tv.Used = false;
|
|
|
tv.CursorPosition = Point.Empty;
|
|
|
tv.InsertText ("\r\naaa\r\nbbb");
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
@"
|
|
@@ -6902,7 +6902,7 @@ TAB to jump between text field",
|
|
|
top.Add (win);
|
|
|
Application.Begin (top);
|
|
|
((FakeDriver)Application.Driver!).SetBufferSize (15, 15);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
//this passes
|
|
|
Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (
|
|
@@ -6931,7 +6931,7 @@ TAB to jump between text field",
|
|
|
tv.Used = false;
|
|
|
tv.CursorPosition = Point.Empty;
|
|
|
tv.InsertText ("\naaa\nbbb");
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
@"
|
|
@@ -7000,7 +7000,7 @@ TAB to jump between text field",
|
|
|
var top = new Toplevel ();
|
|
|
top.Add (tv);
|
|
|
Application.Begin (top);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
Assert.False (tv.WordWrap);
|
|
|
Assert.Equal (Point.Empty, tv.CursorPosition);
|
|
@@ -8173,7 +8173,7 @@ line.
|
|
|
var top = new Toplevel ();
|
|
|
top.Add (tv);
|
|
|
Application.Begin (top);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
Assert.Equal (Point.Empty, tv.CursorPosition);
|
|
|
Assert.Equal (0, tv.LeftColumn);
|
|
@@ -8187,7 +8187,7 @@ aaaa
|
|
|
|
|
|
tv.CursorPosition = new Point (5, 0);
|
|
|
Assert.True (tv.NewKeyDownEvent (Key.Backspace));
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
Assert.Equal (0, tv.LeftColumn);
|
|
|
|
|
|
TestHelpers.AssertDriverContentsAre (
|
|
@@ -8198,7 +8198,7 @@ aaa
|
|
|
);
|
|
|
|
|
|
Assert.True (tv.NewKeyDownEvent (Key.Backspace));
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
Assert.Equal (0, tv.LeftColumn);
|
|
|
|
|
|
TestHelpers.AssertDriverContentsAre (
|
|
@@ -8209,7 +8209,7 @@ aa
|
|
|
);
|
|
|
|
|
|
Assert.True (tv.NewKeyDownEvent (Key.Backspace));
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
Assert.Equal (0, tv.LeftColumn);
|
|
|
|
|
|
TestHelpers.AssertDriverContentsAre (
|
|
@@ -8220,7 +8220,7 @@ a
|
|
|
);
|
|
|
|
|
|
Assert.True (tv.NewKeyDownEvent (Key.Backspace));
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
Assert.Equal (0, tv.LeftColumn);
|
|
|
|
|
|
TestHelpers.AssertDriverContentsAre (
|
|
@@ -8231,7 +8231,7 @@ a
|
|
|
);
|
|
|
|
|
|
Assert.True (tv.NewKeyDownEvent (Key.Backspace));
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
Assert.Equal (0, tv.LeftColumn);
|
|
|
|
|
|
TestHelpers.AssertDriverContentsAre (
|
|
@@ -8253,7 +8253,7 @@ a
|
|
|
_textView.Text = "Line 1.\nLine 2.";
|
|
|
_textView.WordWrap = true;
|
|
|
Application.Begin (top);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
Assert.True (_textView.WordWrap);
|
|
|
|
|
@@ -8268,12 +8268,12 @@ Line 2.",
|
|
|
Assert.Equal ("Line 1.", _textView.SelectedText);
|
|
|
|
|
|
Assert.True (_textView.NewKeyDownEvent (new Key (del)));
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre ("Line 2.", _output);
|
|
|
|
|
|
Assert.True (_textView.NewKeyDownEvent (Key.H.WithShift));
|
|
|
Assert.NotEqual (Rectangle.Empty, _textView._needsDisplayRect);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
@"
|
|
@@ -8910,7 +8910,7 @@ line.
|
|
|
var top = new Toplevel ();
|
|
|
top.Add (tv);
|
|
|
Application.Begin (top);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
@"
|
|
@@ -8922,7 +8922,7 @@ This is the second line.",
|
|
|
tv.Width = 10;
|
|
|
tv.Height = 25;
|
|
|
tv.WordWrap = true;
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
@"
|
|
@@ -8964,7 +8964,7 @@ line. ",
|
|
|
var top = new Toplevel ();
|
|
|
top.Add (tv);
|
|
|
RunState rs = Application.Begin (top);
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
Assert.True (tv.InheritsPreviousAttribute);
|
|
|
|
|
@@ -9006,7 +9006,7 @@ Error ";
|
|
|
TestHelpers.AssertDriverAttributesAre (expectedColor, _output, Application.Driver, attributes);
|
|
|
|
|
|
tv.WordWrap = true;
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output);
|
|
|
TestHelpers.AssertDriverAttributesAre (expectedColor, _output, Application.Driver, attributes);
|
|
|
|
|
@@ -9018,7 +9018,7 @@ Error ";
|
|
|
tv.IsSelecting = false;
|
|
|
tv.CursorPosition = new (2, 4);
|
|
|
tv.Paste ();
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
expectedText = @"
|
|
|
TopLevel
|
|
@@ -9053,7 +9053,7 @@ Dialogror ";
|
|
|
tv.IsSelecting = false;
|
|
|
tv.CursorPosition = new (2, 4);
|
|
|
tv.Paste ();
|
|
|
- Application.Refresh ();
|
|
|
+ Application.LayoutAndDrawToplevels ();
|
|
|
|
|
|
expectedText = @"
|
|
|
TopLevel
|