@ -1,6 +1,3 @@
/*
* vim: ts=4:sw=4:expandtab
*/
(function() {
'use strict';
// Browser specific functions for Chrom*
@ -1,7 +1,4 @@
/*global $, Whisper, Backbone, textsecure, extension*/
// This script should only be included in background.html
window.Whisper = window.Whisper || {};
@ -1,7 +1,3 @@
window.emoji_util = window.emoji_util || {};
storage.isBlocked = function(number) {
Whisper.Registration = {
var TIMESTAMP_THRESHOLD = 5 * 1000; // 5 seconds
@ -1,6 +1,4 @@
*
* Whisper.View
* This is the base for most of our views. The Backbone view is extended
@ -1,8 +1,3 @@
;(function () {
window.textsecure = window.textsecure || {};
var TextSecureServer = (function() {
function ProtoParser(arrayBuffer, protobuf) {
this.protobuf = protobuf;
this.buffer = new dcodeIO.ByteBuffer();
;(function(){
;(function() {
@ -1,11 +1,7 @@
* Implements EventTarget
* https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
/*********************************
function OutgoingMessage(server, timestamp, numbers, message, silent, callback) {
if (message instanceof textsecure.protobuf.DataMessage) {
var content = new textsecure.protobuf.Content();
function stringToArrayBuffer(str) {
if (typeof str !== 'string') {
throw new Error('Passed non-string to stringToArrayBuffer');
"use strict";
(function () {
describe("ContactBuffer", function() {
var getKeysForNumberMap = {};
TextSecureServer.getKeysForNumber = function(number, deviceId) {
var res = getKeysForNumberMap[number];
describe("Key generation", function() {
describe("Helpers", function() {
describe('MessageReceiver', function() {
textsecure.storage.impl = new SignalProtocolStore();
var WebSocket = window.WebSocket;
describe('Protocol', function() {
describe('Protocol Wrapper', function() {
describe("SignalProtocolStore", function() {
describe('TextSecureWebSocket', function() {
var RealWebSocket = window.WebSocket;
before(function() { window.WebSocket = MockSocket; });
describe('libphonenumber util', function() {
var attributes = {
describe('spellChecker', function() {
it('should work', function() {
assert(window.spellChecker.spellCheck('correct'));
describe('LastSeenIndicatorView', function() {
it('renders provided count', function() {
var view = new Whisper.LastSeenIndicatorView({ count: 10 });
describe('ScrollDownButtonView', function() {
it('renders with count = 0', function() {
var view = new Whisper.ScrollDownButtonView();
describe('Threads', function() {
it('should be ordered newest to oldest', function() {
// Timestamps
describe('TimestampView', function() {