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

Unified Diff: components/html_viewer/run_all_unittests.cc

Issue 1407073002: Adds GetDisplays() to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 5 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
« no previous file with comments | « components/html_viewer/global_state.cc ('k') | components/mus/example/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/run_all_unittests.cc
diff --git a/components/html_viewer/run_all_unittests.cc b/components/html_viewer/run_all_unittests.cc
index 537e378e09ee1c6a84a080a4f32000e654e002f3..9a208e1195ec902dfa73e82af4e00b16a3b6de0f 100644
--- a/components/html_viewer/run_all_unittests.cc
+++ b/components/html_viewer/run_all_unittests.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <vector>
+
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/path_service.h"
@@ -9,6 +11,7 @@
#include "base/test/test_suite.h"
#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/gfx/display.h"
#include "ui/gfx/geometry/size.h"
#include "ui/mojo/init/ui_init.h"
@@ -20,11 +23,17 @@
namespace {
+std::vector<gfx::Display> GetTestDisplays() {
+ std::vector<gfx::Display> displays(1);
+ displays[0].set_id(2000);
+ displays[0].SetScaleAndBounds(1., gfx::Rect(0, 0, 800, 600));
+ return displays;
+}
+
class NoAtExitBaseTestSuite : public base::TestSuite {
public:
NoAtExitBaseTestSuite(int argc, char** argv)
- : base::TestSuite(argc, argv, false),
- ui_init_(gfx::Size(800, 600), 1.f) {
+ : base::TestSuite(argc, argv, false), ui_init_(GetTestDisplays()) {
#if defined(OS_ANDROID)
base::MemoryMappedFile::Region resource_file_region;
int fd = base::android::OpenApkAsset("assets/html_viewer.pak",
« no previous file with comments | « components/html_viewer/global_state.cc ('k') | components/mus/example/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698