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

Side by Side Diff: third_party/WebKit/Source/core/testing/OriginTrialsTest.idl

Issue 2861673007: Add Origin Trial layout tests for IDL bindings (Closed)
Patch Set: Fix compile errors Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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();
9 [OriginTrialEnabled=OriginTrialsSampleAPI] static boolean staticMethod();
8 [OriginTrialEnabled=OriginTrialsSampleAPI] const unsigned short CONSTANT = 1 ; 10 [OriginTrialEnabled=OriginTrialsSampleAPI] const unsigned short CONSTANT = 1 ;
9 11
10 // 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,
11 // and throws an exception in JavaScript if it is not. 13 // and throws an exception in JavaScript if it is not.
12 [CallWith=ScriptState, RaisesException] readonly attribute boolean throwingA ttribute; 14 [CallWith=ScriptState, RaisesException] readonly attribute boolean throwingA ttribute;
13 15
14 // This attribute is available whether or not the trial is enabled. 16 // These are available whether or not the trial is enabled.
15 readonly attribute boolean unconditionalAttribute; 17 readonly attribute boolean unconditionalAttribute;
18 static readonly attribute boolean staticUnconditionalAttribute;
19 boolean unconditionalMethod();
20 static boolean staticUnconditionalMethod();
21 const unsigned short UNCONDITIONAL_CONSTANT = 99;
16 22
17 // This attribute mirrors |unconditionalAttribute| above, but should only be 23 // These are available whether or not the trial is enabled, but only in a
18 // available if the trial is enabled. 24 // secure context
19 [OriginTrialEnabled=OriginTrialsSampleAPI, ImplementedAs=unconditionalAttrib ute] readonly attribute boolean bindingsTest; 25 // TODO(crbug.com/695123): Add [SecureContext] extended attribute when fixed
26 // to work with [OriginTrialEnabled]
27 readonly attribute boolean secureUnconditionalAttribute;
28 static readonly attribute boolean secureStaticUnconditionalAttribute;
29 boolean secureUnconditionalMethod();
30 static boolean secureStaticUnconditionalMethod();
31
32 // These are only available if the trial is enabled, as well as in secure
33 // context.
34 // TODO(crbug.com/695123): Add [SecureContext] extended attribute when fixed
35 // to work with [OriginTrialEnabled]
36 // e.g. [SecureContext, OriginTrialEnabled=OriginTrialsSampleAPI]
37 [OriginTrialEnabled=OriginTrialsSampleAPI] readonly attribute boolean secure Attribute;
38 [OriginTrialEnabled=OriginTrialsSampleAPI] static readonly attribute boolean secureStaticAttribute;
39 [OriginTrialEnabled=OriginTrialsSampleAPI] boolean secureMethod();
40 [OriginTrialEnabled=OriginTrialsSampleAPI] static boolean secureStaticMethod ();
20 }; 41 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698