| OLD | NEW |
| 1 # Integrating a feature with the Origin Trials framework | 1 # Integrating a feature with the Origin Trials framework |
| 2 | 2 |
| 3 To expose your feature via the origin trials framework, there are a few code | 3 To expose your feature via the origin trials framework, there are a few code |
| 4 changes required. | 4 changes required. |
| 5 | 5 |
| 6 [TOC] | 6 [TOC] |
| 7 | 7 |
| 8 ## Code Changes | 8 ## Code Changes |
| 9 | 9 |
| 10 ### Runtime Enabled Features | 10 ### Runtime Enabled Features |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 ``` | 147 ``` |
| 148 --origin-trial-public-key=dRCs+TocuKkocNKa0AtZ4awrt9XKH2SQCI6o4FY6BNA= | 148 --origin-trial-public-key=dRCs+TocuKkocNKa0AtZ4awrt9XKH2SQCI6o4FY6BNA= |
| 149 ``` | 149 ``` |
| 150 | 150 |
| 151 This is the base64 encoding of the public key associated with `eftest.key`. If | 151 This is the base64 encoding of the public key associated with `eftest.key`. If |
| 152 it doesn't work, see [trial_token_unittest.cc]. If you cannot set command-line | 152 it doesn't work, see [trial_token_unittest.cc]. If you cannot set command-line |
| 153 switches (e.g., on Chrome OS), you can also directly modify | 153 switches (e.g., on Chrome OS), you can also directly modify |
| 154 [chrome_origin_trial_policy.cc]. | 154 [chrome_origin_trial_policy.cc]. |
| 155 | 155 |
| 156 ### Layout Tests |
| 157 When using the \[OriginTrialEnabled\] IDL attribute, you should add layout tests |
| 158 to verify that you've correctly updated the V8 bindings code. Depending on how |
| 159 your feature is exposed, you'll want tests for the exposed interfaces, as well |
| 160 as tests for script-added tokens. For examples, refer to the existing tests in |
| 161 [origin_trials/webexposed]. |
| 162 |
| 163 In addition, you'll need to update the command line for the |
| 164 `origin-trials-runtimeflags-disabled` virtual suite, in [VirtualTestSuites]. |
| 165 Add your feature name to the list of explicitly disabled features. This test |
| 166 suite ensures that features are actually enabled by origin trial, not overridden |
| 167 by the runtime flag. |
| 168 |
| 156 [build_config.h]: /build/build_config.h | 169 [build_config.h]: /build/build_config.h |
| 157 [chrome_origin_trial_policy.cc]: /chrome/common/origin_trials/chrome_origin_tria
l_policy.cc | 170 [chrome_origin_trial_policy.cc]: /chrome/common/origin_trials/chrome_origin_tria
l_policy.cc |
| 158 [crbug.com/615060]: https://bugs.chromium.org/p/chromium/issues/detail?id=615060 | 171 [crbug.com/615060]: https://bugs.chromium.org/p/chromium/issues/detail?id=615060 |
| 159 [ConditionalFeatures.cpp]: /third_party/WebKit/Source/bindings/core/v8/Condition
alFeatures.cpp | 172 [ConditionalFeatures.cpp]: /third_party/WebKit/Source/bindings/core/v8/Condition
alFeatures.cpp |
| 160 [ConditionalFeaturesForModules.cpp]: /third_party/WebKit/Source/bindings/modules
/v8/ConditionalFeaturesForModules.cpp | 173 [ConditionalFeaturesForModules.cpp]: /third_party/WebKit/Source/bindings/modules
/v8/ConditionalFeaturesForModules.cpp |
| 161 [generate_token.py]: /tools/origin_trials/generate_token.py | 174 [generate_token.py]: /tools/origin_trials/generate_token.py |
| 162 [Developer Guide]: https://github.com/jpchase/OriginTrials/blob/gh-pages/develop
er-guide.md | 175 [Developer Guide]: https://github.com/jpchase/OriginTrials/blob/gh-pages/develop
er-guide.md |
| 163 [OriginTrialEnabled]: /third_party/WebKit/Source/bindings/IDLExtendedAttributes.
md#_OriginTrialEnabled_i_m_a_c_ | 176 [OriginTrialEnabled]: /third_party/WebKit/Source/bindings/IDLExtendedAttributes.
md#_OriginTrialEnabled_i_m_a_c_ |
| 177 [origin_trials/webexposed]: /third_party/WebKit/LayoutTests/http/tests/origin_tr
ials/webexposed/ |
| 164 [RuntimeEnabledFeatures.json5]: /third_party/WebKit/Source/platform/RuntimeEnabl
edFeatures.json5 | 178 [RuntimeEnabledFeatures.json5]: /third_party/WebKit/Source/platform/RuntimeEnabl
edFeatures.json5 |
| 165 [trial_token_unittest.cc]: /content/common/origin_trials/trial_token_unittest.cc | 179 [trial_token_unittest.cc]: /content/common/origin_trials/trial_token_unittest.cc |
| 180 [VirtualTestSuites]: /third_party/WebKit/LayoutTests/VirtualTestSuites |
| OLD | NEW |