[Fuchsia] use scenic ozone platform by default.
Previously headless ozone platform was used on Fuchsia. Switched it to
scenic. content_unittests fail with scenic, so this change also adds
--ozone-platforms=headless flag in the unittests, until this issue
is resolved.
Bug: 829980, 865172
Change-Id: I8a0b282953cf90554dc78ed1575d927b53374c58
Reviewed-on: https://chromium-review.googlesource.com/1142492
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576360}
diff --git a/content/public/test/DEPS b/content/public/test/DEPS
index 2d9bcea03..8acc5a4 100644
--- a/content/public/test/DEPS
+++ b/content/public/test/DEPS
@@ -10,6 +10,7 @@
"+services/network",
"+services/resource_coordinator",
"+services/service_manager",
+ "+ui/ozone/public",
"+v8/include/v8.h",
]
diff --git a/content/public/test/unittest_test_suite.cc b/content/public/test/unittest_test_suite.cc
index 805c77e..656a011d 100644
--- a/content/public/test/unittest_test_suite.cc
+++ b/content/public/test/unittest_test_suite.cc
@@ -21,18 +21,28 @@
#include "ui/gfx/x/x11.h"
#endif
+#if defined(OS_FUCHSIA)
+#include "ui/ozone/public/ozone_switches.h"
+#endif
+
namespace content {
UnitTestTestSuite::UnitTestTestSuite(base::TestSuite* test_suite)
: test_suite_(test_suite) {
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
std::string enabled =
command_line->GetSwitchValueASCII(switches::kEnableFeatures);
std::string disabled =
command_line->GetSwitchValueASCII(switches::kDisableFeatures);
feature_list_.InitFromCommandLine(enabled, disabled);
+#if defined(OS_FUCHSIA)
+ // Use headless ozone platform on Fuchsia by default.
+ // TODO(crbug.com/865172): Remove this flag.
+ if (!command_line->HasSwitch(switches::kOzonePlatform))
+ command_line->AppendSwitchASCII(switches::kOzonePlatform, "headless");
+#endif
+
#if defined(USE_X11)
XInitThreads();
#endif
diff --git a/ui/ozone/ozone.gni b/ui/ozone/ozone.gni
index b479be6..eba8ef2 100644
--- a/ui/ozone/ozone.gni
+++ b/ui/ozone/ozone.gni
@@ -72,12 +72,8 @@
ozone_platform = "windows"
ozone_platform_windows = true
} else if (is_fuchsia) {
- # TODO(crbug.com/829980): Uncomment this line to set scenic as default
- # on fuchsia. Currently this breaks content_unittests on test bots.
- #
- # ozone_platform = "scenic"
+ ozone_platform = "scenic"
ozone_platform_scenic = true
-
ozone_platform_magma = true
}
}