[Pkg-javascript-commits] [pdf.js] 56/161: Fix coding style in test/unit/testreporter.js

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 14:16:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 2bd81786c238477388c6f041af913b9e894b1798
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Fri Mar 14 15:46:23 2014 +0100

    Fix coding style in test/unit/testreporter.js
---
 test/unit/testreporter.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/test/unit/testreporter.js b/test/unit/testreporter.js
index 72eb877..6b37309 100644
--- a/test/unit/testreporter.js
+++ b/test/unit/testreporter.js
@@ -13,8 +13,9 @@ var TestReporter = function(browser, appPath) {
     r.onreadystatechange = function sendTaskResultOnreadystatechange(e) {
       if (r.readyState == 4) {
         // Retry until successful
-        if (r.status !== 200)
+        if (r.status !== 200) {
           send(action, json);
+        }
       }
     };
     json['browser'] = browser;
@@ -30,8 +31,9 @@ var TestReporter = function(browser, appPath) {
       status: status,
       description: description
     };
-    if (typeof error !== 'undefined')
+    if (typeof error !== 'undefined') {
       message['error'] = error;
+    }
     send('/submit_task_results', message);
   }
 
@@ -59,9 +61,11 @@ var TestReporter = function(browser, appPath) {
     } else {
       var failedMessages = '';
       var items = results.getItems();
-      for (var i = 0, ii = items.length; i < ii; i++)
-        if (!items[i].passed())
+      for (var i = 0, ii = items.length; i < ii; i++) {
+        if (!items[i].passed()) {
           failedMessages += items[i].message + ' ';
+        }
+      }
       sendResult('TEST-UNEXPECTED-FAIL', results.description, failedMessages);
     }
   };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list