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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js

Issue 1875593003: Revert of Store the list of trial tokens in OriginTrialContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js b/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js
index 693cde95d66b24243cb2ef1396f067efde78cb8b..08773cc1911c3e896a34108336241dbaf9364485 100644
--- a/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js
+++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js
@@ -1,35 +1,22 @@
// The sample API integrates origin trial checks at various entry points.
// These tests verify that any gated parts of the API are not available.
-expect_failure = (t) => {
- tests = [{
- desc: 'Accessing attribute should throw error',
- code: () => {
- assert_idl_attribute(window.internals, 'frobulate');
- assert_throws("NotSupportedError", () => { window.internals.frobulate; },
- 'Accessing attribute should throw error');
- }
- }, {
- desc: 'Attribute should exist and return value, with trial disabled',
- code: () => {
- assert_idl_attribute(window.internals, 'frobulateNoEnabledCheck');
- assert_true(window.internals.frobulateNoEnabledCheck,
- 'Attribute should return boolean value');
- }
- }, {
- desc: 'Attribute should not exist, with trial disabled',
- code: () => {
- assert_not_exists(window.internals, 'frobulateBindings');
- assert_equals(window.internals['frobulateBindings'], undefined);
- }
- }];
+expect_failure = () => {
+test(() => {
+ assert_idl_attribute(window.internals, 'frobulate');
+ assert_throws("NotSupportedError", () => { window.internals.frobulate; },
+ 'Accessing attribute should throw error');
+ }, 'Attribute should throw API unavailable error');
- for (var i = 0; i < tests.length; ++i) {
- if (t)
- t.step(tests[i].code);
- else
- test(tests[i].code, tests[i].desc);
- }
+test(() => {
+ assert_idl_attribute(window.internals, 'frobulateNoEnabledCheck');
+ assert_true(window.internals.frobulateNoEnabledCheck,
+ 'Attribute should return boolean value');
+ }, 'Attribute should exist and return value, with trial disabled');
+
+test(() => {
+ assert_not_exists(window.internals, 'frobulateBindings');
+ }, 'Attribute should not exist, with trial disabled');
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698