Commit 1355e7da authored by Georg Fritzsche's avatar Georg Fritzsche
Browse files

Bug 899080 - Test fixup part 5 - layout. r=roc

parent 48069b57
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ MOCHITEST_FILES = \
		test_bug851445.html \
		  bug851445_helper.html \
		test_emulateMedium.html \
		enableTestPlugin.js \
		$(NULL)

ifeq (,$(filter gonk,$(MOZ_WIDGET_TOOLKIT)))
+25 −0
Original line number Diff line number Diff line
// this automatically sets the test plugin to be enabled (not e.g. click-to-play)
// and resets this afterwards

(function() {
  function getTestPlugin(aPluginName) {
    var ph = SpecialPowers.Cc["@mozilla.org/plugin/host;1"]
                          .getService(SpecialPowers.Ci.nsIPluginHost);
    var tags = ph.getPluginTags();
    for (var tag of tags) {
      if (tag.name == aPluginName) {
       return tag;
      }
    }

    ok(false, "Could not find plugin tag with plugin name '" + name + "'");
    return null;
  }

  var plugin = getTestPlugin("Test Plug-in");
  var oldEnabledState = plugin.enabledState;
  plugin.enabledState = SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED;
  SimpleTest.registerCleanupFunction(function() {
    getTestPlugin("Test Plug-in").enabledState = oldEnabledState;
  });
})();
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
<head>
  <title>Tests for MozAfterPaint</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="enableTestPlugin.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
<head>
  <title>Tests for mozPaintCount</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="enableTestPlugin.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="doBackgroundFlicker()">
+1 −0
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ MOCHITEST_FILES = \
  test_bug791616.html \
  test_bug831780.html \
  test_bug841361.html \
  $(srcdir)/../../base/tests/enableTestPlugin.js \
  $(NULL)

# Disable the caret movement by word test on Linux because the shortcut keys
Loading