Repository navigation
test(canvas): use the default runtime context - #1375
Merged
Merged
Conversation
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
#1280 合入的 Canvas 原生代理测试仍引用
PageVmTaskExecutorTestHarness.page_default_context。当前测试执行器已将默认 V8 context 移到page_default_runtime.context,因此 main 的测试目标无法编译,阻塞 #1334、#1335 的 Clippy 和 Nextest。失败位置:
moli-renderer-v8/src/script_vm/tests/canvas_fill_rect.rs:37,编译器报E0609。两个 PR 的四个失败任务均为这一错误。修复
从默认 document runtime 获取 context,沿用 credential 和 gamepad 测试已经采用的访问方式。一行修改,保留原有代理身份、像素结果、品牌检查及参数转换顺序断言。
检查了 renderer 中同名访问;其余使用属于有效的 context host 字段或方法,不需要修改。
验证
cargo nextest run -p moli-renderer-v8 -E 'test(canvas_fill_rect)' --no-fail-fast:4/4 通过,覆盖原生代理、Window/子页面、Worker、绘制像素与导出。