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

Unified Diff: content/test/test_blink_web_unit_test_support.cc

Issue 1308053006: CC Animations: Enable external animation host for blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Restore whitespace_file.txt Created 5 years 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 | « content/renderer/render_thread_impl.cc ('k') | content/test/web_layer_tree_view_impl_for_testing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_blink_web_unit_test_support.cc
diff --git a/content/test/test_blink_web_unit_test_support.cc b/content/test/test_blink_web_unit_test_support.cc
index 836e1aa5ccec0fea62eabda2769a3e5475d65862..f2c6f164f09e02f95c2d8b8c3f6dc2d35cb99ef4 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -12,6 +12,9 @@
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/platform_thread.h"
+#include "cc/blink/web_layer_impl.h"
+#include "cc/layers/layer_settings.h"
+#include "cc/trees/layer_tree_settings.h"
#include "components/scheduler/renderer/renderer_scheduler_impl.h"
#include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h"
#include "components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.h"
@@ -119,6 +122,12 @@ TestBlinkWebUnitTestSupport::TestBlinkWebUnitTestSupport() {
blink::WebRuntimeFeatures::enableNotifications(true);
blink::WebRuntimeFeatures::enableTouch(true);
+ // External cc::AnimationHost is enabled for unit tests.
+ cc::LayerSettings layer_settings;
+ layer_settings.use_compositor_animation_timelines = true;
+ cc_blink::WebLayerImpl::SetLayerSettings(layer_settings);
+ blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true);
+
// Initialize libraries for media and enable the media player.
media::InitializeMediaLibrary();
blink::WebRuntimeFeatures::enableMediaPlayer(true);
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/test/web_layer_tree_view_impl_for_testing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698