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

Unified Diff: chrome/test/data/webrtc/manual/peerconnection_manual.js

Issue 504753002: Test WebRTC - Peerconnection_manual.js: throw new Error line prevented rest of function from being … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webrtc/manual/peerconnection_manual.js
diff --git a/chrome/test/data/webrtc/manual/peerconnection_manual.js b/chrome/test/data/webrtc/manual/peerconnection_manual.js
index a8ce31df9933a78e33cd6e301bc6585578d7e9e9..664a954c0ea59555fe43d4bcc75d78b48c054cee 100644
--- a/chrome/test/data/webrtc/manual/peerconnection_manual.js
+++ b/chrome/test/data/webrtc/manual/peerconnection_manual.js
@@ -1156,16 +1156,18 @@ function error_(message) {
* @param {string} color Color of the text.
*/
function print_handler_(message, textField, color) {
- if (color == 'red' )
- throw new Error(message);
-
- if (color == 'green' )
- message += ' success';
+ try {
perkj_chrome 2014/08/25 11:59:13 This looks weird. Isn't the point of this throw th
+ if (color == 'red' )
+ throw new Error(message);
+ } finally {
+ if (color == 'green' )
+ message += ' success';
- $(textField).innerHTML += '<span style="color:' + color + ';">' + message +
- '</span><br>'
+ $(textField).innerHTML += '<span style="color:' + color + ';">' + message +
+ '</span><br>'
- console.log(message);
+ console.log(message);
+ }
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698