OLD | NEW |
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 Loading... |
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> |
OLD | NEW |