Commit graph

36 commits

Author SHA1 Message Date
Arlo Breault
a164d61f16 Remove tests referring to BadgeUI
Since that's been overhauled.  The whole ui.spec.js file probably needs
redoing.
2019-07-27 12:01:03 -04:00
David Fifield
e67a659943 Fix tests for Params.getByteCount.
They were relying on the Query.parse interface, which was removed
separately.

https://bugs.torproject.org/31126#comment:5
2019-07-25 14:32:26 -06:00
David Fifield
abdda1c8bf Bug 31203: Add tests for Parse.byteCount and Params.getByteCount. 2019-07-22 16:22:52 -06:00
David Fifield
fdc5563f87 Bug 31126: Use URLSearchParams instead of Query.parse.
This standard interface does the same thing as Query.parse did, with a
different API on the return value. It doesn't have the problems with
keys inherited from Object.prototype that Query.parse did.
2019-07-18 18:29:59 -06:00
David Fifield
c1f6548602 Remove unused Params.getAddress.
It was formerly used for the "broker" and "relay" query string
parameters, which were removed in
debe9c3748.
2019-07-18 16:24:11 -06:00
Arlo Breault
fab39ae57c Cleanup lints identified by eslint
Some files were omitted in the .eslintignore, left as an exercise to the
reader.

We probably want to reduce amount of globals overall and use proper es
modules.
2019-07-10 10:58:29 +02:00
Arlo Breault
d3080e2566 Remove mentions of coffeescript from docs 2019-07-10 10:49:53 +02:00
Arlo Breault
1867a3f121 Lightly massage some of the generated JavaScript 2019-07-10 10:49:53 +02:00
Arlo Breault
31ad9566e6 Compile coffee files and remove them
With,

  ./node_modules/.bin/coffee -b -c Cakefile `find . -path ./node_modules -prune -o -name '*.coffee'`
2019-07-10 10:49:36 +02:00
Arlo Breault
055d5f1824 Appease validation warning about "Unsafe assignment to innerHTML"
This doesn't apply to the webextension but hasn't been factored out in
the build step yet.
2019-06-26 18:30:24 -04:00
Arlo Breault
dad53932a2 Fix some linting warnings for "Line exceeds maximum allowed length." 2019-05-16 12:07:06 -04:00
Arlo Breault
2d8a1690ba Initialize snowflake instance with a config 2019-05-16 12:07:06 -04:00
Arlo Breault
edbbea1d03 Move querystring access to init 2019-05-16 12:07:06 -04:00
Arlo Breault
3839c2e0b1 Initialize arrays when constructing
Otherwise, this is set on the prototype and shared across instances :/

Note the change to the test that highlights this bug.  A proxy pair was
already created when an earlier test called `beginWebRTC()` but a new
Snowflake instance should start with an empty array.
2019-05-16 12:07:06 -04:00
Arlo Breault
9df66b15b1 Make MODE a class constant 2019-05-16 12:07:06 -04:00
Arlo Breault
2b1852c1a5 Make badge and debug extend ui
Permits further ui extension
2019-05-08 11:23:49 -04:00
Arlo Breault
7ce3c83a31 Use some class vars in broker to eliminate globals 2019-05-08 11:23:49 -04:00
Arlo Breault
bd5887a876 Make a WS class to eliminate globals 2019-05-08 11:23:49 -04:00
Arlo Breault
622005c79e Remove copy/paste signalling 2019-05-08 11:21:56 -04:00
David Fifield
297ae7b1b8 Test ProxyPair with ArrayBuffers, not strings. 2018-12-19 21:30:39 -07:00
David Fifield
3cd8519ec9 Fix the ProxyPair tests exposed by the previous commit.
This was mainly a matter of more complete mocking.
2018-12-04 15:09:53 -07:00
David Fifield
fce32bf292 Fix nested Jasmine tests.
You can nest a "describe" in a "describe":
  describe
    describe
      it

But you can't nest an "it" in an "it":
  describe
    it
      it

The nested "it"s were not getting run (or getting run, but their output
ignored, I'm not sure).

Before this change:
	41 specs, 0 failures
After:
	44 specs, 5 failures
2018-12-04 15:09:53 -07:00
David Fifield
261ef8f5bc Remove duplicate ProxyPair tests from util.spec.coffee. 2018-12-04 15:09:53 -07:00
David Fifield
0c7ddeb1d0 Parse.ipFromSDP function. 2017-10-14 15:06:36 -04:00
Arlo Breault
d1ec51bfb9 Remove unused clientAddr from ProxyPair 2017-01-23 12:34:08 -08:00
Arlo Breault
d567e2312f Feature detect with Modernizr
* A start on #34
2016-04-05 10:30:45 -07:00
Serene Han
490b8b33b7 better checks on receiveOffer (#11) 2016-03-15 20:13:39 -07:00
Serene Han
b1e76420bd per-proxypair Snowflake ID generation instead of just one for the Broker (#11) 2016-03-14 22:12:52 -07:00
Serene Han
5e318b6219 prepare for multiplexed snowflake (#11) 2016-03-12 22:29:56 -08:00
Serene Han
39be8403a4 provide 'silent' param on snowflake proxy to disable confirmation dialog 2016-03-07 22:58:23 -08:00
Serene Han
d2e61e315c confirmation dialog on proxy close (close #23) 2016-03-02 05:45:27 -08:00
Serene Han
4f18340c16 Complete broker spec cases 2016-02-10 13:05:21 -08:00
Serene Han
bb9eb721e2 Fix jasmine spec for broker async request 2016-02-09 22:36:36 -08:00
Serene Han
548c100160 Begin spec for proxy-side broker interaction 2016-02-08 19:27:28 -08:00
Serene Han
547cb9690a more jasmine specs for proxypair, ui, and snowflake coffee files 2016-02-07 08:35:01 -08:00
Serene Han
889b3fee98 better ProxyPair jasmine specs, ensure travis using more recent npm 2016-02-05 12:06:37 -08:00