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

Side by Side Diff: ppapi/tests/test_case.html

Issue 7049021: Adjust PPAPI tests so they can also be run in the NaCl build using PyAuto. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « ppapi/tests/nacl.scons ('k') | ppapi/tests/test_case.nmf » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html><head> 1 <html><head>
2 <meta http-equiv="Pragma" content="no-cache" /> 2 <meta http-equiv="Pragma" content="no-cache" />
3 <meta http-equiv="Expires" content="-1" /> 3 <meta http-equiv="Expires" content="-1" />
4 <link rel="stylesheet" href="test_page.css"> 4 <link rel="stylesheet" href="test_page.css">
5 <script> 5 <script>
6 function AdjustHeight(frameWin) { 6 function AdjustHeight(frameWin) {
7 var div = frameWin.document.getElementsByTagName("div")[0]; 7 var div = frameWin.document.getElementsByTagName("div")[0];
8 var height = frameWin.getComputedStyle(div).height; 8 var height = frameWin.getComputedStyle(div).height;
9 frameWin.frameElement.style.height = height; 9 frameWin.frameElement.style.height = height;
10 } 10 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 return ""; 66 return "";
67 } 67 }
68 68
69 onload = function() { 69 onload = function() {
70 var testcase = ExtractSearchParameter("testcase"); 70 var testcase = ExtractSearchParameter("testcase");
71 var mode = ExtractSearchParameter("mode"); 71 var mode = ExtractSearchParameter("mode");
72 document.title = 'Test ' + testcase; 72 document.title = 'Test ' + testcase;
73 var obj; 73 var obj;
74 if (mode == "nacl") { 74 if (mode == "nacl") {
75 obj = document.createElement("OBJECT"); 75 obj = document.createElement("EMBED");
76 obj.setAttribute("src", "test_case.nmf");
76 obj.setAttribute("type", "application/x-nacl"); 77 obj.setAttribute("type", "application/x-nacl");
77 obj.setAttribute("nacl", "test_case.nmf");
78 obj.setAttribute("mode", mode); 78 obj.setAttribute("mode", mode);
79 } else { 79 } else {
80 var mimeType = "application/x-ppapi-tests"; 80 var mimeType = "application/x-ppapi-tests";
81 if (mimeType in navigator.mimeTypes) { 81 if (mimeType in navigator.mimeTypes) {
82 obj = document.createElement("EMBED"); 82 obj = document.createElement("EMBED");
83 obj.setAttribute("src", "http://a.b.c/test");
83 obj.setAttribute("type", mimeType); 84 obj.setAttribute("type", mimeType);
84 } else { 85 } else {
85 document.getElementById("console").innerHTML = 86 document.getElementById("console").innerHTML =
86 '<span class="fail">FAIL</span>: ' + 87 '<span class="fail">FAIL</span>: ' +
87 '<span class="err_msg">Test plug-in is not registered.</span>'; 88 '<span class="err_msg">Test plug-in is not registered.</span>';
88 } 89 }
89 } 90 }
90 if (obj) { 91 if (obj) {
91 obj.setAttribute("id", "plugin"); 92 obj.setAttribute("id", "plugin");
92 obj.setAttribute("testcase", testcase); 93 obj.setAttribute("testcase", testcase);
93 obj.setAttribute("src", "http://a.b.c/test");
94 document.getElementById("container").appendChild(obj); 94 document.getElementById("container").appendChild(obj);
95 } 95 }
96 } 96 }
97 </script> 97 </script>
98 </head><body> 98 </head><body>
99 <div> 99 <div>
100 <div id="container"></div> 100 <div id="container"></div>
101 <div id="console" /><span class="load_msg">loading...</span></div> 101 <div id="console" /><span class="load_msg">loading...</span></div>
102 </div> 102 </div>
103 </body></html> 103 </body></html>
OLDNEW
« no previous file with comments | « ppapi/tests/nacl.scons ('k') | ppapi/tests/test_case.nmf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698