diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-19 20:57:03 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-19 20:57:03 +0000 |
commit | ebd1048ab80dbf90baa05beffe4319cd53920091 (patch) | |
tree | 3fc1740260f8a6498e09d24a9ac3e9906ed06da0 /webkit | |
parent | 5f362e0129c6f92953d1e772d72c07d9f0906ab2 (diff) | |
download | chromium_src-ebd1048ab80dbf90baa05beffe4319cd53920091.zip chromium_src-ebd1048ab80dbf90baa05beffe4319cd53920091.tar.gz chromium_src-ebd1048ab80dbf90baa05beffe4319cd53920091.tar.bz2 |
Shrink the window used for the NPN_ConvertPoint test
The test should now fit on an 800x600 display, which is apparently what the 10.6 bots have.
Removes the FLAKY marker since it should now pass on 10.6 bots.
BUG=36670
TEST=PluginConvertPointTest should pass on 10.6 bots
Review URL: http://codereview.chromium.org/2100008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47720 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/test/plugin_windowless_test.cc | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/webkit/glue/plugins/test/plugin_windowless_test.cc b/webkit/glue/plugins/test/plugin_windowless_test.cc index 7c2e49c..c47c1d7 100644 --- a/webkit/glue/plugins/test/plugin_windowless_test.cc +++ b/webkit/glue/plugins/test/plugin_windowless_test.cc @@ -208,26 +208,36 @@ void WindowlessPluginTest::ConvertPoint(NPNetscapeFuncs* browser) { CGRect main_display_bounds = CGDisplayBounds(CGMainDisplayID()); - // Check that all the coordinates are right. The plugin is in a 600x600 window - // at (100, 100), with a content area origin of (100, 100). - // Y-coordinates are not checked exactly so that the test is robust against - // toolbar changes, info bar visibility, etc. + // Check that all the coordinates are right. The constants below are based on + // the window frame set in the UI test and the content offset in the test + // html. Y-coordinates are not checked exactly so that the test is robust + // against toolbar changes, info and bookmark bar visibility, etc. + const int kWindowHeight = 400; + const int kWindowXOrigin = 50; + const int kWindowYOrigin = 50; + const int kPluginXContentOffset = 50; + const int kPluginYContentOffset = 50; + const int kChromeYTolerance = 200; + std::string error_string; if (screen_x != flipped_screen_x) error_string = "Flipping screen coordinates shouldn't change x"; else if (flipped_screen_y != main_display_bounds.size.height - screen_y) error_string = "Flipped screen coordinates should be flipped vertically"; - else if (screen_x != 200) + else if (screen_x != kWindowXOrigin + kPluginXContentOffset) error_string = "Screen x location is wrong"; - else if (flipped_screen_y < 200 || flipped_screen_y > 400) + else if (flipped_screen_y < kWindowYOrigin + kPluginYContentOffset || + flipped_screen_y > kWindowYOrigin + kPluginYContentOffset + + kChromeYTolerance) error_string = "Screen y location is wrong"; else if (window_x != flipped_window_x) error_string = "Flipping window coordinates shouldn't change x"; - else if (flipped_window_y != 600 - window_y) + else if (flipped_window_y != kWindowHeight - window_y) error_string = "Flipped window coordinates should be flipped vertically"; - else if (window_x != 100) + else if (window_x != kPluginXContentOffset) error_string = "Window x location is wrong"; - else if (flipped_screen_y < 100 || flipped_screen_y > 300) + else if (flipped_window_y < kPluginYContentOffset || + flipped_window_y > kPluginYContentOffset + kChromeYTolerance) error_string = "Window y location is wrong"; if (!error_string.empty()) { |