Automatic update from web-platform-tests [WebMCP] Convert imperative WPT tests from .window.js to .html This patch converts several WebMCP imperative tests from the .window.js format to explicit .html files. This provides more direct control over the test environment. Additionally, the non-secure context test is updated to correctly check for the absence of `document.modelContext` instead of `navigator.modelContext`. Bug: 489045948 Change-Id: I4b8eefab324743f86373d2cd17971545c9695013 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7955418 Reviewed-by: Dominic Farolino <dom@chromium.org> Commit-Queue: Fr <beaufort.francois@gmail.com> Cr-Commit-Position: refs/heads/main@{#1648236} -- wpt-commits: 7d04e7ec0f6662b086456d286619f6bd0240961e wpt-pr: 60687
21 lines
527 B
HTML
21 lines
527 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>WebMCP modelContext interface</title>
|
|
<link rel="author" href="mailto:dom@chromium.org">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
test(() => {
|
|
assert_true(document.modelContext instanceof ModelContext);
|
|
}, 'document.modelContext instanceof ModelContext');
|
|
|
|
test(() => {
|
|
assert_equals(document.modelContext, document.modelContext);
|
|
}, 'document.modelContext SameObject');
|
|
</script>
|
|
</body>
|
|
</html>
|