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

Unified Diff: ui/views/mus/views_mus_test_suite.cc

Issue 2653713004: Add service_test GN template (Closed)
Patch Set: . Created 3 years, 11 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 | « ui/views/mus/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/views_mus_test_suite.cc
diff --git a/ui/views/mus/views_mus_test_suite.cc b/ui/views/mus/views_mus_test_suite.cc
index 57776440cbec6e94308fc9e3fbe6ee2fbe5c8271..50c0c926eb1bef83ec35fe7277f276652603aada 100644
--- a/ui/views/mus/views_mus_test_suite.cc
+++ b/ui/views/mus/views_mus_test_suite.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/json/json_reader.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
@@ -35,12 +36,12 @@
#include "ui/views/views_delegate.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
+// Generated within the ":views_mus_tests_catalog_source" target.
+extern const char kViewsMusTestCatalog[];
+
namespace views {
namespace {
-const base::FilePath::CharType kCatalogFilename[] =
- FILE_PATH_LITERAL("views_mus_tests_catalog.json");
-
void EnsureCommandLineSwitch(const std::string& name) {
base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (!cmd_line->HasSwitch(name))
@@ -107,8 +108,8 @@ class ServiceManagerConnection {
ServiceManagerConnection()
: thread_("Persistent service_manager connections"),
ipc_thread_("IPC thread") {
- catalog::Catalog::LoadDefaultCatalogManifest(
- base::FilePath(kCatalogFilename));
+ catalog::Catalog::SetDefaultCatalogManifest(
+ base::JSONReader::Read(kViewsMusTestCatalog));
mojo::edk::Init();
ipc_thread_.StartWithOptions(
base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
« no previous file with comments | « ui/views/mus/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698