summaryrefslogtreecommitdiff
path: root/static/tests/bugchat.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/tests/bugchat.js')
-rw-r--r--static/tests/bugchat.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/static/tests/bugchat.js b/static/tests/bugchat.js
index 5d9a7b5..eba3177 100644
--- a/static/tests/bugchat.js
+++ b/static/tests/bugchat.js
@@ -56,7 +56,7 @@ function showError(err) {
};
-function handleMessages(msgs) {
+function handleMessages(msgs, oldTime, newTime) {
$.map(msgs, function(m) {
var split = m.content.split("-");
if (split.length != 2) {
@@ -71,7 +71,9 @@ function handleMessages(msgs) {
var p = ClientMap[client];
if (i - p != 1) {
showError("[" + Key + "] Error for client " + client
- + "! Expected " + (p+1) + ", got " + i);
+ + "! Expected " + (p+1) + ", got " + i
+ + " (" + oldTime + " -> " + newTime + ")"
+ );
}
}
ClientMap[client] = i;
@@ -81,8 +83,8 @@ function handleMessages(msgs) {
function refresh() {
var onSuccess = function(json) {
try {
+ handleMessages(json.messages, Timestamp, json.timestamp);
Timestamp = json.timestamp;
- handleMessages(json.messages);
} catch(e) {
console.error(e);
$('#msgs').append($('<div>').css('color', 'red').text(e));