Commit 1821a613 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Files app: Fix FilesAppEntryTypes test

Rename the test FilesAppEntryTypes because the flake was due to the
dep `:files_app_entry_types_unittest.m` being commented out, which is
fixed in this CL.

Change js_test_gen_html() build rule to use `invoker.js_module` instead
of `forward_variables_from()` because when there was multiple files in
the same build target, it was failing with this error:

```
ERROR at //ui/file_manager/base/gn/js_test_gen_html.gni:117:39: Clobbering existing value.
    forward_variables_from(invoker, [ "js_module" ])
                                      ^----------
The current scope already defines a value "js_module".
forward_variables_from() won't clobber existing values. If you want to
merge lists, you'll need to do this explicitly.
```

Bug: 1146484
Change-Id: Ifcf3105ef5f63d6d2e9e2ec9ce8cad7813b4cd38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2525473
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarJeremie Boulic <jboulic@chromium.org>
Commit-Queue: Jeremie Boulic <jboulic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825269}
parent 1e60a66e
...@@ -95,7 +95,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerJsTest, FileOperationManagerTest) { ...@@ -95,7 +95,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerJsTest, FileOperationManagerTest) {
} }
// TODO(crbug.com/1146484): Test is flaky. // TODO(crbug.com/1146484): Test is flaky.
IN_PROC_BROWSER_TEST_F(FileManagerJsTest, DISABLED_FilesAppEntryTypes) { IN_PROC_BROWSER_TEST_F(FileManagerJsTest, FilesAppEntryTypes) {
RunTestURL("common/js/files_app_entry_types_unittest.m_gen.html"); RunTestURL("common/js/files_app_entry_types_unittest.m_gen.html");
} }
......
...@@ -114,9 +114,8 @@ template("js_test_gen_html") { ...@@ -114,9 +114,8 @@ template("js_test_gen_html") {
foreach(dep, invoker.deps) { foreach(dep, invoker.deps) {
type_check_target_name = target_name + "_" + dep + "_type_check_auto" type_check_target_name = target_name + "_" + dep + "_type_check_auto"
type_check_deps += [ ":$type_check_target_name" ] type_check_deps += [ ":$type_check_target_name" ]
forward_variables_from(invoker, [ "js_module" ])
js_type_check(type_check_target_name) { js_type_check(type_check_target_name) {
if (defined(js_module) && js_module) { if (defined(invoker.js_module) && invoker.js_module) {
uses_js_modules = true uses_js_modules = true
} }
testonly = true testonly = true
......
...@@ -282,8 +282,8 @@ js_unittest("util_unittest.m") { ...@@ -282,8 +282,8 @@ js_unittest("util_unittest.m") {
js_test_gen_html("js_test_gen_html_modules") { js_test_gen_html("js_test_gen_html_modules") {
js_module = true js_module = true
deps = [ deps = [
":files_app_entry_types_unittest.m",
":util_unittest.m", ":util_unittest.m",
# ":files_app_entry_types_unittest.m",
] ]
closure_flags = closure_flags =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment