OLD | NEW |
1 // Copyright 2015 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 #include "core/origin_trials/testing/InternalsFrobulate.h" | 5 #include "OriginTrialsTest.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
9 #include "core/origin_trials/OriginTrials.h" | 9 #include "core/origin_trials/OriginTrials.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
| 13 bool OriginTrialsTest::normalAttribute() |
| 14 { |
| 15 return true; |
| 16 } |
| 17 |
13 // static | 18 // static |
14 bool InternalsFrobulate::frobulate(ScriptState* scriptState, Internals& internal
s, ExceptionState& exceptionState) | 19 bool OriginTrialsTest::staticAttribute() |
| 20 { |
| 21 return true; |
| 22 } |
| 23 |
| 24 bool OriginTrialsTest::throwingAttribute(ScriptState* scriptState, ExceptionStat
e& exceptionState) |
15 { | 25 { |
16 String errorMessage; | 26 String errorMessage; |
17 if (!OriginTrials::originTrialsSampleAPIEnabled(scriptState->getExecutionCon
text())) { | 27 if (!OriginTrials::originTrialsSampleAPIEnabled(scriptState->getExecutionCon
text())) { |
18 exceptionState.throwDOMException(NotSupportedError, "The Origin Trials S
ample API has not been enabled in this context"); | 28 exceptionState.throwDOMException(NotSupportedError, "The Origin Trials S
ample API has not been enabled in this context"); |
19 return false; | 29 return false; |
20 } | 30 } |
21 return frobulateNoEnabledCheck(internals); | 31 return unconditionalAttribute(); |
22 } | 32 } |
23 | 33 |
24 // static | 34 bool OriginTrialsTest::unconditionalAttribute() |
25 bool InternalsFrobulate::frobulateNoEnabledCheck(Internals& internals) | |
26 { | 35 { |
27 return true; | 36 return true; |
28 } | 37 } |
29 | 38 |
| 39 DEFINE_TRACE(OriginTrialsTest) |
| 40 { |
| 41 } |
| 42 |
30 } // namespace blink | 43 } // namespace blink |
OLD | NEW |