Bug 1570836 [wpt PR 18246] - Removed 'fetch' method from ServiceWorkerGlobalScope, a=testonly
authorArtem Herasymenko <arherasy@microsoft.com>
Wed, 14 Aug 2019 10:47:09 +0000
changeset 488091 1cebcb175639c8df574e01ba55064693b34d8a0e
parent 488090 2391aec40f5d86f9a7f563f0128a9135a0485f6d
child 488092 0eae879f24bf6ba893f76cca022298b15d969bc7
push id36435
push usercbrindusan@mozilla.com
push dateThu, 15 Aug 2019 09:46:49 +0000
treeherdermozilla-central@0db07ff50ab5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1570836, 18246, 697147, 1730499, 685698
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1570836 [wpt PR 18246] - Removed 'fetch' method from ServiceWorkerGlobalScope, a=testonly Automatic update from web-platform-tests Removed 'fetch' method from ServiceWorkerGlobalScope ServiceWorkerGlobalScope does not have 'fetch' method in the spec: https://w3c.github.io/ServiceWorker/#serviceworkerglobalscope-interface It should inherit the method from WorkerGlobalScope which is exposed via partial interface WorkerGlobalScope: https://chromium.googlesource.com/chromium/src/+/685bf0154736c8c80fab01abbf944a1029a10b6f/third_party/blink/renderer/core/fetch/worker_fetch.idl#7 This change also adds a new test 'fetch-on-the-right-interface.https.html' to make sure that 'fetch' method is on the right interface. Bug: 697147 Change-Id: I4d1bd653424561e5a18cc4104fa61ebf48658500 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730499 Commit-Queue: Artem Herasymenko <arherasy@microsoft.com> Reviewed-by: Philip J├Ągenstedt <foolip@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/master@{#685698} -- wpt-commits: 1e6fef09eae3c9ed99ed4487ba234fcb4d6a723f wpt-pr: 18246
testing/web-platform/tests/service-workers/service-worker/ServiceWorkerGlobalScope/fetch-on-the-right-interface.https.any.js
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/service-workers/service-worker/ServiceWorkerGlobalScope/fetch-on-the-right-interface.https.any.js
@@ -0,0 +1,14 @@
+// META: title=fetch method on the right interface
+// META: global=!default,serviceworker
+
+test(function() {
+    assert_false(self.hasOwnProperty('fetch'), 'ServiceWorkerGlobalScope ' +
+        'instance should not have "fetch" method as its property.');
+    assert_inherits(self, 'fetch', 'ServiceWorkerGlobalScope should ' +
+        'inherit "fetch" method.');
+    assert_own_property(self.__proto__.__proto__, 'fetch',
+        'WorkerGlobalScope should have "fetch" propery in its prototype.');
+    assert_equals(self.fetch, self.__proto__.__proto__.fetch,
+        'ServiceWorkerGlobalScope.fetch should be the same as ' +
+        'WorkerGlobalScope.fetch.');
+}, 'Fetch method on the right interface');
\ No newline at end of file