feat(extension): add host environment and WebView page events (#1527)

This commit is contained in:
Levi authored and GitHub committed 2026-09-18 23:21:53 +08:00
1 parent 5d8267fa56
commit 49aab4ea7c
31 files changed
+1480 -184

No files matched your search

+17
View File
@@ -77,6 +77,8 @@ jobs:
include:
- name: Windows
os: windows-latest
- name: Linux
os: ubuntu-latest
- name: macOS
os: macos-latest
runs-on: ${{ matrix.os }}
@@ -89,6 +91,21 @@ jobs:
if: runner.os == 'macOS'
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Install Linux WebView dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev xvfb
- name: Test webview
if: runner.os == 'Linux'
# Match the full suite's coverage instrumentation and repeat on the same
# GTK event loop to catch queued callbacks after engine destruction.
run: |
PACKAGES=$(go list ./... | awk '!/\/bind\// && (!/\/cmd\// || /\/cmd\/web$/)')
go test -c -tags webview -coverpkg=$(echo "$PACKAGES" | paste -sd "," -) -covermode=count -o "$RUNNER_TEMP/goprovider.test" ./internal/webview/goprovider
xvfb-run -a "$RUNNER_TEMP/goprovider.test" -test.v -test.count=5 -test.timeout=300s -test.coverprofile="$RUNNER_TEMP/webview-coverage.out"
env:
CGO_ENABLED: 1
- name: Test webview
if: runner.os == 'Windows'
# Repeat close/reopen coverage to catch browser shutdown races.