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

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

Issue 2181233004: [Origin Trials] Add tests for static methods on partial interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/bindings/tests/idls/modules/TestInterfacePartial4.idl » ('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 623d5cc16e8e9c12b12d1076cba8229f0ef5cf3c..e1573e5236d8834e1f676cfc9ae12db39fecd336 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
@@ -50,6 +50,14 @@ expect_failure = (t) => {
assert_not_exists(window.internals, 'frobulateMethodPartial');
assert_equals(window.internals['frobulateMethodPartial'], undefined);
}
+ }, {
+ desc: 'Static method should not exist on partial interface, with trial disabled',
+ code: () => {
+ var internalsInterface = window.internals.constructor;
+ assert_false('frobulateStaticMethodPartial' in internalsInterface);
+ assert_not_exists(internalsInterface, 'frobulateStaticMethodPartial');
+ assert_equals(internalsInterface['frobulateStaticMethodPartial'], undefined);
+ }
}];
fetch_tests_from_worker(new Worker('resources/disabled-worker.js'));
@@ -107,5 +115,11 @@ test(() => {
assert_true(internalsInterface.frobulateStatic, 'Static attribute should return boolean value');
}, 'Static attribute should exist on partial interface and return value');
+test(() => {
+ var internalsInterface = window.internals.constructor;
+ assert_exists(internalsInterface, 'frobulateStaticMethodPartial');
+ assert_true(internalsInterface.frobulateStaticMethodPartial(), 'Static method should return boolean value');
+ }, 'Static method should exist on partial interface and return value');
+
fetch_tests_from_worker(new Worker('resources/enabled-worker.js'));
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698