Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/sample-api-enabled-worker.php

Issue 1828063002: Add support for origin trials in workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trial-token-in-header-blink-document
Patch Set: fix test flakyness Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/sample-api-enabled-worker.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-multiple-tokens-header.php b/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/sample-api-enabled-worker.php
similarity index 77%
copy from third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-multiple-tokens-header.php
copy to third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/sample-api-enabled-worker.php
index 21034e4e1aa61cf3bfdca77037d73789e6dd81c9..41d72a935369df60ea03e1751ee9dedddc962a24 100644
--- a/third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-multiple-tokens-header.php
+++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/sample-api-enabled-worker.php
@@ -1,4 +1,5 @@
<?php
+header('Content-Type: text/javascript');
// TODO(iclelland): Generate this sample token during the build. The token
// below will expire in 2033, but it would be better to always have a token which
// is guaranteed to be valid when the tests are run.
@@ -9,15 +10,5 @@
header("Origin-Trial: Am5nmX0C/DpiE2xRlcZ6D4wvTiO5ydK4ATI0aUDxpIXD4MIoll0XEsIT8Qgdq4+tEYxOeJo/Y0QtkpYwRNWScw4AAABReyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiR3Jva2FseXplIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9");
header("Origin-Trial: \"AlCoOPbezqtrGMzSzbLQC4c+oPqO6yuioemcBPjgcXajF8jtmZr4B8tJRPAARPbsX6hDeVyXCKHzEJfpBXvZgQEAAABReyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiRnJvYnVsYXRlIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9\", Avs0tgQGv771bXLAScGOi5VpjYdIW/nbb00qk3rH8T6/+7NVTlBosCz05fCg9Yb3N3P9h2IuadgfNtPTMMpirQwAAABYeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiRW5hYmxlTWFycXVlZVRhZyIsICJleHBpcnkiOiAyMDAwMDAwMDAwfQ==", false);
?>
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Test Sample API when trial is enabled</title>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="resources/origin_trials.js"></script>
-<script>
+importScripts('enabled-worker.js');
-// The trial is enabled by the token above in header.
-expect_success();
-
-</script>

Powered by Google App Engine
This is Rietveld 408576698