// 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;
};
