Mon, 05 May 2008 13:43:44 -0700
changeset 14946 64adbb2b60abab16505eaac33383ec30d64d392c
parent 6208 3756170d9f4e9dcbdb12a1dea1e2e8ad75b984e9
permissions -rw-r--r--
Bug 431713: show EULA by default on first run of Firefox on Linux, and add override for unit test/talos machines to avoid it there, r=mconnor, a=mconnor

<TITLE>Scriptable Plug-in Test</TITLE>
<BODY id="bodyId">

<h1>Sample Scriptable Plug-in </h1>

This page contains a testcase which demonstrates the work of
scriptable 4.x style Navigator plug-in with Mozilla. The example
plug-in occupies the area right below this text, and you should see a
frame the plug-in draws around its window. Below the plug-in window
there are two buttons. Clicking on the buttons will result in calling
native plugin methods from JavaScript. Show Version will instruct the
plug-in to retrieve the Mozilla user agent string and display it in
the plug-in window, Clear button will call plug-in method to erase the



function bar(arg)
  document.getElementById("result").innerHTML += "<p>" + "function bar(" + arg + ") called!" + "</p>";

  return 4;

<div id="result">
<p>results go here:</p>

<embed id="embed1" type="application/mozilla-npruntime-scriptable-plugin" width=600 height=40><br>

<embed type="application/x-java-mozilla-npruntime-scriptable-plugin" style="display: block; width: 50%; height: 100px;"><br>

var embed1 = document.getElementById('embed1');

<form name="formname">
<input type=button value="Call" onclick='alert('>
<input type=button value="alert(" onclick='alert('>
<input type=button value="alert(pluginobj('foo'))" onclick='alert(pluginobj("foo"))'>
<input type=button value="alert(" onclick='alert('>
<input type=button value="alert(" onclick='alert('>
<input type=button value="alert(embed1())" onclick='alert(embed1())'>
<input type=button value="'foo'" onclick='"foo";'>