| OLD | NEW |
| (Empty) |
| 1 <body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo.
gif); | |
| 2 background-repeat:repeat" | |
| 3 onload="SetPluginSize(400, 400)"> | |
| 4 | |
| 5 <script type="text/javascript"> | |
| 6 isPluginDefaultSize = true; | |
| 7 | |
| 8 function Test() { | |
| 9 var plugin = document.getElementById('plugin'); | |
| 10 // Confirm that this no longer segfaults. | |
| 11 alert(plugin.toString(new Array(10))); | |
| 12 | |
| 13 // Confirm that the renderer doesn't crash when the plugin module goes away | |
| 14 // while waiting for the reply to the HasPropery sync message. | |
| 15 plugin.removePluginWhenHasPropertyCalled; | |
| 16 } | |
| 17 | |
| 18 function SetPluginSize(width, height) { | |
| 19 plugin = document.getElementById('plugin'); | |
| 20 size = document.getElementById('size'); | |
| 21 plugin.width = width; | |
| 22 plugin.height = height; | |
| 23 size.innerHTML = "Height: " + plugin.height + ' Width: ' + plugin.width; | |
| 24 } | |
| 25 | |
| 26 function ToggleSize() { | |
| 27 if (!isPluginDefaultSize) { | |
| 28 SetPluginSize(400, 400); | |
| 29 isPluginDefaultSize = true; | |
| 30 } else { | |
| 31 SetPluginSize(1000, 800); | |
| 32 isPluginDefaultSize = false; | |
| 33 } | |
| 34 } | |
| 35 </script> | |
| 36 | |
| 37 <button onclick='Test()'>Test</button> | |
| 38 <button onclick='ToggleSize()'>Toggle Size</button> | |
| 39 <div id="fps" style="background-color:white; font-weight:bold; padding:4px; wi
dth:200px;">FPS GOES HERE</div> | |
| 40 <div id="size" style="background-color:white; font-weight:bold; padding:4px; w
idth:200px;"></div> | |
| 41 <object id="plugin" type="application/x-ppapi-example" width="400" height="400
" border="2px"></object> | |
| 42 <hr> | |
| 43 </body> | |
| OLD | NEW |