Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
fa76f45
Enable content_browsertests on Starboard
linxinan-yt Dec 20, 2025
e9d3981
fix expectations
linxinan-yt Dec 20, 2025
6b2df8a
Replace testing::AnyNumber() with AtMost(1) for better coverage
linxinan-yt Dec 22, 2025
d2e10e5
Resolve Gemini AI review comments
linxinan-yt Dec 22, 2025
2930b32
Fix media_browsertest
linxinan-yt Dec 22, 2025
7e20174
fix format error
linxinan-yt Dec 22, 2025
c2ed560
fix format
linxinan-yt Dec 22, 2025
6460a88
format again
linxinan-yt Dec 22, 2025
a2f6468
format
linxinan-yt Dec 22, 2025
6111f41
Remove unused files
linxinan-yt Dec 22, 2025
5eda3df
Merge branch 'br' into br2
linxinan-yt Dec 22, 2025
89f556e
Rebase
linxinan-yt Dec 22, 2025
605c9d3
Stop ShellDevToolsManagerDelegate in main function
linxinan-yt Jan 5, 2026
f9c736e
Remove unnecessary changes
linxinan-yt Jan 6, 2026
9731d7d
Remove unnecessary changes
linxinan-yt Jan 6, 2026
5aac5e9
Remove unnecessary changes
linxinan-yt Jan 6, 2026
4ba0291
Merge branch 'br' into br2
linxinan-yt Jan 6, 2026
c1df1c5
[3P] Add touch support (#8502)
Jan 6, 2026
85b1d7a
Merge branch 'br' into br2
linxinan-yt Jan 6, 2026
647e5f8
sth
linxinan-yt Jan 6, 2026
a1ab3f5
Resolve rebase error
linxinan-yt Jan 6, 2026
af976d4
[CI] Increase unit test job timeout (#8493)
isarkis Jan 6, 2026
d0661e6
android: Add missing TextUtils import (#8530)
borongc Jan 7, 2026
4f8abed
tvOS: Initialize Starboard layer from Cobalt Shell (#8462)
rakuco Jan 7, 2026
1826bd3
android: Patch @NullMarked to Cobalt shell (#8503)
borongc Jan 7, 2026
167afba
3P: Update nl_langinfo tests with ICU (#8538)
johnedocampo Jan 7, 2026
b842853
[tvOS][widevine] Use different pthread_setname_np() on Apple platform…
abhijeetk Jan 7, 2026
dc87afa
android: Add feature support for Java code (m138) (#8539)
johnedocampo Jan 7, 2026
f2cf95d
Add github actions precommit check. (#8497)
SortaCookie Jan 7, 2026
27d2c79
cobalt: Refactor command-line logging and add unit test (#8534)
Awallky Jan 7, 2026
d7f504e
content/browser: Add extra tvOS targets to for_content_tests's visibi…
rakuco Jan 7, 2026
f306d9b
tvOS: Add //starboard/shared/posix/system_get_error_string.cc to the …
rakuco Jan 7, 2026
f71144b
Move an impl file's "relevant header" to the top and exclude from cla…
fayev-g Jan 7, 2026
1509f8a
cobalt/test: Update navigation browser tests and test utilities (#8454)
Awallky Jan 8, 2026
8869a5b
cobalt/test: Resolve remaining cobalt_browsertests build/run failures…
Awallky Jan 8, 2026
f8e2243
Pin RDK repo to prep for changes (#8546)
andrewsavage1 Jan 8, 2026
87fd9f2
Add browser tests to main chained (#8457)
Awallky Jan 8, 2026
b1aa099
build: Create separate fake_graphics_context_provider target (#8557)
kjyoun Jan 8, 2026
b3e8fae
Move RDK config variables to shared location (#8548)
andrewsavage1 Jan 8, 2026
458e174
cobalt/test: Disable NavigationBrowserTest.DeprecateUnloadOptOutFlagR…
Awallky Jan 8, 2026
cc5d6f2
[CI] Add branch name label to test invocation (#8564)
isarkis Jan 8, 2026
c92c721
[tvOS] Make the Apple code path in Viz work with video hole quads (#8…
rakuco Jan 8, 2026
853b700
Update python requirements file and update steps (#8552)
arjungm Jan 8, 2026
db94f94
Revert "Add browser tests to main chained" (#8579)
Awallky Jan 8, 2026
830f057
Enable cobalt_browsertests on starboard linux (#8490)
linxinan-yt Jan 8, 2026
3028b1c
android: prevent network dialog flash on cold start (#8562)
ckim1346 Jan 8, 2026
1cea4a1
Merge branch 'main' of github.com:youtube/cobalt into br2
linxinan-yt Jan 8, 2026
9a9eb1f
clean up
linxinan-yt Jan 8, 2026
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
20 changes: 20 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Configuration related to self-hosted runner.
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels:
- chrobalt-linux-runner
- odt-runner

# Path-specific configurations.
paths:
# TODO: Outstanding linting failures
.github/workflows/main.yaml:
# List of regular expressions to filter errors by the error messages.
ignore:
# Ignore the specific error from shellcheck
- 'shellcheck reported issue in this script: (SC2004|SC2086):.+'
.github/workflows/label-cherry-pick.yaml:
# List of regular expressions to filter errors by the error messages.
ignore:
# Ignore the specific error from shellcheck
- 'shellcheck reported issue in this script: (SC2053|SC2076|SC2199|SC2086):.+'
1 change: 1 addition & 0 deletions .github/actions/internal_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ runs:
--label repository-${GITHUB_REPO} \
--label author-${GITHUB_PR_HEAD_USER_LOGIN:-$GITHUB_COMMIT_AUTHOR_USERNAME} \
--label author_id-${GITHUB_PR_HEAD_USER_ID:-$GITHUB_COMMIT_AUTHOR_EMAIL} \
--label branch:${GITHUB_REF_NAME} \
--dimensions '${{ inputs.test_dimensions }}' \
--cobalt_path "${GCS_ARTIFACTS_PATH}" || {
echo "Finished running tests..."
Expand Down
1 change: 1 addition & 0 deletions .github/actions/on_device_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ runs:
--label repository-${GITHUB_REPO} \
--label author-${GITHUB_PR_HEAD_USER_LOGIN:-$GITHUB_COMMIT_AUTHOR_USERNAME} \
--label author_id-${GITHUB_PR_HEAD_USER_ID:-$GITHUB_COMMIT_AUTHOR_EMAIL} \
--label branch:${GITHUB_REF_NAME} \
--dimensions '${{ inputs.test_dimensions }}' \
${TEST_ATTEMPTS:+"--test_attempts" "$TEST_ATTEMPTS"} \
--gcs_archive_path "${GCS_ARTIFACTS_PATH}" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-cherry-pick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
${{ github.event.pull_request.body }}

- name: Comment on failure
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
github-token: ${{ secrets.CHERRY_PICK_TOKEN }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- feature/*

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.label.name || github.event.pull_request.number || github.sha }} @ ${{ github.event.label.name && github.event.pull_request.number || github.event.action }}
group: ${{ github.workflow }}-${{ github.event_name }} @ ${{ github.event.label.name || github.event.pull_request.number || github.sha }} @ ${{ github.event.label.name && github.event.pull_request.number || github.event.action }}
cancel-in-progress: true

permissions: {}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
description: 'Nightly workflow.'
required: true
type: string
default: 'false'
run_api_leak_detector:
description: 'Whether to run the api leak detector.'
required: false
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ repos:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/rhysd/actionlint
rev: 03d0035246f3e81f36aed592ffb4bebf33a03106
hooks:
- id: actionlint
files: ^.github/workflows
- repo: local
hooks:
- id: chromium-pre-commit
Expand Down
3 changes: 2 additions & 1 deletion build/android/gyp/java_cpp_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

class FeatureParserDelegate(java_cpp_utils.CppConstantParser.Delegate):
# Ex. 'BASE_FEATURE(kConstantName, "StringNameOfTheFeature", ...);'
# or 'STARBOARD_FEATURE(kConstantName, "StringNameOfTheFeature", ...);'
# would parse as:
# ExtractConstantName() -> 'ConstantName'
# ExtractValue() -> '"StringNameOfTheFeature"'
FEATURE_RE = re.compile(r'BASE_FEATURE\(k([^,]+),')
FEATURE_RE = re.compile(r'(?:BASE_FEATURE|STARBOARD_FEATURE)\(k([^,]+),')
VALUE_RE = re.compile(r'\s*("(?:\"|[^"])*")\s*,')

def ExtractConstantName(self, line):
Expand Down
3 changes: 3 additions & 0 deletions cobalt/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ if (is_ios && target_platform == "tvos") {
"//cobalt/shell:cobalt_shell_app",
"//cobalt/shell:cobalt_shell_lib",
"//content/public/app",
"//starboard:starboard_group",
]
bundle_deps = [
":cobalt_shell_framework_resources",
Expand Down Expand Up @@ -242,6 +243,7 @@ test("cobalt_unittests") {
"//cobalt/browser/client_hint_headers/cobalt_header_value_provider_test.cc",
"//cobalt/browser/client_hint_headers/cobalt_trusted_header_client_test.cc",
"//cobalt/browser/client_hint_headers/cobalt_trusted_url_loader_header_client_test.cc",
"//cobalt/browser/command_line_logger_unittest.cc",
"//cobalt/browser/experiments/experiment_config_manager_unittest.cc",
"//cobalt/browser/global_features_unittest.cc",
"//cobalt/browser/h5vcc_runtime/deep_link_manager_unittest.cc",
Expand Down Expand Up @@ -270,6 +272,7 @@ test("cobalt_unittests") {
":common",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//cobalt/browser:command_line_logger",
"//cobalt/browser:global_features",
"//cobalt/browser:metrics",
"//cobalt/browser/client_hint_headers",
Expand Down
12 changes: 12 additions & 0 deletions cobalt/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ jinja_template("cobalt_manifest") {
]
}

java_cpp_features("java_features_srcjar") {
# External code should depend on ":cobalt_features_java" instead.
visibility = [ ":*" ]
sources = [ "//starboard/extension/feature_config.h" ]

deps = [ "//starboard/extension:feature_config_header" ]
template = "//cobalt/android/java_templates/StarboardFeatures.java.tmpl"
}

generate_jni("jni_headers") {
sources = [
"apk/app/src/main/java/dev/cobalt/coat/AudioPermissionRequester.java",
Expand All @@ -26,6 +35,7 @@ generate_jni("jni_headers") {
"apk/app/src/main/java/dev/cobalt/coat/ResourceOverlay.java",
"apk/app/src/main/java/dev/cobalt/coat/StarboardBridge.java",
"apk/app/src/main/java/dev/cobalt/coat/javabridge/HTMLMediaElementExtension.java",
"apk/app/src/main/java/dev/cobalt/features/StarboardFeatureList.java",
"apk/app/src/main/java/dev/cobalt/media/AudioOutputManager.java",
"apk/app/src/main/java/dev/cobalt/media/AudioTrackBridge.java",
"apk/app/src/main/java/dev/cobalt/media/MediaCodecBridge.java",
Expand Down Expand Up @@ -100,6 +110,7 @@ android_library("cobalt_main_java") {
}

srcjar_deps = [
":java_features_srcjar",
":jni_headers",
"//starboard/android/shared:java_enums",
]
Expand Down Expand Up @@ -134,6 +145,7 @@ android_library("cobalt_main_java") {
"apk/app/src/main/java/dev/cobalt/coat/javabridge/CobaltJavaScriptInterface.java",
"apk/app/src/main/java/dev/cobalt/coat/javabridge/H5vccPlatformService.java",
"apk/app/src/main/java/dev/cobalt/coat/javabridge/HTMLMediaElementExtension.java",
"apk/app/src/main/java/dev/cobalt/features/StarboardFeatureList.java",
"apk/app/src/main/java/dev/cobalt/libraries/services/clientloginfo/ClientLogInfo.java",
"apk/app/src/main/java/dev/cobalt/libraries/services/clientloginfo/ClientLogInfoModule.java",
"apk/app/src/main/java/dev/cobalt/media/AudioOutputManager.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import android.net.Uri;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,19 @@ public void activeNetworkCheck() {
} else {
handleFailure();
}
// Don't raise the error dialog if the thread is intentionally interrupted.
// Otherwise handleFailure() for timeout exceptions and all other exceptions.
} catch (TimeoutException e) {
handleFailure();
} catch (Exception e) {
if (e instanceof InterruptedException) {
if (e instanceof InterruptedException || e instanceof java.util.concurrent.CancellationException) {
Thread.currentThread().interrupt(); // Preserve interrupt status.
} else {
Log.w(TAG, "Connectivity check failed with exception: " + e.getClass().getName(), e);
handleFailure();
}
Log.w(TAG, "Connectivity check failed with exception: " + e.getClass().getName(), e);
handleFailure();
} finally {
// This is crucial. It ensures the probe thread is discarded.
// Ensuring the probe thread is discarded.
probeExecutor.shutdownNow();
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2025 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package dev.cobalt.features;

import org.chromium.base.FeatureList;
import org.chromium.build.annotations.NullMarked;
import org.jni_zero.JNINamespace;
import org.jni_zero.NativeMethods;

/** A FeatureList for our Starboard features to be used in Java. */
@JNINamespace("starboard::features")
@NullMarked
public class StarboardFeatureList {
private StarboardFeatureList() {}
/**
* Returns whether the specified feature is enabled or not.
*
* Note: This queries features defined with STARBOARD_FEATURE in
* //starboard/extension/feature_config.h
*
* @param featureName The name of the feature to query.
* @return Whether the feature is enabled or not.
*/
public static boolean isEnabled(String featureName) {
assert FeatureList.isNativeInitialized();
return StarboardFeatureListJni.get().isEnabled(featureName);
}

/** Native Methods for StarboardFeatureList. */
@NativeMethods
public interface Natives {
boolean isEnabled(String featureName);
}
}
26 changes: 26 additions & 0 deletions cobalt/android/java_templates/StarboardFeatures.java.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2025 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package dev.cobalt.features;

/**
* Contains features that are specific to Starboard code.
*/
public final class StarboardFeatures {{

{NATIVE_FEATURES}

// Prevents instantiation.
private StarboardFeatures() {{}}
}}
10 changes: 10 additions & 0 deletions cobalt/app/tvos/main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "cobalt/shell/browser/shell.h"
#include "content/public/app/content_main.h"
#include "content/public/app/content_main_runner.h"
#include "starboard/common/command_line.h"
#include "starboard/tvos/shared/application_darwin.h"

static int g_argc = 0;
static const char** g_argv = nullptr;
Expand Down Expand Up @@ -58,6 +60,7 @@ @interface CobaltAppDelegate : UIResponder <UIApplicationDelegate> {
@private
std::unique_ptr<content::ContentMainRunner> _mainRunner;
std::unique_ptr<cobalt::CobaltMainDelegate> _mainDelegate;
std::unique_ptr<starboard::ApplicationDarwin> _starboardApplication;
}
@end

Expand All @@ -80,6 +83,13 @@ - (BOOL)application:(UIApplication*)application
const base::CommandLine::StringVector& processed_argv =
cobalt_cmd_line.argv();

// Initialize ApplicationDarwin before the content layer. This is required to
// enable audio playback via the audio sink, initialize PlaybackCapabilities,
// and set a valid command line, all of which are essential for proper
// operation of the Starboard media renderer.
_starboardApplication = std::make_unique<starboard::ApplicationDarwin>(
std::make_unique<starboard::CommandLine>(processed_argv));

// content::ContentMainParams::argv uses regular char** for `argv`, so perform
// a type conversion here. Note that even though `char_argv` is dependent on
// the function-scoped `processed_argv`, content::RunContentProcess() copies
Expand Down
10 changes: 10 additions & 0 deletions cobalt/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import("//starboard/build/buildflags.gni")
import("//testing/test.gni")

source_set("browser") {
# TODO(cobalt, b/375655377): remove testonly declaration, needed because of
Expand Down Expand Up @@ -42,6 +43,7 @@ source_set("browser") {
public_deps = [ "//content/public/browser" ]

deps = [
":command_line_logger",
":features",
":global_features",
":metrics",
Expand Down Expand Up @@ -150,3 +152,11 @@ source_set("metrics") {
"//url",
]
}

source_set("command_line_logger") {
sources = [
"command_line_logger.cc",
"command_line_logger.h",
]
deps = [ "//base" ]
}
4 changes: 4 additions & 0 deletions cobalt/browser/cobalt_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "cobalt/browser/cobalt_browser_main_parts.h"
#include "cobalt/browser/cobalt_secure_navigation_throttle.h"
#include "cobalt/browser/cobalt_web_contents_observer.h"
#include "cobalt/browser/command_line_logger.h"
#include "cobalt/browser/constants/cobalt_experiment_names.h"
#include "cobalt/browser/features.h"
#include "cobalt/browser/global_features.h"
Expand Down Expand Up @@ -534,6 +535,9 @@ void CobaltContentBrowserClient::CreateFeatureListAndFieldTrials() {
<< "], disable_features=["
<< command_line.GetSwitchValueASCII(::switches::kDisableFeatures)
<< "]";
LOG(INFO) << "CobaltCommandLine: "
<< CommandLineSwitchesToString(
*base::CommandLine::ForCurrentProcess());

// Push the initialized features and params down to Starboard.
features::InitializeStarboardFeatures();
Expand Down
33 changes: 33 additions & 0 deletions cobalt/browser/command_line_logger.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2024 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "cobalt/browser/command_line_logger.h"

#include <vector>

#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"

namespace cobalt {

std::string CommandLineSwitchesToString(const base::CommandLine& command_line) {
std::vector<std::string> switch_strings;
for (const auto& pair : command_line.GetSwitches()) {
switch_strings.push_back(base::StringPrintf(
"'%s': '%s'", pair.first.c_str(), pair.second.c_str()));
}
return base::JoinString(switch_strings, "\n");
}

} // namespace cobalt
29 changes: 29 additions & 0 deletions cobalt/browser/command_line_logger.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2024 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COBALT_BROWSER_COMMAND_LINE_LOGGER_H_
#define COBALT_BROWSER_COMMAND_LINE_LOGGER_H_

#include <string>

#include "base/command_line.h"

namespace cobalt {

// Formats command line switches into a human-readable string for debugging.
std::string CommandLineSwitchesToString(const base::CommandLine& command_line);

} // namespace cobalt

#endif // COBALT_BROWSER_COMMAND_LINE_LOGGER_H_
Loading