This reverts commit 71439a60e7915179be96dd42dc732dc51c279884. Reason for revert: https://ci.chromium.org/buildbot/chromium.webrtc.fyi/Mac%20Tester/47796 Original change's description: > Set session error if SetLocal/RemoteDescription ever fails > > This changes SetLocalDescription/SetRemoteDescription to set a > session error which will cause any future calls to fail early if > there is an error when applying a session description. > > This is needed since until better error recovery is implemented > failing a call to SetLocalDescription or SetRemoteDescription > could leave the PeerConnection in an inconsistent state. > > Bug: chromium:800775 > Change-Id: If06fd73d6e902af15d072dc562bbe830d3b11ad5 > Reviewed-on: https://webrtc-review.googlesource.com/54061 > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > Commit-Queue: Steve Anton <steveanton@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#22061} TBR=steveanton@webrtc.org,deadbeef@webrtc.org Change-Id: I8af271f2b6dd6a896e390a6fe736e809329b4f4a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:800775 Reviewed-on: https://webrtc-review.googlesource.com/54700 Reviewed-by: Steve Anton <steveanton@webrtc.org> Commit-Queue: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22063}
29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
/*
|
|
* Copyright 2018 The WebRTC Project Authors. All rights reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "rtc_base/gunit.h"
|
|
|
|
#include <string>
|
|
|
|
#include "rtc_base/stringutils.h"
|
|
|
|
::testing::AssertionResult AssertStartsWith(const char* str_expr,
|
|
const char* prefix_expr,
|
|
const std::string& str,
|
|
const std::string& prefix) {
|
|
if (rtc::starts_with(str.c_str(), prefix.c_str())) {
|
|
return ::testing::AssertionSuccess();
|
|
} else {
|
|
return ::testing::AssertionFailure()
|
|
<< str_expr << "\nwhich is\n\"" << str << "\"\ndoes not start with\n"
|
|
<< prefix_expr << "\nwhich is\n\"" << prefix << "\"";
|
|
}
|
|
}
|