summaryrefslogtreecommitdiffstats
path: root/dom/plugins/test/reftest/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/plugins/test/reftest/utils.js')
-rw-r--r--dom/plugins/test/reftest/utils.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/dom/plugins/test/reftest/utils.js b/dom/plugins/test/reftest/utils.js
new file mode 100644
index 000000000..f046089af
--- /dev/null
+++ b/dom/plugins/test/reftest/utils.js
@@ -0,0 +1,18 @@
+function forceLoadPluginElement(id) {
+ var e = document.getElementById(id);
+ var found = e.pluginFoundElement;
+}
+
+function forceLoadPlugin(ids, skipRemoveAttribute) {
+ if (Array.isArray(ids)) {
+ ids.forEach(function(element, index, array) {
+ forceLoadPluginElement(element);
+ });
+ } else {
+ forceLoadPluginElement(ids);
+ }
+ if (skipRemoveAttribute) {
+ return;
+ }
+ document.documentElement.removeAttribute("class");
+}