mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 967694 - Fix tests that expect old behavior. r=bsmedberg
This commit is contained in:
parent
a9d7a9fe8b
commit
99e1d7de24
@ -729,21 +729,23 @@ function test22() {
|
||||
is(objLoadingContent.displayedType, Ci.nsIObjectLoadingContent.TYPE_PLUGIN, "Test 22, plugin should have started");
|
||||
ok(pluginNode.activated, "Test 22, plugin should be activated");
|
||||
|
||||
// Reload plugin
|
||||
var oldVal = pluginNode.getObjectValue();
|
||||
pluginNode.src = pluginNode.src;
|
||||
is(objLoadingContent.displayedType, Ci.nsIObjectLoadingContent.TYPE_PLUGIN, "Test 22, Plugin should have retained activated state");
|
||||
ok(pluginNode.activated, "Test 22, plugin should have remained activated");
|
||||
// Sanity, ensure that we actually reloaded the instance, since this behavior might change in the future.
|
||||
var pluginsDiffer;
|
||||
try {
|
||||
pluginNode.checkObjectValue(oldVal);
|
||||
} catch (e) {
|
||||
pluginsDiffer = true;
|
||||
}
|
||||
ok(pluginsDiffer, "Test 22, plugin should have reloaded");
|
||||
// Spin event loop for plugin to finish spawning
|
||||
executeSoon(function() {
|
||||
var oldVal = pluginNode.getObjectValue();
|
||||
pluginNode.src = pluginNode.src;
|
||||
is(objLoadingContent.displayedType, Ci.nsIObjectLoadingContent.TYPE_PLUGIN, "Test 22, Plugin should have retained activated state");
|
||||
ok(pluginNode.activated, "Test 22, plugin should have remained activated");
|
||||
// Sanity, ensure that we actually reloaded the instance, since this behavior might change in the future.
|
||||
var pluginsDiffer;
|
||||
try {
|
||||
pluginNode.checkObjectValue(oldVal);
|
||||
} catch (e) {
|
||||
pluginsDiffer = true;
|
||||
}
|
||||
ok(pluginsDiffer, "Test 22, plugin should have reloaded");
|
||||
|
||||
prepareTest(runAfterPluginBindingAttached(test23), gTestRoot + "plugin_test.html");
|
||||
prepareTest(runAfterPluginBindingAttached(test23), gTestRoot + "plugin_test.html");
|
||||
});
|
||||
}
|
||||
|
||||
// Tests that a click-to-play plugin resets its activated state when changing types
|
||||
|
@ -21,12 +21,17 @@
|
||||
const FLAG_CLEAR_ALL = pluginHostIface.FLAG_CLEAR_ALL;
|
||||
const FLAG_CLEAR_CACHE = pluginHostIface.FLAG_CLEAR_CACHE;
|
||||
|
||||
// Make sure clearing by timerange is supported.
|
||||
var p = document.getElementById("plugin1");
|
||||
p.setSitesWithDataCapabilities(true);
|
||||
|
||||
ok(PluginUtils.withTestPlugin(runTest), "Test plugin found");
|
||||
SimpleTest.finish();
|
||||
// Since we're running with chrome permissions, accessing the plugin wont
|
||||
// synchronously spawn it -- wait for the async spawning to finish.
|
||||
SimpleTest.executeSoon(function() {
|
||||
// Make sure clearing by timerange is supported.
|
||||
p.setSitesWithDataCapabilities(true);
|
||||
|
||||
ok(PluginUtils.withTestPlugin(runTest), "Test plugin found");
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
function stored(needles) {
|
||||
var something = pluginHost.siteHasData(this.pluginTag, null);
|
||||
|
@ -25,7 +25,7 @@ for (var tag of pluginTags) {
|
||||
</div>
|
||||
</p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
@ -40,10 +40,10 @@ function consistencyCheck(state) {
|
||||
ok(s == "", "Consistency check: " + state + ": " + s);
|
||||
}
|
||||
|
||||
consistencyCheck("Initial state");
|
||||
|
||||
function runTests()
|
||||
{
|
||||
consistencyCheck("Initial state");
|
||||
|
||||
var scroll = document.getElementById("scroll");
|
||||
scroll.scrollTop = 10;
|
||||
consistencyCheck("Scrolled down a bit");
|
||||
@ -52,7 +52,7 @@ function runTests()
|
||||
consistencyCheck("Before scrolling back to top");
|
||||
scroll.scrollTop = 0;
|
||||
consistencyCheck("Scrolled to top");
|
||||
|
||||
|
||||
setTimeout(function() {
|
||||
consistencyCheck("After scrolling to top");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user