mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 04:00:07 +00:00
Merge pull request #1318 from illfang/feature-multi-binding-test
Feature multi binding test
This commit is contained in:
@@ -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
@@ -393,6 +393,27 @@ namespace CefSharp.Example.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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]";.
|
||||
/// </summary>
|
||||
internal static string MultiBindingTest {
|
||||
get {
|
||||
return ResourceManager.GetString("MultiBindingTest", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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 {
|
||||
/// <summary>
|
||||
/// 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]";.
|
||||
/// </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>
|
||||
|
||||
Reference in New Issue
Block a user