| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 interface OriginTrialsTest { | 5 interface OriginTrialsTest { |
| 6 [OriginTrialEnabled=OriginTrialsSampleAPI] readonly attribute boolean normal
Attribute; | 6 [OriginTrialEnabled=OriginTrialsSampleAPI] readonly attribute boolean normal
Attribute; |
| 7 [OriginTrialEnabled=OriginTrialsSampleAPI] static readonly attribute boolean
staticAttribute; | 7 [OriginTrialEnabled=OriginTrialsSampleAPI] static readonly attribute boolean
staticAttribute; |
| 8 [OriginTrialEnabled=OriginTrialsSampleAPI] boolean normalMethod(); | 8 [OriginTrialEnabled=OriginTrialsSampleAPI] boolean normalMethod(); |
| 9 [OriginTrialEnabled=OriginTrialsSampleAPI] static boolean staticMethod(); | 9 [OriginTrialEnabled=OriginTrialsSampleAPI] static boolean staticMethod(); |
| 10 [OriginTrialEnabled=OriginTrialsSampleAPI] const unsigned short CONSTANT = 1
; | 10 [OriginTrialEnabled=OriginTrialsSampleAPI] const unsigned short CONSTANT = 1
; |
| 11 | 11 |
| 12 // This attribute uses native code to test whether the trial is enabled, | 12 // This attribute uses native code to test whether the trial is enabled, |
| 13 // and throws an exception in JavaScript if it is not. | 13 // and throws an exception in JavaScript if it is not. |
| 14 [CallWith=ScriptState, RaisesException] readonly attribute boolean throwingA
ttribute; | 14 [CallWith=ScriptState, RaisesException] readonly attribute boolean throwingA
ttribute; |
| 15 | 15 |
| 16 // These are available whether or not the trial is enabled. | 16 // These are available whether or not the trial is enabled. |
| 17 readonly attribute boolean unconditionalAttribute; | 17 readonly attribute boolean unconditionalAttribute; |
| 18 static readonly attribute boolean staticUnconditionalAttribute; | 18 static readonly attribute boolean staticUnconditionalAttribute; |
| 19 boolean unconditionalMethod(); | 19 boolean unconditionalMethod(); |
| 20 static boolean staticUnconditionalMethod(); | 20 static boolean staticUnconditionalMethod(); |
| 21 const unsigned short UNCONDITIONAL_CONSTANT = 99; | 21 const unsigned short UNCONDITIONAL_CONSTANT = 99; |
| 22 | 22 |
| 23 // These are available whether or not the trial is enabled, but only in a | 23 // These are available whether or not the trial is enabled, but only in a |
| 24 // secure context | 24 // secure context |
| 25 // TODO(crbug.com/695123): Add [SecureContext] extended attribute when fixed | 25 [SecureContext] readonly attribute boolean secureUnconditionalAttribute; |
| 26 // to work with [OriginTrialEnabled] | 26 // TODO(chasej): Add [SecureContext] when that attribute is fixed to work on |
| 27 readonly attribute boolean secureUnconditionalAttribute; | 27 // static attributes. That problem is not related to [OriginTrialEnabled]. |
| 28 static readonly attribute boolean secureStaticUnconditionalAttribute; | 28 static readonly attribute boolean secureStaticUnconditionalAttribute; |
| 29 boolean secureUnconditionalMethod(); | 29 [SecureContext] boolean secureUnconditionalMethod(); |
| 30 static boolean secureStaticUnconditionalMethod(); | 30 [SecureContext] static boolean secureStaticUnconditionalMethod(); |
| 31 | 31 |
| 32 // These are only available if the trial is enabled, as well as in secure | 32 // These are only available if the trial is enabled, as well as in secure |
| 33 // context. | 33 // context. |
| 34 // TODO(crbug.com/695123): Add [SecureContext] extended attribute when fixed | 34 [SecureContext, OriginTrialEnabled=OriginTrialsSampleAPI] readonly attribute
boolean secureAttribute; |
| 35 // to work with [OriginTrialEnabled] | 35 [SecureContext, OriginTrialEnabled=OriginTrialsSampleAPI] static readonly at
tribute boolean secureStaticAttribute; |
| 36 // e.g. [SecureContext, OriginTrialEnabled=OriginTrialsSampleAPI] | 36 [SecureContext, OriginTrialEnabled=OriginTrialsSampleAPI] boolean secureMeth
od(); |
| 37 [OriginTrialEnabled=OriginTrialsSampleAPI] readonly attribute boolean secure
Attribute; | 37 [SecureContext, OriginTrialEnabled=OriginTrialsSampleAPI] static boolean sec
ureStaticMethod(); |
| 38 [OriginTrialEnabled=OriginTrialsSampleAPI] static readonly attribute boolean
secureStaticAttribute; | |
| 39 [OriginTrialEnabled=OriginTrialsSampleAPI] boolean secureMethod(); | |
| 40 [OriginTrialEnabled=OriginTrialsSampleAPI] static boolean secureStaticMethod
(); | |
| 41 }; | 38 }; |
| OLD | NEW |