Title: [235234] trunk
Revision
235234
Author
[email protected]
Date
2018-08-23 12:43:58 -0700 (Thu, 23 Aug 2018)

Log Message

self.isSecureContext undefined in Service Worker
https://bugs.webkit.org/show_bug.cgi?id=188842

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https-expected.txt: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https.html: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.serviceworker.js: Added.
(test):

Source/WebKit:

Enable isSecureContext runtime flag.

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::updatePreferencesStore):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (235233 => 235234)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-08-23 19:31:28 UTC (rev 235233)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-08-23 19:43:58 UTC (rev 235234)
@@ -1,5 +1,17 @@
 2018-08-23  Youenn Fablet  <[email protected]>
 
+        self.isSecureContext undefined in Service Worker
+        https://bugs.webkit.org/show_bug.cgi?id=188842
+
+        Reviewed by Alex Christensen.
+
+        * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https-expected.txt: Added.
+        * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https.html: Added.
+        * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.serviceworker.js: Added.
+        (test):
+
+2018-08-23  Youenn Fablet  <[email protected]>
+
         Update libwebrtc up to 984f1a80c0
         https://bugs.webkit.org/show_bug.cgi?id=188745
         <rdar://problem/43539177>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https-expected.txt (0 => 235234)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https-expected.txt	2018-08-23 19:43:58 UTC (rev 235234)
@@ -0,0 +1,4 @@
+
+PASS Setting up tests 
+PASS isSecureContext 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https.html (0 => 235234)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https.html	2018-08-23 19:43:58 UTC (rev 235234)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Service Worker: isSecureContext</title>
+</head>
+<body>
+<script src=""
+<script src=""
+<script src=""
+<script>
+'use strict';
+
+promise_test(async (t) => {
+    var url = '';
+    var scope = 'empty.html';
+    var frame_sw, sw_registration;
+
+    await service_worker_unregister(t, scope);
+    var f = await with_iframe(scope);
+    t.add_cleanup(function() {
+        f.remove();
+    });
+    frame_sw = f.contentWindow.navigator.serviceWorker;
+    var registration = await navigator.serviceWorker.register(url, {scope: scope});
+    sw_registration = registration;
+    await wait_for_state(t, registration.installing, 'activated');
+    fetch_tests_from_worker(sw_registration.active);
+}, 'Setting up tests');
+
+</script>
+</body>
+</html>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.serviceworker.js (0 => 235234)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.serviceworker.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.serviceworker.js	2018-08-23 19:43:58 UTC (rev 235234)
@@ -0,0 +1,5 @@
+importScripts("/resources/testharness.js");
+
+test(() => {
+    assert_true(self.isSecureContext, true);
+}, "isSecureContext");

Modified: trunk/Source/WebKit/ChangeLog (235233 => 235234)


--- trunk/Source/WebKit/ChangeLog	2018-08-23 19:31:28 UTC (rev 235233)
+++ trunk/Source/WebKit/ChangeLog	2018-08-23 19:43:58 UTC (rev 235234)
@@ -1,3 +1,15 @@
+2018-08-23  Youenn Fablet  <[email protected]>
+
+        self.isSecureContext undefined in Service Worker
+        https://bugs.webkit.org/show_bug.cgi?id=188842
+
+        Reviewed by Alex Christensen.
+
+        Enable isSecureContext runtime flag.
+
+        * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+        (WebKit::WebSWContextManagerConnection::updatePreferencesStore):
+
 2018-08-23  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r235216.

Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (235233 => 235234)


--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2018-08-23 19:31:28 UTC (rev 235233)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2018-08-23 19:43:58 UTC (rev 235234)
@@ -130,6 +130,7 @@
     RuntimeEnabledFeatures::sharedFeatures().setFetchAPIKeepAliveEnabled(store.getBoolValueForKey(WebPreferencesKey::fetchAPIKeepAliveEnabledKey()));
     RuntimeEnabledFeatures::sharedFeatures().setRestrictedHTTPResponseAccess(store.getBoolValueForKey(WebPreferencesKey::restrictedHTTPResponseAccessKey()));
     RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled(store.getBoolValueForKey(WebPreferencesKey::serverTimingEnabledKey()));
+    RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(store.getBoolValueForKey(WebPreferencesKey::isSecureContextAttributeEnabledKey()));
 
     m_storageBlockingPolicy = static_cast<SecurityOrigin::StorageBlockingPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::storageBlockingPolicyKey()));
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to