OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test/render_widget_browsertest.h" | 5 #include "content/public/test/render_widget_browsertest.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "content/common/view_messages.h" | 12 #include "content/common/view_messages.h" |
13 #include "content/renderer/render_view_impl.h" | 13 #include "content/renderer/render_view_impl.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "third_party/skia/include/core/SkBitmap.h" | 15 #include "third_party/skia/include/core/SkBitmap.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
18 #include "ui/gfx/codec/jpeg_codec.h" | 18 #include "ui/gfx/codec/jpeg_codec.h" |
19 #include "ui/gfx/size.h" | 19 #include "ui/gfx/size.h" |
20 #include "ui/surface/transport_dib.h" | 20 #include "ui/surface/transport_dib.h" |
21 | 21 |
| 22 namespace content { |
| 23 |
22 const int RenderWidgetTest::kNumBytesPerPixel = 4; | 24 const int RenderWidgetTest::kNumBytesPerPixel = 4; |
23 const int RenderWidgetTest::kLargeWidth = 1024; | 25 const int RenderWidgetTest::kLargeWidth = 1024; |
24 const int RenderWidgetTest::kLargeHeight = 768; | 26 const int RenderWidgetTest::kLargeHeight = 768; |
25 const int RenderWidgetTest::kSmallWidth = 600; | 27 const int RenderWidgetTest::kSmallWidth = 600; |
26 const int RenderWidgetTest::kSmallHeight = 450; | 28 const int RenderWidgetTest::kSmallHeight = 450; |
27 const int RenderWidgetTest::kTextPositionX = 800; | 29 const int RenderWidgetTest::kTextPositionX = 800; |
28 const int RenderWidgetTest::kTextPositionY = 600; | 30 const int RenderWidgetTest::kTextPositionY = 600; |
29 const uint32 RenderWidgetTest::kRedARGB = 0xFFFF0000; | 31 const uint32 RenderWidgetTest::kRedARGB = 0xFFFF0000; |
30 | 32 |
31 RenderWidgetTest::RenderWidgetTest() {} | 33 RenderWidgetTest::RenderWidgetTest() {} |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 &bitmap_data->data())); | 144 &bitmap_data->data())); |
143 ASSERT_LT(0, file_util::WriteFile( | 145 ASSERT_LT(0, file_util::WriteFile( |
144 file_path, | 146 file_path, |
145 reinterpret_cast<const char*>(bitmap_data->front()), | 147 reinterpret_cast<const char*>(bitmap_data->front()), |
146 bitmap_data->size())); | 148 bitmap_data->size())); |
147 } | 149 } |
148 | 150 |
149 TEST_F(RenderWidgetTest, OnMsgPaintAtSize) { | 151 TEST_F(RenderWidgetTest, OnMsgPaintAtSize) { |
150 TestResizeAndPaint(); | 152 TestResizeAndPaint(); |
151 } | 153 } |
| 154 |
| 155 } // namespace content |
OLD | NEW |