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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html

Issue 1418113002: RTCPeerConnection.generateCertificate taking AlgorithmIdentifier and using WebCrypto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase with master Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 description("Tests the RTCPeerConnection constructor."); 8 description("Tests the RTCPeerConnection constructor.");
9 9
10 shouldNotThrow("new webkitRTCPeerConnection(null);"); 10 shouldNotThrow("new webkitRTCPeerConnection(null);");
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandato ry:{valid_and_supported_1:1}});"); 60 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandato ry:{valid_and_supported_1:1}});");
61 61
62 // Construct with certificates. 62 // Construct with certificates.
63 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:null}, null);"); 63 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:null}, null);");
64 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[]}, nu ll);"); 64 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[]}, nu ll);");
65 shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[null]}, n ull);"); 65 shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[null]}, n ull);");
66 shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[1337]}, n ull);"); 66 shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[1337]}, n ull);");
67 // Global certificate variables so that the "should..." methods can evaluate the m. 67 // Global certificate variables so that the "should..." methods can evaluate the m.
68 var certRSA = null; 68 var certRSA = null;
69 var certECDSA = null; 69 var certECDSA = null;
70
70 function testCertificates1RSA() 71 function testCertificates1RSA()
71 { 72 {
72 webkitRTCPeerConnection.generateCertificate({ name: "RSASSA-PKCS1-v1_5", mod ulusLength: 2048, publicExponent: 65537 }) 73 webkitRTCPeerConnection.generateCertificate({ name: "RSASSA-PKCS1-v1_5", mod ulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]), hash: "SHA-256" })
73 .then(function(certificate) { 74 .then(function(certificate) {
74 certRSA = certificate; 75 certRSA = certificate;
75 shouldNotThrow('new webkitRTCPeerConnection({iceServers:[], ce rtificates:[certRSA]}, null);'); 76 shouldNotThrow('new webkitRTCPeerConnection({iceServers:[], ce rtificates:[certRSA]}, null);');
76 testCertificates2ECDSA(); 77 testCertificates2ECDSA();
77 }, 78 },
78 function() { 79 function() {
79 testFailed('Generating RSA 2048'); 80 testFailed('Generating RSA 2048');
80 testCertificates2ECDSA(); 81 testCertificates2ECDSA();
81 }); 82 });
82 } 83 }
(...skipping 12 matching lines...) Expand all
95 } 96 }
96 // Sequentially test construction with RSA and ECDSA certificates. 97 // Sequentially test construction with RSA and ECDSA certificates.
97 // testCertificates2ECDSA's callback methods mark the end of the async tests. 98 // testCertificates2ECDSA's callback methods mark the end of the async tests.
98 testCertificates1RSA(); 99 testCertificates1RSA();
99 100
100 window.jsTestIsAsync = true; 101 window.jsTestIsAsync = true;
101 window.successfullyParsed = true; 102 window.successfullyParsed = true;
102 </script> 103 </script>
103 </body> 104 </body>
104 </html> 105 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698