summaryrefslogtreecommitdiffstats
path: root/webkit/data/plugin_tests
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/data/plugin_tests')
-rw-r--r--webkit/data/plugin_tests/npapi.js28
-rw-r--r--webkit/data/plugin_tests/verify_plugin_window_rect.html30
2 files changed, 58 insertions, 0 deletions
diff --git a/webkit/data/plugin_tests/npapi.js b/webkit/data/plugin_tests/npapi.js
new file mode 100644
index 0000000..207d188
--- /dev/null
+++ b/webkit/data/plugin_tests/npapi.js
@@ -0,0 +1,28 @@
+//
+// This script provides some mechanics for testing NPAPI
+//
+
+/* public */ function onSuccess(name, id)
+{
+ setTimeout(onFinished, 0, name, id, "OK");
+}
+
+/* public */ function onFailure(name, id, status)
+{
+ setTimeout(onFinished, 0, name, id, status);
+}
+
+
+
+// Finish running a test by setting the status
+// and the cookie.
+/* private */ function onFinished(name, id, result)
+{
+ var statusPanel = document.getElementById("statusPanel");
+ if (statusPanel) {
+ statusPanel.innerHTML = result;
+ }
+
+ var cookie = name + "." + id + ".status=" + result + "; path=/";
+ document.cookie = cookie;
+}
diff --git a/webkit/data/plugin_tests/verify_plugin_window_rect.html b/webkit/data/plugin_tests/verify_plugin_window_rect.html
new file mode 100644
index 0000000..7dca47a
--- /dev/null
+++ b/webkit/data/plugin_tests/verify_plugin_window_rect.html
@@ -0,0 +1,30 @@
+<html>
+
+<head>
+<script src="npapi.js"></script>
+</head>
+
+<body>
+<div id="statusPanel" style="border: 1px solid red; width: 100%">
+Test running....
+</div>
+
+
+Plugin Window Rect Test<p>
+
+Tests whether the plugin window has a non zero client rect.
+
+<DIV ID=PluginDiv>
+<embed type="application/vnd.npapi-test"
+ src="foo"
+ name="checkwindowrect"
+ id="1"
+ mode="np_embed"
+>
+</DIV>
+<script>
+ var height = document.body.offsetHeight;
+</script>
+
+</body>
+</html>