Skip to content

Commit

Permalink
Add mojo binding for the language detection in workers
Browse files Browse the repository at this point in the history
The CL adds mojo binding for the language detection in workers. This
will fix the test failures in the corresponding WPT tests.
The CL also updates the WPT test to run in all types of workers.

Bug: 368206184, 388961572
Change-Id: I45f0632bd7df1ed403f88b398494019ea7a35679
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6148112
Reviewed-by: Hidehiko Abe <[email protected]>
Reviewed-by: Tsuyoshi Horo <[email protected]>
Commit-Queue: Jiacheng Guo <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1404644}
  • Loading branch information
gjc13 authored and chromium-wpt-export-bot committed Jan 10, 2025
1 parent acb6ee3 commit 7a2658a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ai/language_detection/capabilities.tentative.https.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// META: title=capabilities test
// META: global=window,worker

'use strict';

Expand All @@ -7,4 +8,4 @@ promise_test(async t => {
const availability = languageDetectorCapabilities.available;
assert_not_equals(availability, "no");
// TODO(crbug.com/349927087): Add languageDetectorCapabilities.languageAvailable("en") once implemented.
});
});
3 changes: 2 additions & 1 deletion ai/language_detection/detector.https.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// META: title=Detect english
// META: global=window,worker

'use strict';

Expand All @@ -11,4 +12,4 @@ promise_test(async t => {
for (let i = 0; i < results.length - 1; i++) {
assert_greater_than_equal(results[i].confidence, results[i + 1].confidence);
}
});
});

0 comments on commit 7a2658a

Please sign in to comment.