From 441a2872c555af3726dedc219a32d4d481e58a92 Mon Sep 17 00:00:00 2001 From: illfang Date: Fri, 9 Oct 2015 15:23:50 +0900 Subject: [PATCH 1/2] added multi binding test for testing bindings with multiple contexts and dynamic context creation / destruction 1 browser, multiple changing contexts also added a link to the popuptest --- CefSharp.Example/CefSharp.Example.csproj | 1 + CefSharp.Example/CefSharpSchemeHandler.cs | 1 + .../Properties/Resources.Designer.cs | 50 ++++++++++++---- CefSharp.Example/Properties/Resources.resx | 3 + .../Resources/MultiBindingTest.html | 57 +++++++++++++++++++ CefSharp.Example/Resources/PopupTest.html | 2 + 6 files changed, 102 insertions(+), 12 deletions(-) create mode 100644 CefSharp.Example/Resources/MultiBindingTest.html diff --git a/CefSharp.Example/CefSharp.Example.csproj b/CefSharp.Example/CefSharp.Example.csproj index 795b87cc7..eb810d1fd 100644 --- a/CefSharp.Example/CefSharp.Example.csproj +++ b/CefSharp.Example/CefSharp.Example.csproj @@ -133,6 +133,7 @@ + diff --git a/CefSharp.Example/CefSharpSchemeHandler.cs b/CefSharp.Example/CefSharpSchemeHandler.cs index 45a65f247..7132bc012 100644 --- a/CefSharp.Example/CefSharpSchemeHandler.cs +++ b/CefSharp.Example/CefSharpSchemeHandler.cs @@ -44,6 +44,7 @@ namespace CefSharp.Example { "/SchemeTest.html", Resources.SchemeTest }, { "/TooltipTest.html", Resources.TooltipTest }, { "/FramedWebGLTest.html", Resources.FramedWebGLTest }, + { "/MultiBindingTest.html", Resources.MultiBindingTest }, }; } diff --git a/CefSharp.Example/Properties/Resources.Designer.cs b/CefSharp.Example/Properties/Resources.Designer.cs index 83721929f..822e4ac0c 100644 --- a/CefSharp.Example/Properties/Resources.Designer.cs +++ b/CefSharp.Example/Properties/Resources.Designer.cs @@ -393,6 +393,27 @@ namespace CefSharp.Example.Properties { } } + /// + /// Looks up a localized string similar to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + ///<html> + /// <head> + /// <title>Multi Binding Test</title> + /// </head> + /// <body> + /// <table style="width:100%; height:100%"> + /// <tr height="50%"> + /// <td width="50%"> + /// <iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe> + /// </td> + /// <td width="50%"> + /// <iframe src="custom://cefsharp/BindingTest.html" style="width:100%; heig [rest of string was truncated]";. + /// + internal static string MultiBindingTest { + get { + return ResourceManager.GetString("MultiBindingTest", resourceCulture); + } + } + /// /// Looks up a localized string similar to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ///<html> @@ -403,6 +424,8 @@ namespace CefSharp.Example.Properties { /// <a href="https://github.com/CefSharp/CefSharp" target="_blank">target=_blank</a> /// <br /> /// <a href="#" onclick="window.open('https://github.com/CefSharp/CefSharp')">window.open()</a> + /// <br /> + /// <a href="#" onclick="window.open('custom://cefsharp/BindingTest.html')">BindingTest.html</a> /// </body> ///</html> ///. @@ -416,19 +439,22 @@ namespace CefSharp.Example.Properties { /// /// Looks up a localized string similar to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ///<html> - /// <head> - /// <title>Scheme Handler Test</title> - /// </head> - /// <body> - /// <h1>Success</h1> - /// <p>Scheme Handler Functioned Correctly</p> + ///<head> + /// <title>Scheme Handler Test</title> /// - /// <form action="custom://cefsharp/PostDataTest.html" method="post" target="_blank"> - /// User:<input type="text" name="user" value="lion" /> - /// <br> - /// Pass:<input type="text" name="pass" value="123" /> - /// <br> - /// <input type [rest of string was truncated]";. + /// <script type="text/javascript"> + /// var htmlNode; + /// var newLine = "\n"; + /// var showError = function (text) + /// { + /// if (!htmlNode) + /// { + /// htmlNode = document.createElement("div"); + /// htmlNode.id = "debugWindow"; + /// document.body.appendChild(htmlNode); + /// } + /// + /// htmlNode.innerHTML [rest of string was truncated]";. /// internal static string SchemeTest { get { diff --git a/CefSharp.Example/Properties/Resources.resx b/CefSharp.Example/Properties/Resources.resx index cceadcbfc..61dd1f66b 100644 --- a/CefSharp.Example/Properties/Resources.resx +++ b/CefSharp.Example/Properties/Resources.resx @@ -172,4 +172,7 @@ ..\Resources\FramedWebGLTest.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + ..\Resources\MultiBindingTest.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + \ No newline at end of file diff --git a/CefSharp.Example/Resources/MultiBindingTest.html b/CefSharp.Example/Resources/MultiBindingTest.html new file mode 100644 index 000000000..b95c8f79b --- /dev/null +++ b/CefSharp.Example/Resources/MultiBindingTest.html @@ -0,0 +1,57 @@ + + + + Multi Binding Test + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + diff --git a/CefSharp.Example/Resources/PopupTest.html b/CefSharp.Example/Resources/PopupTest.html index f74976b80..ed3fa12cf 100644 --- a/CefSharp.Example/Resources/PopupTest.html +++ b/CefSharp.Example/Resources/PopupTest.html @@ -9,5 +9,7 @@ window.open()
BindingTest.html +
+ MultiBindingTest.html From 06597c336870dbc4c16cbcf55b545bb9f804cb35 Mon Sep 17 00:00:00 2001 From: illfang Date: Fri, 9 Oct 2015 17:55:14 +0900 Subject: [PATCH 2/2] fix formatting of multi binding test --- CefSharp.Example/Resources/MultiBindingTest.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CefSharp.Example/Resources/MultiBindingTest.html b/CefSharp.Example/Resources/MultiBindingTest.html index b95c8f79b..b17489674 100644 --- a/CefSharp.Example/Resources/MultiBindingTest.html +++ b/CefSharp.Example/Resources/MultiBindingTest.html @@ -1,7 +1,7 @@ - + - - Multi Binding Test + + Multi Binding Test - - + +
@@ -53,5 +53,5 @@
- +