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

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: Hello, WebCrypto 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandato ry:{valid_and_supported_1:1}});"); 62 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandato ry:{valid_and_supported_1:1}});");
63 63
64 // Construct with certificates. 64 // Construct with certificates.
65 shouldNotThrow("new webkitRTCPeerConnection({certificates:null}, null);"); 65 shouldNotThrow("new webkitRTCPeerConnection({certificates:null}, null);");
66 shouldNotThrow("new webkitRTCPeerConnection({certificates:[]}, null);"); 66 shouldNotThrow("new webkitRTCPeerConnection({certificates:[]}, null);");
67 shouldThrow("new webkitRTCPeerConnection({certificates:[null]}, null);"); 67 shouldThrow("new webkitRTCPeerConnection({certificates:[null]}, null);");
68 shouldThrow("new webkitRTCPeerConnection({certificates:[1337]}, null);"); 68 shouldThrow("new webkitRTCPeerConnection({certificates:[1337]}, null);");
69 // Global certificate variables so that the "should..." methods can evaluate the m. 69 // Global certificate variables so that the "should..." methods can evaluate the m.
70 var certRSA = null; 70 var certRSA = null;
71 var certECDSA = null; 71 var certECDSA = null;
72 function testCertificates1RSA() 72 function testCertificates1RSA()
hta - Chromium 2015/10/23 06:55:00 Nit: Blank lines above function declaration for re
hbos_chromium 2015/10/23 09:59:05 Done.
73 { 73 {
74 webkitRTCPeerConnection.generateCertificate({ name: "RSASSA-PKCS1-v1_5", mod ulusLength: 2048, publicExponent: 65537 }) 74 webkitRTCPeerConnection.generateCertificate({ name: "RSASSA-PKCS1-v1_5", mod ulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]), hash: "SHA-256" })
75 .then(function(certificate) { 75 .then(function(certificate) {
76 certRSA = certificate; 76 certRSA = certificate;
77 shouldNotThrow('new webkitRTCPeerConnection({certificates:[cer tRSA]}, null);'); 77 shouldNotThrow('new webkitRTCPeerConnection({certificates:[cer tRSA]}, null);');
78 testCertificates2ECDSA(); 78 testCertificates2ECDSA();
79 }, 79 },
80 function() { 80 function() {
81 testFailed('Generating RSA 2048'); 81 testFailed('Generating RSA 2048');
82 testCertificates2ECDSA(); 82 testCertificates2ECDSA();
83 }); 83 });
84 } 84 }
(...skipping 12 matching lines...) Expand all
97 } 97 }
98 // Sequentially test construction with RSA and ECDSA certificates. 98 // Sequentially test construction with RSA and ECDSA certificates.
99 // testCertificates2ECDSA's callback methods mark the end of the async tests. 99 // testCertificates2ECDSA's callback methods mark the end of the async tests.
100 testCertificates1RSA(); 100 testCertificates1RSA();
101 101
102 window.jsTestIsAsync = true; 102 window.jsTestIsAsync = true;
103 window.successfullyParsed = true; 103 window.successfullyParsed = true;
104 </script> 104 </script>
105 </body> 105 </body>
106 </html> 106 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698