Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html

Issue 1644553002: Constructing an RTCPeerConnection with expired certificates should throw an exception. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase /w master. Updated test to generate expired certificate and verify exception is thrown Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html
diff --git a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html
index 2624d778851a9ee3a02b50aa6002ffa7e3550283..577fd443165ba3e2aaa715570e35e5deccdc8925 100644
--- a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html
+++ b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html
@@ -66,6 +66,7 @@ shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[1337]});"
// Global certificate variables so that the "should..." methods can evaluate them.
var certRSA = null;
var certECDSA = null;
+var certExpired = null;
function testCertificates1RSA()
{
@@ -86,6 +87,20 @@ function testCertificates2ECDSA()
.then(function(certificate) {
certECDSA = certificate;
shouldNotThrow('new webkitRTCPeerConnection({iceServers:[], certificates:[certECDSA]}, null);');
+ testCertificates3Expired();
+ },
+ function() {
+ testFailed('Generating ECDSA P-256');
+ testCertificates3Expired();
+ });
+}
+function testCertificates3Expired()
+{
+ webkitRTCPeerConnection.generateCertificate({ name: "ECDSA", namedCurve: "P-256", expires:0 })
+ .then(function(certificate) {
+ certExpired = certificate;
+ shouldBeTrue('certExpired.expires <= new Date().getTime()');
+ shouldThrow('new webkitRTCPeerConnection({iceServers:[], certificates:[certExpired]}, null);');
finishJSTest();
},
function() {
@@ -94,7 +109,7 @@ function testCertificates2ECDSA()
});
}
// Sequentially test construction with RSA and ECDSA certificates.
-// testCertificates2ECDSA's callback methods mark the end of the async tests.
+// testCertificates3Expired's callback methods mark the end of the async tests.
testCertificates1RSA();
window.jsTestIsAsync = true;
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698