summaryrefslogtreecommitdiffstats
path: root/widget/tests/test_plugin_scroll_consistency.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /widget/tests/test_plugin_scroll_consistency.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'widget/tests/test_plugin_scroll_consistency.html')
-rw-r--r--widget/tests/test_plugin_scroll_consistency.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/widget/tests/test_plugin_scroll_consistency.html b/widget/tests/test_plugin_scroll_consistency.html
new file mode 100644
index 000000000..76d97f4ef
--- /dev/null
+++ b/widget/tests/test_plugin_scroll_consistency.html
@@ -0,0 +1,61 @@
+<html>
+<head>
+ <title>Test for plugin child widgets not being messed up by scrolling</title>
+ <script type="text/javascript"
+ src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="text/javascript" src="utils.js"></script>
+ <link rel="stylesheet" type="text/css"
+ href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body onload="setTimeout(runTests, 0)">
+<script type="application/javascript">
+setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
+</script>
+
+<p id="display">
+ <div style="overflow:hidden; height:100px;" id="scroll">
+ <embed type="application/x-test" wmode="window" width="100" height="800" id="plugin"></object>
+ <div style="height:1000px;"></div>
+ </div>
+</p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+</pre>
+
+<script class="testbody" type="application/javascript">
+SimpleTest.waitForExplicitFinish();
+
+var plugin = document.getElementById("plugin");
+
+function consistencyCheck(state) {
+ var s = plugin.doInternalConsistencyCheck();
+ ok(s == "", "Consistency check: " + state + ": " + s);
+}
+
+function runTests()
+{
+ consistencyCheck("Initial state");
+
+ var scroll = document.getElementById("scroll");
+ scroll.scrollTop = 10;
+ consistencyCheck("Scrolled down a bit");
+
+ setTimeout(function() {
+ consistencyCheck("Before scrolling back to top");
+ scroll.scrollTop = 0;
+ consistencyCheck("Scrolled to top");
+
+ setTimeout(function() {
+ consistencyCheck("After scrolling to top");
+
+ SimpleTest.finish();
+ }, 0);
+ }, 0);
+}
+
+</script>
+</body>
+
+</html>