summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/infrastructure/server/context.any.js
blob: 11ab76d87432a40af18663fa91f3767cd9cda142 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// META: global=window,dedicatedworker,sharedworker,serviceworker,dedicatedworker-module,sharedworker-module,serviceworker-module
test(t => {
  // Test for object that's only exposed in serviceworker
  if (self.clients) {
      assert_true(self.isSecureContext);
      assert_equals(location.protocol, "https:");
  } else {
      assert_false(self.isSecureContext);
      assert_equals(location.protocol, "http:");
  }
});

done();