JS test: Home carries only Library's desktop background ticket

オープン 初心者向け
#427 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, node.js
領域
frontend, testing

調査の方向性

capsules/home/browser/home-shell-host.js と capsules/library/browser/src/api.js を読み、その後、既存の Node テスト設定を確認します。fetch、postMessage、フレームのコンテキストをスタブ化して、チケットの転送、他のアプリの拒否、余分なキーと無効なチケット、および Library のチケット要求の失敗を網羅します。これらのブラウザー動作がテストでカバーされ、Home が起動トークンを決して送信しない状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Found in the review of #67 (Set as Desktop Background from Library).

Runtime's side is tested in elastos/crates/elastos-server/src/api/gateway_tests/home_system.rs (test_home_background_from_object_ticket_is_single_use_and_short_lived). The browser side has no test:

  • capsules/library/browser/src/api.js setDesktopBackground asks /api/apps/library/desktop-background-ticket with Library's own token, then posts home:set-desktop-background with { uri, requestId, ticket }.
  • capsules/home/browser/home-shell-host.js handleSetDesktopBackgroundMessage accepts the message only from a launched Library app frame, with exactly those keys and a 43-character base64url ticket, and posts { source_uri, library_ticket }. It must never send the frame's launch token (context.homeToken).

What to do: a node test (stubbed fetch, postMessage and frame context) that proves Home sends the ticket and not the launch token, refuses the message from any other app or with extra keys or a bad ticket, and that Library sends no message when the ticket request fails.

主要言語
Rust
スター
6
フォーク
2
平均マージ
1日 3時間
マージ済み PR(30日)
42

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

elastos/elastos-runtime のほかの issue

elastos/elastos-runtime の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。