add a use_alsa gyp setting
[chromium-blink-merge.git] / content / test / data / browser_plugin_naming_embedder.html
blob17d4b7bafd17ee9de90a0032c0b46b4a6136029e
1 <html>
2 <body>
3 <object id="plugin"
4 type="application/browser-plugin"
5 name="start"
6 width="640"
7 height="480"></object>
8 <script>
9 var loadstop = false;
10 var requestCommChannel = false;
11 function SetSrc(src) {
12 var plugin = document.getElementById('plugin');
13 plugin.src = src;
15 // Open a two-way communication channel with the guest.
16 function OpenCommChannel() {
17 if (!loadstop) {
18 requestCommChannel = true;
19 return;
21 var plugin = document.getElementById('plugin');
22 plugin.contentWindow.frames.postMessage('test', '*');
25 // Establish a two-way channel with the guest.
26 window.addEventListener('message', function(e) {
27 document.title = event.data;
28 });
29 var plugin = document.getElementById('plugin');
30 plugin.addEventListener('-internal-loadstop', function(e) {
31 loadstop = true;
32 if (requestCommChannel) {
33 plugin.contentWindow.frames.postMessage('test', '*');
35 });
36 </script>
37 </body>
38 </html>