summaryrefslogtreecommitdiffstats
path: root/webkit/tools/pepper_test_plugin/test_page.html
blob: 332de34de4cfe6da02ca1f821d4836302f98010a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Pepper Plugin Demo </title>
<script type="text/javascript">
var event_box;

var addLine = function(line) {
  event_box.innerHTML = line + '<br>' + event_box.innerHTML;
}

var runScripts = function() {
  event_box = document.getElementById("event_text_box");;
  var plugin_obj = document.getElementById("plugin");
  if (plugin_obj.setTextBox) {
    addLine('<b>Event log</b>');
    plugin_obj.setTextBox(addLine);
  } else {
    alert('Plugin failed to load.');
  }
}
</script>
</head>

<body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo.gif); background-repeat:repeat;" onload="runScripts()">

<p>
This page embeds a file declared as the pepper test plugins MIME type so that it will get loaded for testing.
</p>
<table>
<tr>
<td valign="top" width="50%">
<object id="plugin" type="pepper-application/x-pepper-test-plugin" width="400" height="400" dimensions="2" />
</td>
<td valign="top" style="background-color:Silver" width="50%">
<div id="event_text_box" style="width:400px; height:400px; overflow:auto">
</div>
</td>
</tr>
</table>

</body>
</html>