Index: third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webshare-origin-trial-interfaces-script-added.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webshare-origin-trial-interfaces-script-added.html b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webshare-origin-trial-interfaces-script-added.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d906ea45ff71e9b9b9d678bd680cabbd47289e27 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webshare-origin-trial-interfaces-script-added.html |
@@ -0,0 +1,23 @@ |
+<!DOCTYPE html> |
+<meta charset="utf-8"> |
+<title>WebShare - 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 WebShare --expire-timestamp=2000000000 |
+let token = "Ah4Oj3ljkRWMut+YnQrsBd4fPWHZLn3mH+2hHQeMEAZqYUnaVvTaY979zOeaBs9z+Mu0DaajtZ1iRmJNs0ifew0AAABQeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiV2ViU2hhcmUiLCAiZXhwaXJ5IjogMjAwMDAwMDAwMH0="; |
+ |
+let properties_to_check = {'Navigator': ['share']}; |
+ |
+test(t => { |
+ OriginTrialsHelper.check_properties_missing(this, properties_to_check); |
+}, "WebShare related properties on interfaces before adding trial token via script."); |
+ |
+OriginTrialsHelper.add_token(token); |
+ |
+test(t => { |
+ OriginTrialsHelper.check_properties(this, properties_to_check); |
+}, "WebShare related properties on interfaces after adding trial token via script."); |
+</script> |