Index: third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/enabled-worker.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/enabled-worker.js b/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/enabled-worker.js |
index b3721694fa9753e44bcf02e25bd31e9af1da29b9..08e5b50a7491c2de0ef89efcfdbc51bcb47cf43e 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/enabled-worker.js |
+++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/enabled-worker.js |
@@ -1,28 +1,2 @@ |
-importScripts('/resources/testharness.js'); |
- |
-// Test whether the origin-trial-enabled attributes are attached in a worker |
-// where the trial is enabled. |
-// This is deliberately just a minimal set of tests to ensure that trials are |
-// available in a worker. The full suite of tests are in origin_trials.js. |
-test(() => { |
- var testObject = self.internals.originTrialsTest(); |
- assert_idl_attribute(testObject, 'throwingAttribute'); |
- assert_true(testObject.throwingAttribute, 'Attribute should return boolean value'); |
- }, 'Attribute should exist and not throw exception in worker'); |
-test(() => { |
- var testObject = self.internals.originTrialsTest(); |
- assert_idl_attribute(testObject, 'normalAttribute'); |
- assert_true(testObject.normalAttribute, 'Attribute should return boolean value'); |
- }, 'Attribute should exist and return value in worker'); |
-test(() => { |
- var testObject = self.internals.originTrialsTest(); |
- assert_idl_attribute(testObject, 'CONSTANT'); |
- assert_equals(testObject.CONSTANT, 1, 'Constant should return integer value'); |
- }, 'Constant should exist and return value in worker'); |
-test(() => { |
- var testObject = self.internals.originTrialsTest(); |
- assert_idl_attribute(testObject, 'CONSTANT'); |
- testObject.CONSTANT = 10; |
- assert_equals(testObject.CONSTANT, 1, 'Constant should not be modifiable'); |
- }, 'Constant should exist and not be modifiable in worker'); |
-done(); |
+importScripts('origintrials-worker.js'); |
+expect_success_worker(); |