Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: content/public/test/render_widget_test.h

Issue 14779010: Don't expect ack for ViewMsg_OnResize if backing size is empty (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep short_circuit_size_update condition Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 24 matching lines...) Expand all
35 // in the given bitmap. The widget is resized to |page_size| before we paint 35 // in the given bitmap. The widget is resized to |page_size| before we paint
36 // and the final image is resized to |desired_size|. This method is virtual so 36 // and the final image is resized to |desired_size|. This method is virtual so
37 // that TestResizeAndPaint() can be reused by subclasses of this test class. 37 // that TestResizeAndPaint() can be reused by subclasses of this test class.
38 virtual void ResizeAndPaint(const gfx::Size& page_size, 38 virtual void ResizeAndPaint(const gfx::Size& page_size,
39 const gfx::Size& desired_size, 39 const gfx::Size& desired_size,
40 SkBitmap* snapshot); 40 SkBitmap* snapshot);
41 41
42 // Test for ResizeAndPaint. 42 // Test for ResizeAndPaint.
43 void TestResizeAndPaint(); 43 void TestResizeAndPaint();
44 44
45 // Test for OnResize and Resize.
46 void TestOnResize();
47
45 // Helper function which returns true if the given bitmap contains the given 48 // Helper function which returns true if the given bitmap contains the given
46 // ARGB color and false otherwise. 49 // ARGB color and false otherwise.
47 bool ImageContainsColor(const SkBitmap& bitmap, uint32 argb_color); 50 bool ImageContainsColor(const SkBitmap& bitmap, uint32 argb_color);
48 51
49 // This can be used for debugging if you want to output a bitmap 52 // This can be used for debugging if you want to output a bitmap
50 // image to a file. 53 // image to a file.
51 // FilePath tmp_path; 54 // FilePath tmp_path;
52 // file_util::CreateTemporaryFile(&tmp_path); 55 // file_util::CreateTemporaryFile(&tmp_path);
53 // OutputBitmapToFile(bitmap, tmp_path); 56 // OutputBitmapToFile(bitmap, tmp_path);
54 // LOG(INFO) << "Bitmap image stored at: " << tmp_path.value(); 57 // LOG(INFO) << "Bitmap image stored at: " << tmp_path.value();
55 void OutputBitmapToFile(const SkBitmap& bitmap, 58 void OutputBitmapToFile(const SkBitmap& bitmap,
56 const base::FilePath& file_path); 59 const base::FilePath& file_path);
57 }; 60 };
58 61
59 } // namespace content 62 } // namespace content
60 63
61 #endif // CONTENT_PUBLIC_TEST_RENDER_WIDGET_TEST_H_ 64 #endif // CONTENT_PUBLIC_TEST_RENDER_WIDGET_TEST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | content/public/test/render_widget_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698