Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1186)

Unified Diff: third_party/WebKit/Source/core/testing/OriginTrialsTest.idl

Issue 2340323002: Add Origin Trials Test interface, rather than attaching trials directly to internals. (Closed)
Patch Set: Updates Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/testing/OriginTrialsTest.idl
diff --git a/third_party/WebKit/Source/core/testing/OriginTrialsTest.idl b/third_party/WebKit/Source/core/testing/OriginTrialsTest.idl
new file mode 100644
index 0000000000000000000000000000000000000000..626b421470d71dfdf70059a372bd4c5d382c317d
--- /dev/null
+++ b/third_party/WebKit/Source/core/testing/OriginTrialsTest.idl
@@ -0,0 +1,20 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+interface OriginTrialsTest {
+ [OriginTrialEnabled=OriginTrialsSampleAPI] readonly attribute boolean normalAttribute;
+ [OriginTrialEnabled=OriginTrialsSampleAPI] static readonly attribute boolean staticAttribute;
+ [OriginTrialEnabled=OriginTrialsSampleAPI] const unsigned short CONSTANT = 1;
+
+ // This attribute uses native code to test whether the trial is enabled,
+ // and throws an exception in JavaScript if it is not.
+ [CallWith=ScriptState, RaisesException] readonly attribute boolean throwingAttribute;
+
+ // This attribute is available whether or not the trial is enabled.
+ readonly attribute boolean unconditionalAttribute;
+
+ // This attribute mirrors |unconditionalAttribute| above, but should only be
+ // available if the trial is enabled.
+ [OriginTrialEnabled=OriginTrialsSampleAPI, ImplementedAs=unconditionalAttribute] readonly attribute boolean bindingsTest;
+};

Powered by Google App Engine
This is Rietveld 408576698