blob: dd8ee8c4824247f492d87c88c2cd2bdb82ec91b2 [file] [log] [blame]
<body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo.gif);
background-repeat:repeat"
onload="SetPluginSize(400, 400)">
<script type="text/javascript">
isPluginDefaultSize = true;
function Test() {
plugin = document.getElementById('plugin');
// Confirm that this no longer segfaults.
alert(plugin.toString(new Array(10)));
}
function SetPluginSize(width, height) {
plugin = document.getElementById('plugin');
size = document.getElementById('size');
plugin.width = width;
plugin.height = height;
size.innerHTML = "Height: " + plugin.height + ' Width: ' + plugin.width;
}
function ToggleSize() {
if (!isPluginDefaultSize) {
SetPluginSize(400, 400);
isPluginDefaultSize = true;
} else {
SetPluginSize(1000, 800);
isPluginDefaultSize = false;
}
}
</script>
<button onclick='Test()'>Test</button>
<button onclick='ToggleSize()'>Toggle Size</button>
<div id="fps" style="background-color:white; font-weight:bold; padding:4px; width:200px;">FPS GOES HERE</div>
<div id="size" style="background-color:white; font-weight:bold; padding:4px; width:200px;"></div>
<object id="plugin" type="application/x-ppapi-example" width="400" height="400" border="2px"></object>
<hr>
</body>