Skip to content

Commit

Permalink
Added support for Ignoring SSL Peer errors in WebKitBrowserTest/Progr…
Browse files Browse the repository at this point in the history
…am.cs using /IgnoreSSL CLArg.

Added support for Basic Authentication in each project, adding Username and Password properties to WebKitBrowser/WebKitBrowser.cs and WebKitCore/WebKitBrowserCore.cs, and UI elements under Edit in WebKitBrowserTest/MainForm.cs.
Added support for compiling WebKit.Interop.dll using build_webkit.interop_2010.bat.
  • Loading branch information
Mitch Connors authored and Mitch Connors committed Jun 8, 2011
1 parent 160a223 commit be36ec5
Show file tree
Hide file tree
Showing 10 changed files with 408 additions and 31 deletions.
19 changes: 19 additions & 0 deletions WebKitBrowser/WebKitBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,25 @@ public event ShowJavaScriptPromptPanelEventHandler ShowJavaScriptPromptPanel

#region Public properties

/// <summary>
/// The HTTP Basic Authentication UserName
/// </summary>
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string UserName
{
get { return core.UserName; }
set { core.UserName = value; }
}

/// <summary>
/// The HTTP Basic Authentication Password
/// </summary>
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Password
{
set { core.Password = value; }
}

/// <summary>
/// The current print page settings.
/// </summary>
Expand Down
54 changes: 32 additions & 22 deletions WebKitBrowserTest/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions WebKitBrowserTest/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,15 @@ private class TestClass
public double i { get; set; }
public bool b { get; set; }
}

private void setPasswordToolStripMenuItem_Click(object sender, EventArgs e)
{
PasswordDialog passDG = new PasswordDialog();
if (passDG.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
currentPage.browser.Password = passDG.Password;
currentPage.browser.UserName = passDG.Username;
}
}
}
}
40 changes: 40 additions & 0 deletions WebKitBrowserTest/PasswordDialog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WebKitBrowserTest
{
public partial class PasswordDialog : Form
{
public PasswordDialog()
{
InitializeComponent();
}

public string Username
{
get { return this.usernameTextBox.Text; }
set { this.usernameTextBox.Text = value; }
}

public string Password
{
get { return this.passwordTextBox.Text; }
set { this.passwordTextBox.Text = value; }
}

private void OKButton_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}

private void CancelButton_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
}
}
}
142 changes: 142 additions & 0 deletions WebKitBrowserTest/PasswordDialog.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit be36ec5

Please sign in to comment.