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

Unified Diff: cc/test/layer_test_common.h

Issue 2468423004: Left side vertical MD scrollbars grow toward right. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_scrollbar.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_test_common.h
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index cc5f563920c3c89f5d62f86d8ec67543bd38294b..279c30c132fa11cc51883c64d754f6cfeee562fd 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -102,6 +102,15 @@ class LayerTestCommon {
return ptr;
}
+ template <typename T, typename A, typename B, typename C>
+ T* AddChildToRoot(const A& a, const B& b, const C& c) {
+ std::unique_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
+ layer_impl_id_++, a, b, c);
+ T* ptr = layer.get();
+ root_layer_for_testing()->test_properties()->AddChild(std::move(layer));
+ return ptr;
+ }
+
template <typename T, typename A, typename B, typename C, typename D>
T* AddChildToRoot(const A& a, const B& b, const C& c, const D& d) {
std::unique_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
« no previous file with comments | « cc/test/fake_scrollbar.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698