Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Side by Side Diff: ppapi/example/example.html

Issue 6543028: Implement the filesystem proxy. This allows the FileRef tests to pass in the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo. gif); 1 <body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo. gif);
2 background-repeat:repeat" 2 background-repeat:repeat"
3 onload="SetPluginSize(400, 400)"> 3 onload="SetPluginSize(400, 400)">
4 4
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 isPluginDefaultSize = true; 6 isPluginDefaultSize = true;
7 7
8 var foo = 0;
9
8 function Test() { 10 function Test() {
9 plugin = document.getElementById('plugin'); 11 plugin = document.getElementById('plugin');
10 // Confirm that this no longer segfaults. 12
11 alert(plugin.toString(new Array(10))); 13 if (foo == 0) {
14 foo = plugin.getObject();
15 // Confirm that this no longer segfaults.
16 //alert(plugin.toString(new Array(10)));
17 alert("first time");
18 plugin.parentNode.removeChild(plugin);
19 } else {
20 alert(foo.toString());
21 }
12 } 22 }
13 23
14 function SetPluginSize(width, height) { 24 function SetPluginSize(width, height) {
15 plugin = document.getElementById('plugin'); 25 plugin = document.getElementById('plugin');
16 size = document.getElementById('size'); 26 size = document.getElementById('size');
17 plugin.width = width; 27 plugin.width = width;
18 plugin.height = height; 28 plugin.height = height;
19 size.innerHTML = "Height: " + plugin.width + ' Width: ' + plugin.height; 29 size.innerHTML = "Height: " + plugin.width + ' Width: ' + plugin.height;
20 } 30 }
21 31
22 function ToggleSize() { 32 function ToggleSize() {
23 if (!isPluginDefaultSize) { 33 if (!isPluginDefaultSize) {
24 SetPluginSize(400, 400); 34 SetPluginSize(400, 400);
25 isPluginDefaultSize = true; 35 isPluginDefaultSize = true;
26 } else { 36 } else {
27 SetPluginSize(1000, 800); 37 SetPluginSize(1000, 800);
28 isPluginDefaultSize = false; 38 isPluginDefaultSize = false;
29 } 39 }
30 } 40 }
31 </script> 41 </script>
32 42
33 <button onclick='Test()'>Test</button> 43 <button onclick='Test()'>Test</button>
44 <button id="asdf">Asdf</button>
34 <button onclick='ToggleSize()'>Toggle Size</button> 45 <button onclick='ToggleSize()'>Toggle Size</button>
35 <div id="fps" style="background-color:white; font-weight:bold; padding:4px; wi dth:200px;">FPS GOES HERE</div> 46 <div id="fps" style="background-color:white; font-weight:bold; padding:4px; wi dth:200px;">FPS GOES HERE</div>
36 <div id="size" style="background-color:white; font-weight:bold; padding:4px; w idth:200px;"></div> 47 <div id="size" style="background-color:white; font-weight:bold; padding:4px; w idth:200px;"></div>
37 <object id="plugin" type="application/x-ppapi-example" width="400" height="400 " border="2px"></object> 48 <object id="plugin" type="application/x-ppapi-example" width="400" height="400 " border="2px"></object>
38 <hr> 49 <hr>
39 </body> 50 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698