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 @@ ...@@ -6,7 +6,7 @@
[ [
SecureContext, SecureContext,
Exposed=(Window,Worker), Exposed=(Window,Worker),
RuntimeEnabled=LocksAPI OriginTrialEnabled=WebLocksAPI
] interface Lock { ] interface Lock {
readonly attribute DOMString name; readonly attribute DOMString name;
readonly attribute LockMode mode; readonly attribute LockMode mode;
......
...@@ -8,7 +8,7 @@ callback LockGrantedCallback = any (Lock lock); ...@@ -8,7 +8,7 @@ callback LockGrantedCallback = any (Lock lock);
[ [
SecureContext, SecureContext,
Exposed=(Window,Worker), Exposed=(Window,Worker),
RuntimeEnabled=LocksAPI OriginTrialEnabled=WebLocksAPI
] interface LockManager { ] interface LockManager {
[CallWith=ScriptState, RaisesException, Measure] Promise<Lock> request( [CallWith=ScriptState, RaisesException, Measure] Promise<Lock> request(
DOMString name, DOMString name,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
SecureContext, SecureContext,
Exposed=Window, Exposed=Window,
ImplementedAs=NavigatorLocks, ImplementedAs=NavigatorLocks,
RuntimeEnabled=LocksAPI OriginTrialEnabled=WebLocksAPI
] partial interface Navigator { ] partial interface Navigator {
[CallWith=ScriptState] readonly attribute LockManager locks; [CallWith=ScriptState] readonly attribute LockManager locks;
}; };
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
SecureContext, SecureContext,
Exposed=Worker, Exposed=Worker,
ImplementedAs=NavigatorLocks, ImplementedAs=NavigatorLocks,
RuntimeEnabled=LocksAPI OriginTrialEnabled=WebLocksAPI
] partial interface WorkerNavigator { ] partial interface WorkerNavigator {
[CallWith=ScriptState] readonly attribute LockManager locks; [CallWith=ScriptState] readonly attribute LockManager locks;
}; };
...@@ -555,10 +555,6 @@ ...@@ -555,10 +555,6 @@
name: "LoadingWithMojo", name: "LoadingWithMojo",
status: "stable", status: "stable",
}, },
{
name: "LocksAPI",
status: "experimental",
},
{ {
name: "LongTaskObserver", name: "LongTaskObserver",
status: "stable", status: "stable",
...@@ -1175,6 +1171,11 @@ ...@@ -1175,6 +1171,11 @@
{ {
name: "WebGLImageChromium", name: "WebGLImageChromium",
}, },
{
name: "WebLocksAPI",
origin_trial_feature_name: "WebLocksAPI",
status: "experimental",
},
{ {
name: "WebNFC", name: "WebNFC",
status: "experimental", 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