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 #ifndef CONTENT_PUBLIC_TEST_RENDER_WIDGET_TEST_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_RENDER_WIDGET_TEST_H_ |
6 #define CONTENT_PUBLIC_TEST_RENDER_WIDGET_TEST_H_ | 6 #define CONTENT_PUBLIC_TEST_RENDER_WIDGET_TEST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "content/public/test/render_view_test.h" | 10 #include "content/public/test/render_view_test.h" |
11 | 11 |
12 class SkBitmap; | 12 class SkBitmap; |
| 13 struct ViewMsg_Resize_Params; |
13 | 14 |
14 namespace gfx { | 15 namespace gfx { |
15 class Size; | 16 class Size; |
16 } | 17 } |
17 | 18 |
18 namespace content { | 19 namespace content { |
| 20 class RenderWidget; |
19 | 21 |
20 class RenderWidgetTest : public RenderViewTest { | 22 class RenderWidgetTest : public RenderViewTest { |
21 public: | 23 public: |
22 RenderWidgetTest(); | 24 RenderWidgetTest(); |
23 | 25 |
24 protected: | 26 protected: |
| 27 RenderWidget* widget(); |
| 28 void OnResize(const ViewMsg_Resize_Params& params); |
| 29 bool next_paint_is_resize_ack(); |
| 30 |
25 static const int kNumBytesPerPixel; | 31 static const int kNumBytesPerPixel; |
26 static const int kLargeWidth; | 32 static const int kLargeWidth; |
27 static const int kLargeHeight; | 33 static const int kLargeHeight; |
28 static const int kSmallWidth; | 34 static const int kSmallWidth; |
29 static const int kSmallHeight; | 35 static const int kSmallHeight; |
30 static const int kTextPositionX; | 36 static const int kTextPositionX; |
31 static const int kTextPositionY; | 37 static const int kTextPositionY; |
32 static const uint32 kRedARGB; | 38 static const uint32 kRedARGB; |
33 | |
34 // Test for OnResize and Resize. | |
35 void TestOnResize(); | |
36 }; | 39 }; |
37 | 40 |
38 } // namespace content | 41 } // namespace content |
39 | 42 |
40 #endif // CONTENT_PUBLIC_TEST_RENDER_WIDGET_TEST_H_ | 43 #endif // CONTENT_PUBLIC_TEST_RENDER_WIDGET_TEST_H_ |
OLD | NEW |