Adding error enum to be used by PeerConnectionInterface methods.
The enum is at about the same level of detail as DOMExceptions, and I looked through the spec making sure that chromium will be able to perform the DOMException mapping for each one. The new enum is called RtcError and is outside the PeerConnectionInterface scope, because we may want to use this for things not associated with a PeerConnection in the future. This CL doesn't yet use the error enum anywhere; that will probably happen in follow-up CLs for the individual methods. BUG=webrtc:6855 Review-Url: https://codereview.webrtc.org/2564683002 Cr-Commit-Position: refs/heads/master@{#15526}
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@ -2989,3 +2990,11 @@ TEST(CreateSessionOptionsTest, MediaConstraintsInAnswer) {
|
||||
EXPECT_TRUE(updated_answer_options.has_audio());
|
||||
EXPECT_TRUE(updated_answer_options.has_video());
|
||||
}
|
||||
|
||||
TEST(RtcErrorTest, OstreamOperator) {
|
||||
std::ostringstream oss;
|
||||
oss << webrtc::RtcError::NONE << ' '
|
||||
<< webrtc::RtcError::INVALID_PARAMETER << ' '
|
||||
<< webrtc::RtcError::INTERNAL_ERROR;
|
||||
EXPECT_EQ("NONE INVALID_PARAMETER INTERNAL_ERROR", oss.str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user