public void EdgeWebBrowser_GetStyle_Invoke_ReturnsExpected(ControlStyles flag, bool expected) { using var control = new SubEdgeWebBrowser(); Assert.Equal(expected, control.GetStyle(flag)); // Call again to test caching. Assert.Equal(expected, control.GetStyle(flag)); }
public void EdgeWebBrowser_CreateParams_GetDefault_ReturnsExpected() { using var control = new SubEdgeWebBrowser(); CreateParams createParams = control.CreateParams; Assert.Null(createParams.Caption); Assert.Null(createParams.ClassName); Assert.Equal(0x8, createParams.ClassStyle); Assert.Equal(0, createParams.ExStyle); Assert.Equal(250, createParams.Height); Assert.Equal(IntPtr.Zero, createParams.Parent); Assert.Null(createParams.Param); Assert.Equal(0x56010000, createParams.Style); Assert.Equal(250, createParams.Width); Assert.Equal(0, createParams.X); Assert.Equal(0, createParams.Y); Assert.Same(createParams, control.CreateParams); Assert.False(control.IsHandleCreated); }
public void EdgeWebBrowser_Ctor_Default() { using var control = new SubEdgeWebBrowser(); Assert.False(control.AllowDrop); Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); Assert.False(control.AutoSize); Assert.Equal(Control.DefaultBackColor, control.BackColor); Assert.Null(control.BackgroundImage); Assert.Equal(ImageLayout.Tile, control.BackgroundImageLayout); Assert.Null(control.BindingContext); Assert.Equal(250, control.Bottom); Assert.Equal(new Rectangle(0, 0, 250, 250), control.Bounds); Assert.False(control.CanGoBack); Assert.False(control.CanGoForward); Assert.True(control.CanEnableIme); Assert.True(control.CanRaiseEvents); Assert.True(control.CanSelect); Assert.True(control.CausesValidation); Assert.Equal(new Size(250, 250), control.ClientSize); Assert.Equal(new Rectangle(0, 0, 250, 250), control.ClientRectangle); Assert.Null(control.Container); Assert.Null(control.ContextMenuStrip); Assert.Empty(control.Controls); Assert.Same(control.Controls, control.Controls); Assert.False(control.Created); Assert.Same(Cursors.Default, control.Cursor); Assert.Same(Cursors.Default, control.DefaultCursor); Assert.Equal(ImeMode.Inherit, control.DefaultImeMode); Assert.Equal(new Padding(3), control.DefaultMargin); Assert.Equal(Size.Empty, control.DefaultMaximumSize); Assert.Equal(Size.Empty, control.DefaultMinimumSize); Assert.Equal(Padding.Empty, control.DefaultPadding); Assert.Equal(new Size(250, 250), control.DefaultSize); Assert.False(control.DesignMode); Assert.Equal(new Rectangle(0, 0, 250, 250), control.DisplayRectangle); Assert.Equal(DockStyle.None, control.Dock); Assert.False(control.DoubleBuffered); Assert.True(control.Enabled); Assert.NotNull(control.Events); Assert.Same(control.Events, control.Events); Assert.Equal(Control.DefaultFont, control.Font); Assert.Equal(control.Font.Height, control.FontHeight); Assert.Equal(Control.DefaultForeColor, control.ForeColor); Assert.False(control.HasChildren); Assert.Equal(250, control.Height); Assert.Equal(ImeMode.NoControl, control.ImeMode); Assert.Equal(ImeMode.NoControl, control.ImeModeBase); Assert.NotNull(control.LayoutEngine); Assert.Same(control.LayoutEngine, control.LayoutEngine); Assert.Equal(0, control.Left); Assert.Equal(Point.Empty, control.Location); Assert.Equal(new Padding(3), control.Margin); Assert.Equal(Size.Empty, control.MaximumSize); Assert.Equal(Size.Empty, control.MinimumSize); Assert.Equal(Padding.Empty, control.Padding); Assert.Null(control.Parent); Assert.Equal("Microsoft\u00AE .NET", control.ProductName); Assert.Equal(new Size(250, 250), control.PreferredSize); Assert.False(control.RecreatingHandle); Assert.Null(control.Region); Assert.False(control.ResizeRedraw); Assert.Equal(250, control.Right); Assert.Equal(RightToLeft.No, control.RightToLeft); Assert.Null(control.Site); Assert.Equal(new Size(250, 250), control.Size); Assert.Equal(0, control.TabIndex); Assert.True(control.TabStop); Assert.Empty(control.Text); Assert.Equal(0, control.Top); Assert.Null(control.TopLevelControl); Assert.True(control.Visible); Assert.Equal(250, control.Width); Assert.False(control.IsHandleCreated); }
public void EdgeWebBrowser_GetAutoSizeMode_Invoke_ReturnsExpected() { using var control = new SubEdgeWebBrowser(); Assert.Equal(AutoSizeMode.GrowOnly, control.GetAutoSizeMode()); }