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

Unified Diff: services/ui/ws/frame_generator_unittest.cc

Issue 2445873003: Pass root ServerWindow id to FrameGenerator. (Closed)
Patch Set: Change back to const ref. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: services/ui/ws/frame_generator_unittest.cc
diff --git a/services/ui/ws/frame_generator_unittest.cc b/services/ui/ws/frame_generator_unittest.cc
index bd72df778dd92e5f07698e2f92e2383d2a4e67b7..659583efbaf68a0cd4add0d2d1db3ce921f90160 100644
--- a/services/ui/ws/frame_generator_unittest.cc
+++ b/services/ui/ws/frame_generator_unittest.cc
@@ -10,6 +10,7 @@
#include "cc/quads/render_pass.h"
#include "cc/quads/shared_quad_state.h"
#include "services/ui/surfaces/display_compositor.h"
+#include "services/ui/ws/ids.h"
#include "services/ui/ws/platform_display_init_params.h"
#include "services/ui/ws/server_window.h"
#include "services/ui/ws/server_window_compositor_frame_sink_manager.h"
@@ -22,6 +23,9 @@ namespace ws {
namespace test {
namespace {
+// Typical id for the display root ServerWindow.
+constexpr WindowId kRootDisplayId(0, 2);
+
// Makes the window visible and creates the default surface for it.
void InitWindow(ServerWindow* window) {
window->SetVisible(true);
@@ -77,7 +81,7 @@ void FrameGeneratorTest::SetUp() {
base::MakeUnique<ServerWindow>(&window_delegate_, WindowId()));
PlatformDisplayInitParams init_params;
frame_generator_ = base::MakeUnique<FrameGenerator>(
- frame_generator_delegate_.get(), display_compositor_);
+ frame_generator_delegate_.get(), kRootDisplayId, display_compositor_);
InitWindow(root_window());
}

Powered by Google App Engine
This is Rietveld 408576698