| Index: third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/longtask-origin-trial-interfaces-script-added.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/longtask-origin-trial-interfaces-script-added.html b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/longtask-origin-trial-interfaces-script-added.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3a915ae2a47fb315cd9812fbc37dd37655b66573
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/longtask-origin-trial-interfaces-script-added.html
|
| @@ -0,0 +1,25 @@
|
| +<!DOCTYPE html>
|
| +<meta charset="utf-8">
|
| +<title>LongTaskObserver - origin trial is enabled by script-added meta tag</title>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../../resources/origin-trials-helper.js"></script>
|
| +<script>
|
| +// Generate token with the command:
|
| +// generate_token.py http://127.0.0.1:8000 LongTaskObserver --expire-timestamp=2000000000
|
| +var token = "AjpM/J+Oaon2wm/Ige8C0M00AhbG4U3Q1nAAmsNxmDTB/FTgFHfMYk2aVJozhE7m0dlJhozhaPh7C+GM6KD+QgYAAABYeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiTG9uZ1Rhc2tPYnNlcnZlciIsICJleHBpcnkiOiAyMDAwMDAwMDAwfQ==";
|
| +
|
| +test(t => {
|
| + var interfaces =
|
| + OriginTrialsHelper.get_interface_names(window, ['PerformanceLongTaskTiming']);
|
| + console.log('Interfaces before adding trial token\n' + interfaces);
|
| +}, "LongTaskObserver related interfaces before adding trial token via script.");
|
| +
|
| +OriginTrialsHelper.add_token(token);
|
| +
|
| +test(t => {
|
| + var interfaces =
|
| + OriginTrialsHelper.get_interface_names(window, ['PerformanceLongTaskTiming']);
|
| + console.log('Interfaces after adding trial token\n' + interfaces);
|
| +}, "LongTaskObserver related interfaces after adding trial token via script.");
|
| +</script>
|
|
|