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

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

Issue 2654173002: Revert to using on-disk catalog manifest for views mus tests (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 50c0c926eb1bef83ec35fe7277f276652603aada..57776440cbec6e94308fc9e3fbe6ee2fbe5c8271 100644
--- a/ui/views/mus/views_mus_test_suite.cc
+++ b/ui/views/mus/views_mus_test_suite.cc
@@ -9,7 +9,6 @@
#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"
@@ -36,12 +35,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))
@@ -108,8 +107,8 @@ class ServiceManagerConnection {
ServiceManagerConnection()
: thread_("Persistent service_manager connections"),
ipc_thread_("IPC thread") {
- catalog::Catalog::SetDefaultCatalogManifest(
- base::JSONReader::Read(kViewsMusTestCatalog));
+ catalog::Catalog::LoadDefaultCatalogManifest(
+ base::FilePath(kCatalogFilename));
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