0

Print Preview: Enable PrintPreviewTest on Linux ASAN.

Fix an easily reproducible crash that happens locally in the PDF plugin.

BUG=375126

Review URL: https://codereview.chromium.org/298803010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275534 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
thestig@chromium.org
2014-06-06 21:49:04 +00:00
parent d9b987584c
commit 5eced8f7e2
2 changed files with 4 additions and 8 deletions
chrome/browser/ui/webui/print_preview
pdf

@ -33,11 +33,6 @@ using task_manager::browsertest_util::MatchAnyTab;
using task_manager::browsertest_util::MatchPrint;
using task_manager::browsertest_util::WaitForTaskManagerRows;
// http://crbug.com/375126: these tests fail after pdf plugin was open sourced.
// They must not have been running before since these bots didn't have the PDf
// plugin.
#if !defined(ADDRESS_SANITIZER)
namespace {
class PrintPreviewTest : public InProcessBrowserTest {
@ -204,5 +199,3 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewTest, NoCrashOnCloseWithOtherTabs) {
#endif
} // namespace
#endif

@ -44,11 +44,14 @@ void Control::PaintMultipleRects(pp::ImageData* image_data,
}
// Some rects in the input list may overlap. To prevent double
// paining (causes problems with semi-transparent controls) we'll
// painting (causes problems with semi-transparent controls) we'll
// paint control into buffer image data only once and copy requested
// rectangles.
pp::ImageData buffer(owner()->GetInstance(), image_data->format(),
rect().size(), false);
if (buffer.is_null())
return;
pp::Rect draw_rc = pp::Rect(image_data->size()).Intersect(rect());
pp::Rect ctrl_rc = pp::Rect(rect().point() - draw_rc.point(), draw_rc.size());
CopyImage(*image_data, draw_rc, &buffer, ctrl_rc, false);