Commit 9ddeb33a authored by Joshua Bell's avatar Joshua Bell Committed by Commit Bot

Origin Trial for Web Locks API

Bug: 161072
Change-Id: I00c00e649c4248349e24f7a2d9cf2d4de25294ff
Reviewed-on: https://chromium-review.googlesource.com/940334Reviewed-by: default avatarJason Chase <chasej@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Reviewed-by: default avatarIan Clelland <iclelland@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539993}
parent 73513536
This directory is for testing the interfaces that are exposed to the
web for features enabled via origin trial.
Since experimental features are enabled by default when running layout
tests, the tests here will likely pass without an origin trial token.
A virtual test suite (origin-trials-runtimeflags-disabled) covers
this. Depending on the test, it may be necessary to add specific
results in the directory:
LayoutTests/virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/
<!DOCTYPE html>
<meta charset="utf-8">
<!-- Generate token with the command:
generate_token.py http://127.0.0.1:8000 WebLocksAPI --expire-timestamp=2000000000
-- -->
<meta http-equiv="origin-trial" content="Aq40kr/ZTqxmfeh35cvBQcwBrmiL7pSDR6PrUZaVC7xxGe3ff4fECD/TdP+w+Ic9cXZ1ek6N4kg6oR876PQd/QoAAABTeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiV2ViTG9ja3NBUEkiLCAiZXhwaXJ5IjogMjAwMDAwMDAwMH0=" />
<title>Web Locks API - interfaces exposed by origin trial</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/origin-trials-helper.js"></script>
<script>
test(t => {
OriginTrialsHelper.check_properties(this,
{'LockManager': ['request', 'query'],
'Lock': ['name', 'mode'],
});
assert_true('locks' in self.navigator, 'locks property exists on navigator');
}, 'Web Locks API interfaces and properties in Origin-Trial enabled document.');
</script>
......@@ -6,7 +6,7 @@
[
SecureContext,
Exposed=(Window,Worker),
RuntimeEnabled=LocksAPI
OriginTrialEnabled=WebLocksAPI
] interface Lock {
readonly attribute DOMString name;
readonly attribute LockMode mode;
......
......@@ -8,7 +8,7 @@ callback LockGrantedCallback = any (Lock lock);
[
SecureContext,
Exposed=(Window,Worker),
RuntimeEnabled=LocksAPI
OriginTrialEnabled=WebLocksAPI
] interface LockManager {
[CallWith=ScriptState, RaisesException, Measure] Promise<Lock> request(
DOMString name,
......
......@@ -7,7 +7,7 @@
SecureContext,
Exposed=Window,
ImplementedAs=NavigatorLocks,
RuntimeEnabled=LocksAPI
OriginTrialEnabled=WebLocksAPI
] partial interface Navigator {
[CallWith=ScriptState] readonly attribute LockManager locks;
};
......@@ -7,7 +7,7 @@
SecureContext,
Exposed=Worker,
ImplementedAs=NavigatorLocks,
RuntimeEnabled=LocksAPI
OriginTrialEnabled=WebLocksAPI
] partial interface WorkerNavigator {
[CallWith=ScriptState] readonly attribute LockManager locks;
};
......@@ -555,10 +555,6 @@
name: "LoadingWithMojo",
status: "stable",
},
{
name: "LocksAPI",
status: "experimental",
},
{
name: "LongTaskObserver",
status: "stable",
......@@ -1175,6 +1171,11 @@
{
name: "WebGLImageChromium",
},
{
name: "WebLocksAPI",
origin_trial_feature_name: "WebLocksAPI",
status: "experimental",
},
{
name: "WebNFC",
status: "experimental",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment