| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/render_widget_browsertest.h" | 5 #include "content/renderer/render_widget_browsertest.h" |
| 6 | 6 |
| 7 #include "app/surface/transport_dib.h" | 7 #include "app/surface/transport_dib.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/ref_counted_memory.h" | 11 #include "base/ref_counted_memory.h" |
| 12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
| 13 #include "chrome/common/render_messages.h" | 13 #include "content/common/view_messages.h" |
| 14 #include "chrome/common/render_messages_params.h" | |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "third_party/skia/include/core/SkBitmap.h" | 15 #include "third_party/skia/include/core/SkBitmap.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 19 #include "ui/gfx/codec/jpeg_codec.h" | 18 #include "ui/gfx/codec/jpeg_codec.h" |
| 20 #include "ui/gfx/size.h" | 19 #include "ui/gfx/size.h" |
| 21 | 20 |
| 22 const int RenderWidgetTest::kNumBytesPerPixel = 4; | 21 const int RenderWidgetTest::kNumBytesPerPixel = 4; |
| 23 const int RenderWidgetTest::kLargeWidth = 1024; | 22 const int RenderWidgetTest::kLargeWidth = 1024; |
| 24 const int RenderWidgetTest::kLargeHeight = 768; | 23 const int RenderWidgetTest::kLargeHeight = 768; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 &bitmap_data->data)); | 140 &bitmap_data->data)); |
| 142 ASSERT_LT(0, file_util::WriteFile( | 141 ASSERT_LT(0, file_util::WriteFile( |
| 143 file_path, | 142 file_path, |
| 144 reinterpret_cast<const char*>(bitmap_data->front()), | 143 reinterpret_cast<const char*>(bitmap_data->front()), |
| 145 bitmap_data->size())); | 144 bitmap_data->size())); |
| 146 } | 145 } |
| 147 | 146 |
| 148 TEST_F(RenderWidgetTest, OnMsgPaintAtSize) { | 147 TEST_F(RenderWidgetTest, OnMsgPaintAtSize) { |
| 149 TestResizeAndPaint(); | 148 TestResizeAndPaint(); |
| 150 } | 149 } |
| OLD | NEW |