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

Side by Side Diff: tests/contest_issues/issue45.html

Issue 1092005: Issue 1092005 (Closed) Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: Created 10 years, 9 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 <html> 1 <html>
2 <!-- Issue 45 from the Native Client security contest --> 2 <!-- Issue 45 from the Native Client security contest -->
3 <head> 3 <head>
4 <title> Native Client Security Contest -- Issue 45 </title> 4 <title> Native Client Security Contest -- Issue 45 </title>
5 </head> 5 </head>
6 <script> 6 <script>
7 var server; 7 var server;
8 var timeout; 8 var timeout;
9 var PostInit = function() { 9 var PostInit = function() {
10 server = document.getElementById('nacl_server'); 10 server = document.getElementById('nacl_server');
11 if (server.__moduleReady == undefined) { 11 if (server.__moduleReady == undefined) {
12 timeout = setTimeout(PostInit, 100); 12 timeout = setTimeout(PostInit, 100);
13 return; 13 return;
14 } 14 }
15 var buttonid = document.getElementById("mybutton"); 15 var buttonid = document.getElementById("mybutton");
16 buttonid.disabled = null; 16 buttonid.disabled = null;
17 } 17 }
18 var ClearTimeout = function() { 18 var ClearTimeout = function() {
19 clearTimeout(timeout); 19 clearTimeout(timeout);
20 } 20 }
21 var boom = function() { 21 var boom = function() {
22 var shared_memory = server.__shmFactory(0xdead); 22 var shared_memory = server.__shmFactory(0xdead);
23 shared_memory.read(0x80000000, 0x80000004); 23 shared_memory.read(0x80000000, 0x80000004);
24 } 24 }
25 </script> 25 </script>
26 <body onload="PostInit();" onunload="ClearTimeout();"> 26 <body onload="PostInit();" onunload="ClearTimeout();">
27 <button type="button" id="mybutton" disabled="true" 27 <button type="button" id="mybutton" disabled="true"
28 onclick="boom();" />boom</button> 28 onclick="boom();" />boom</button>
29 <embed type="application/x-nacl-srpc" id="nacl_server" 29 <embed type="application/x-nacl-srpc" id="nacl_server"
30 width="0" height="0" src="srpc_nrd_server.nexe" /> 30 width="0" height="0" nexe="srpc_nrd_server">
31 <noembed>
32 Your browser does not appear to support Native Client.
33 Visit http://code.google.com/p/nativeclient/ to get started.
34 <noembed/>
35 </embed>
31 <p> 36 <p>
32 <b>Note:</b> For the purposes of contest issue #45, the actual expected 37 <b>Note:</b> For the purposes of contest issue #45, the actual expected
33 result when clicking the "Boom" button is a browser that continues to 38 result when clicking the "Boom" button is a browser that continues to
34 function properly. 39 function properly.
35 </p> 40 </p>
36 </body> 41 </body>
37 </html> 42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698