Bug 485120 - Touchup test patch for windows orange. CLOSED TREE bustage fix.
authorJim Mathies <jmathies@mozilla.com>
Mon, 13 Apr 2009 16:42:01 -0500
changeset 27280 32bd3a0f61b1
parent 27279 009fd53b3e85
child 27281 d7567548bc8f
push id6470
push userjmathies@mozilla.com
push date2009-04-13 21:42 +0000
treeherdermozilla-central@32bd3a0f61b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs485120
milestone1.9.2a1pre
Bug 485120 - Touchup test patch for windows orange. CLOSED TREE bustage fix.
modules/plugin/test/mochitest/test_wmode.xul
modules/plugin/test/testplugin/nptest_windows.cpp
--- a/modules/plugin/test/mochitest/test_wmode.xul
+++ b/modules/plugin/test/mochitest/test_wmode.xul
@@ -21,17 +21,17 @@ SimpleTest.waitForExplicitFinish();
 function runTests() {
   var p1 = document.getElementById("plugin1");
   is(p1.hasWidget(), false, "Plugin should be windowless by default");
   
   var p2 = document.getElementById("plugin2");
   if (navigator.platform.indexOf("Mac") >= 0) {
     is(p2.hasWidget(), false, "Mac does not support windowed plugins");
   } else if (navigator.platform.indexOf("Win") >= 0) {
-    is(p2.hasWidget(), false, "Windows does not support windowed plugins (yet)");
+    is(p2.hasWidget(), true, "Windows supports windowed plugins");
   } else if (navigator.platform.indexOf("Linux") >= 0) {
     is(p2.hasWidget(), true, "Linux supports windowed plugins");
   }
 
   SimpleTest.finish();
 }
 ]]>
 </script>
--- a/modules/plugin/test/testplugin/nptest_windows.cpp
+++ b/modules/plugin/test/testplugin/nptest_windows.cpp
@@ -119,18 +119,18 @@ pluginDraw(InstanceData* instanceData)
   GdiplusStartupInput gdiplusStartupInput;
   ULONG_PTR gdiplusToken;
   GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
 
   // When we have a widget, window.x/y are meaningless since our widget
   // is always positioned correctly and we just draw into it at 0,0.
   int x = instanceData->hasWidget ? 0 : instanceData->window.x;
   int y = instanceData->hasWidget ? 0 : instanceData->window.y;
-  int width = instanceData->window.width - 1;
-  int height = instanceData->window.height - 1;
+  int width = instanceData->window.width;
+  int height = instanceData->window.height;
 
   // Calculate the rectangle coordinates from the instanceData information
   Rect rect(x, y, width, height);
 
   // Create a layout rect for the text
   RectF boundRect((float)x, (float)y, (float)width, (float)height);
   boundRect.Inflate(-10.0, -10.0);