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

Side by Side Diff: ppapi/native_client/tests/ppapi_browser/ppb_instance/ppapi_ppb_instance.html

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
(Empty)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <!-- Copyright 2011 Google Inc. All rights reserved. -->
5 <head>
6 <META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
7 <META HTTP-EQUIV="Expires" CONTENT="-1" />
8 <script type="text/javascript" src="nacltest.js"></script>
9 <script type="application/x-javascript">
10 //<![CDATA[
11 function setupTests(tester, plugin) {
12 // This function takes an array of messages and asserts that the nexe
13 // calls PostMessage with each of these messages, in order.
14 function expectMessages(test, plugin, messages) {
15 test.assert(messages.length > 0, 'Must provide at least one message');
16 var listener = test.wrap(function(message) {
17 plugin.removeEventListener('message', listener, false);
18 test.assertEqual(message.data, messages.shift());
19 if (messages.length == 0) {
20 test.pass();
21 } else {
22 plugin.addEventListener('message', listener, false);
23 }
24 });
25 plugin.addEventListener('message', listener, false);
26 }
27
28 function addTest(test_name, responses) {
29 if (responses === undefined) {
30 responses = [];
31 }
32 var expected_messages = [test_name + ':PASSED'].concat(responses);
33 tester.addAsyncTest('PPB_Instance::' + test_name, function(test) {
34 expectMessages(test, plugin, expected_messages);
35 plugin.postMessage(test_name)
36 });
37 }
38
39 addTest('TestIsFullFrame');
40 addTest('TestBindGraphics');
41 }
42 //]]>
43 </script>
44 <title>PPAPI PPB_Instance Test</title>
45 </head>
46 <body>
47 <h1>PPAPI PPB_Instance Test</h1>
48
49 <embed type="application/x-nacl" id="test_nexe"
50 name="nacl_module"
51 src="ppapi_ppb_instance.nmf"
52 width="0" height="0" />
53
54 <script type="text/javascript">
55 //<![CDATA[
56 var tester = new Tester();
57 setupTests(tester, $('test_nexe'));
58 tester.waitFor($('test_nexe'));
59 tester.run();
60 //]]>
61 </script>
62 </body>
63 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698