| 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 #ifndef OriginTrialsTest_h | 5 #ifndef OriginTrialsTest_h |
| 6 #define OriginTrialsTest_h | 6 #define OriginTrialsTest_h |
| 7 | 7 |
| 8 #include "platform/bindings/ScriptWrappable.h" | 8 #include "platform/bindings/ScriptWrappable.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class ExceptionState; | 13 class ExceptionState; |
| 14 class ScriptState; | 14 class ScriptState; |
| 15 | 15 |
| 16 // OriginTrialsTest is a very simple interface used for testing | 16 // OriginTrialsTest is a very simple interface used for testing |
| 17 // origin-trial-enabled features which are attached directly to interfaces at | 17 // origin-trial-enabled features which are attached directly to interfaces at |
| 18 // run-time. | 18 // run-time. |
| 19 class OriginTrialsTest : public GarbageCollectedFinalized<OriginTrialsTest>, | 19 class OriginTrialsTest : public GarbageCollectedFinalized<OriginTrialsTest>, |
| 20 public ScriptWrappable { | 20 public ScriptWrappable { |
| 21 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 | 22 |
| 23 public: | 23 public: |
| 24 static OriginTrialsTest* Create() { return new OriginTrialsTest(); } | 24 static OriginTrialsTest* Create() { return new OriginTrialsTest(); } |
| 25 virtual ~OriginTrialsTest() = default; | 25 virtual ~OriginTrialsTest() = default; |
| 26 | 26 |
| 27 bool normalAttribute(); | 27 bool normalAttribute() { return true; } |
| 28 static bool staticAttribute(); | 28 static bool staticAttribute() { return true; } |
| 29 bool normalMethod() { return true; } |
| 30 static bool staticMethod() { return true; } |
| 31 static const unsigned short kConstant = 1; |
| 29 | 32 |
| 30 bool throwingAttribute(ScriptState*, ExceptionState&); | 33 bool throwingAttribute(ScriptState*, ExceptionState&); |
| 31 bool unconditionalAttribute(); | |
| 32 | 34 |
| 33 static const unsigned short kConstant = 1; | 35 bool unconditionalAttribute() { return true; } |
| 36 static bool staticUnconditionalAttribute() { return true; } |
| 37 bool unconditionalMethod() { return true; } |
| 38 static bool staticUnconditionalMethod() { return true; } |
| 39 static const unsigned short kUnconditionalConstant = 99; |
| 40 |
| 41 bool secureUnconditionalAttribute() { return true; } |
| 42 static bool secureStaticUnconditionalAttribute() { return true; } |
| 43 bool secureUnconditionalMethod() { return true; } |
| 44 static bool secureStaticUnconditionalMethod() { return true; } |
| 45 |
| 46 bool secureAttribute() { return true; } |
| 47 static bool secureStaticAttribute() { return true; } |
| 48 bool secureMethod() { return true; } |
| 49 static bool secureStaticMethod() { return true; } |
| 34 | 50 |
| 35 DECLARE_TRACE(); | 51 DECLARE_TRACE(); |
| 36 | 52 |
| 37 private: | 53 private: |
| 38 OriginTrialsTest() = default; | 54 OriginTrialsTest() = default; |
| 39 }; | 55 }; |
| 40 | 56 |
| 41 } // namespace blink | 57 } // namespace blink |
| 42 | 58 |
| 43 #endif // OriginTrialsTest_h | 59 #endif // OriginTrialsTest_h |
| OLD | NEW |