Merge pull request #1318 from illfang/feature-multi-binding-test

Feature multi binding test
This commit is contained in:
Alex Maitland
2015-10-09 19:46:36 +10:00
6 changed files with 102 additions and 12 deletions
+1
View File
@@ -133,6 +133,7 @@
<Content Include="Resources\bootstrap\bootstrap.min.css" />
<Content Include="Resources\bootstrap\bootstrap.min.js" />
<Content Include="Resources\extension.js" />
<Content Include="Resources\MultiBindingTest.html" />
<Content Include="Resources\home.html" />
<Content Include="Resources\FramedWebGLTest.html" />
<Content Include="Resources\PopupTest.html" />
@@ -44,6 +44,7 @@ namespace CefSharp.Example
{ "/SchemeTest.html", Resources.SchemeTest },
{ "/TooltipTest.html", Resources.TooltipTest },
{ "/FramedWebGLTest.html", Resources.FramedWebGLTest },
{ "/MultiBindingTest.html", Resources.MultiBindingTest },
};
}
+38 -12
View File
@@ -393,6 +393,27 @@ namespace CefSharp.Example.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
///&lt;html&gt;
/// &lt;head&gt;
/// &lt;title&gt;Multi Binding Test&lt;/title&gt;
/// &lt;/head&gt;
/// &lt;body&gt;
/// &lt;table style=&quot;width:100%; height:100%&quot;&gt;
/// &lt;tr height=&quot;50%&quot;&gt;
/// &lt;td width=&quot;50%&quot;&gt;
/// &lt;iframe src=&quot;custom://cefsharp/BindingTest.html&quot; style=&quot;width:100%; height:100%&quot;&gt;&lt;/iframe&gt;
/// &lt;/td&gt;
/// &lt;td width=&quot;50%&quot;&gt;
/// &lt;iframe src=&quot;custom://cefsharp/BindingTest.html&quot; style=&quot;width:100%; heig [rest of string was truncated]&quot;;.
/// </summary>
internal static string MultiBindingTest {
get {
return ResourceManager.GetString("MultiBindingTest", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
///&lt;html&gt;
@@ -403,6 +424,8 @@ namespace CefSharp.Example.Properties {
/// &lt;a href=&quot;https://github.com/CefSharp/CefSharp&quot; target=&quot;_blank&quot;&gt;target=_blank&lt;/a&gt;
/// &lt;br /&gt;
/// &lt;a href=&quot;#&quot; onclick=&quot;window.open(&apos;https://github.com/CefSharp/CefSharp&apos;)&quot;&gt;window.open()&lt;/a&gt;
/// &lt;br /&gt;
/// &lt;a href=&quot;#&quot; onclick=&quot;window.open(&apos;custom://cefsharp/BindingTest.html&apos;)&quot;&gt;BindingTest.html&lt;/a&gt;
/// &lt;/body&gt;
///&lt;/html&gt;
///.
@@ -416,19 +439,22 @@ namespace CefSharp.Example.Properties {
/// <summary>
/// Looks up a localized string similar to &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
///&lt;html&gt;
/// &lt;head&gt;
/// &lt;title&gt;Scheme Handler Test&lt;/title&gt;
/// &lt;/head&gt;
/// &lt;body&gt;
/// &lt;h1&gt;Success&lt;/h1&gt;
/// &lt;p&gt;Scheme Handler Functioned Correctly&lt;/p&gt;
///&lt;head&gt;
/// &lt;title&gt;Scheme Handler Test&lt;/title&gt;
///
/// &lt;form action=&quot;custom://cefsharp/PostDataTest.html&quot; method=&quot;post&quot; target=&quot;_blank&quot;&gt;
/// User:&lt;input type=&quot;text&quot; name=&quot;user&quot; value=&quot;lion&quot; /&gt;
/// &lt;br&gt;
/// Pass:&lt;input type=&quot;text&quot; name=&quot;pass&quot; value=&quot;123&quot; /&gt;
/// &lt;br&gt;
/// &lt;input type [rest of string was truncated]&quot;;.
/// &lt;script type=&quot;text/javascript&quot;&gt;
/// var htmlNode;
/// var newLine = &quot;\n&quot;;
/// var showError = function (text)
/// {
/// if (!htmlNode)
/// {
/// htmlNode = document.createElement(&quot;div&quot;);
/// htmlNode.id = &quot;debugWindow&quot;;
/// document.body.appendChild(htmlNode);
/// }
///
/// htmlNode.innerHTML [rest of string was truncated]&quot;;.
/// </summary>
internal static string SchemeTest {
get {
@@ -172,4 +172,7 @@
<data name="FramedWebGLTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FramedWebGLTest.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="MultiBindingTest" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MultiBindingTest.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
</root>
@@ -0,0 +1,57 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Multi Binding Test</title>
<script type="text/javascript">
var DYNAMIC_CONTAINER_COUNT = 6;
var PRIMES = [1453, 4273, 6277, 9923, 26099, 41231];
function replaceContainer(id, src)
{
console.log("Replacing Container " + id);
var container = document.getElementById("dynamicContainer" + id);
var newFrame = document.createElement("iframe");
newFrame.style.width = newFrame.style.height = "100%";
newFrame.src = src || "custom://cefsharp/BindingTest.html";
Array.prototype.forEach.call(container.children, c => container.removeChild(c));
container.appendChild(newFrame);
}
window.addEventListener("load", function()
{
for (var i = 0; i < DYNAMIC_CONTAINER_COUNT; i++)
{
var interval = PRIMES[i%PRIMES.length];
window.setInterval(replaceContainer.bind(undefined, i + 1), interval);
}
});
</script>
</head>
<body>
<table style="width:100%; height:100%">
<tr height="34%">
<td width="50%" id="dynamicContainer1">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
<td width="50%" id="dynamicContainer2">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
</tr>
<tr height="33%">
<td width="50%" id="dynamicContainer3">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
<td width="50%" id="dynamicContainer4">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
</tr>
<tr height="33%">
<td width="50%" id="dynamicContainer5">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
<td width="50%" id="dynamicContainer6">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
</tr>
</table>
</body>
</html>
@@ -9,5 +9,7 @@
<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>
<br />
<a href="#" onclick="window.open('custom://cefsharp/MultiBindingTest.html')">MultiBindingTest.html</a>
</body>
</html>