Title: [210950] trunk/Websites/webkit.org
Revision
210950
Author
[email protected]
Date
2017-01-19 19:49:37 -0800 (Thu, 19 Jan 2017)

Log Message

Include SubtleCrypto test on experimental-features test page
https://bugs.webkit.org/show_bug.cgi?id=167226

Patch by Joseph Pecoraro <[email protected]> on 2017-01-19
Reviewed by Yusuke Suzuki.

* experimental-features.html:
Add a test for SubtleCrypto and make the test resilient against exceptions.

Modified Paths

Diff

Modified: trunk/Websites/webkit.org/ChangeLog (210949 => 210950)


--- trunk/Websites/webkit.org/ChangeLog	2017-01-20 03:23:50 UTC (rev 210949)
+++ trunk/Websites/webkit.org/ChangeLog	2017-01-20 03:49:37 UTC (rev 210950)
@@ -1,3 +1,13 @@
+2017-01-19  Joseph Pecoraro  <[email protected]>
+
+        Include SubtleCrypto test on experimental-features test page
+        https://bugs.webkit.org/show_bug.cgi?id=167226
+
+        Reviewed by Yusuke Suzuki.
+
+        * experimental-features.html:
+        Add a test for SubtleCrypto and make the test resilient against exceptions.
+
 2017-01-19  Timothy Hatcher  <[email protected]>
 
         Add Tesla to the domain associations on the team page

Modified: trunk/Websites/webkit.org/experimental-features.html (210949 => 210950)


--- trunk/Websites/webkit.org/experimental-features.html	2017-01-20 03:23:50 UTC (rev 210949)
+++ trunk/Websites/webkit.org/experimental-features.html	2017-01-20 03:49:37 UTC (rev 210950)
@@ -69,7 +69,6 @@
 window.es6modules = true;
 </script>
 <script>
-
 function testCSSGrid() {
     return CSS.supports("display", "grid");
 }
@@ -103,15 +102,23 @@
     return window.es6modules;
 }
 
+function testSubtleCrypto() {
+    return window.crypto.subtle;
+}
+
 window.addEventListener("load", function () {
     Array.from(document.querySelectorAll(".test")).forEach(element => {
-        var testFunction = window[`test${element.id}`];
-        if (typeof testFunction === "function")
-            element.classList.add(testFunction() ? "enabled" : "disabled");
+        var enabled = false;
+        try {
+            var testFunction = window[`test${element.id}`];
+            enabled = !!testFunction();
+        } catch (e) {
+            console.error(e);
+        }
+        element.classList.add(enabled ? "enabled" : "disabled");
     });
 }, false);
-
-  </script>
+</script>
 </head>
 <body>
     <div class="content">
@@ -125,6 +132,7 @@
         <div class="test" id="Gamepad"><p>Gamepad API</p></div>
         <div class="test" id="FormValidation"><p>HTML Form Validation</p></div>
         <div class="test" id="InputEvents"><p>HTML Input Events</p></div>
+        <div class="test" id="SubtleCrypto"><p>SubtleCrypto</p></div>
         <div class="test" id="VariationFonts"><p>Variation Fonts</p></div>
         <div class="test" id="WebGL2"><p>WebGL 2.0</p></div>
     </div>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to