Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed first-run dialog is not launched #9849

Merged
merged 2 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
#if defined(OFFICIAL_BUILD)
#undef BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING
#define BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING() (1)
#define FILE_LOCAL_STATE PATH_END
#endif
#include "../../../../../chrome/browser/first_run/first_run_internal_posix.cc"
#if defined(OFFICIAL_BUILD)
#undef BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING
#undef FILE_LOCAL_STATE
#endif
12 changes: 12 additions & 0 deletions common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,18 @@ config("constants_configs") {
}
}

source_set("unit_tests") {
testonly = true
sources = [ "brave_paths_unittest.cc" ]

deps = [
"//base",
"//brave/common",
"//chrome/common",
"//testing/gtest",
]
}

mojom("mojo_bindings") {
sources = [ "brave_renderer_configuration.mojom" ]

Expand Down
16 changes: 16 additions & 0 deletions common/brave_paths_unittest.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Copyright (c) 2021 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "brave/common/brave_paths.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "chrome/common/chrome_paths.h"
#include "testing/gtest/include/gtest/gtest.h"

TEST(BravePathsTest, PathTest) {
base::FilePath test_dir;
EXPECT_TRUE(base::PathService::Get(brave::DIR_TEST_DATA, &test_dir));
EXPECT_FALSE(base::PathService::Get(chrome::PATH_END, &test_dir));
}
1 change: 1 addition & 0 deletions test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ test("brave_unit_tests") {
"//brave/chromium_src/components/autofill_assistant/browser:unit_tests",
"//brave/common:network_constants",
"//brave/common:pref_names",
"//brave/common:unit_tests",
"//brave/components/adblock_rust_ffi",
"//brave/components/brave_ads/test:brave_ads_unit_tests",
"//brave/components/brave_component_updater/browser",
Expand Down