From 124b4af50dc99d22bbe75f48af8a4adf55138c75 Mon Sep 17 00:00:00 2001 From: Goktug Gokdogan Date: Mon, 2 Dec 2024 11:53:43 -0800 Subject: [PATCH] Explicitly set browser for uncompiled test. This is to ensure JRE is tested with a proper browser. CL also removes the dev browser for Wasm tests from open-source since it is pointing to the same Chrome version and we don't need that kind of coverage externally. CL also configures the workspace to enable webdriver browsers. PiperOrigin-RevId: 702039849 --- WORKSPACE | 6 ++++++ jre/javatests/j2cl_multi_test.bzl | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WORKSPACE b/WORKSPACE index 3d89af25fb..2276260c09 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -5,3 +5,9 @@ load_j2cl_repo_deps() load("//build_defs:workspace.bzl", "setup_j2cl_workspace") setup_j2cl_workspace() + +# Needed to run unit tests in Chrome. +load("@io_bazel_rules_closure//closure:defs.bzl", "setup_web_test_repositories") +setup_web_test_repositories( + chromium = True, +) diff --git a/jre/javatests/j2cl_multi_test.bzl b/jre/javatests/j2cl_multi_test.bzl index 7799efa67e..5559a009d7 100644 --- a/jre/javatests/j2cl_multi_test.bzl +++ b/jre/javatests/j2cl_multi_test.bzl @@ -24,6 +24,9 @@ def j2cl_multi_test(name, test_class, deps, enable_jvm = True, enable_j2kt_nativ test_class = test_class, generate_build_test = False, runtime_deps = j2cl_deps, + browsers = [ + "//build_defs/internal_do_not_use/browser:chrome-wasm-linux", + ], **kwargs ) j2cl_test( @@ -66,7 +69,6 @@ def j2cl_multi_test(name, test_class, deps, enable_jvm = True, enable_j2kt_nativ wasm_defs = j2wasm_defines, browsers = [ "//build_defs/internal_do_not_use/browser:chrome-wasm-linux", - "//build_defs/internal_do_not_use/browser:chrome-wasm-dev-linux", ], **kwargs )