1.9 KiB
1.9 KiB
allowed-tools, description
| allowed-tools | description |
|---|---|
| Bash(cargo test:*), | Create new tests |
- Reading $ARGUMENTS and understanding the implementation details.
- Creating new tests for $ARGUMENTS in
testsmodule in the same file. - Run
cargo test --workspace --all-featuresto ensure all tests pass. - If any tests fail, fix the issues and re-run the tests.
Contracts
- You have to write the rust-doc that describes the test case for each test function.
以下の手順で問題を修正してください。
現在発生している問題
以下のようなHTMLにCEFのカスタムリソースハンドラを使ってcef://localhost/brp.html経由でアクセスしています。
このHTMLからvideoリソースを読み込むと、cef://localhost/test.movというリクエストURLでローカルResourceHandlerのopenメソッドが呼ばれ、response_headers, readメソッドでヘッダーとレスポンスボディが返されることが期待されます。
初回と2回目までのreadメソッドは呼ばれるのですが、3回目以降のreadメソッドが呼ばれず、何度もopenメソッドが呼ばれてしまっているため、正常にレスポンスが返却できるように修正してください。
<html>
<body>
<video controls>
<source src="test.mov">
</video>
</body>
</html>
手順
- CEFのResourceHandlerの仕様を深く読み込み理解する
crates/bevy_cef_core/src/browser_process/localhost.rs以下にResourceHandlerを使ってローカルリソースを読み込むコードが書いています。深く読み込んで現状の実装を理解してください。- openメソッドが複数回呼ばれ、readメソッドが3回目以降呼ばれない原因を調査する
- 原因を特定し、修正する