Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 // Tests for the test functions in head.js
3 function test() {
4 waitForExplicitFinish();
5 runTests();
6 }
8 gTests.push({
9 desc: "task sanity check",
10 run: function() {
11 let sum2plus2 = yield asyncSum(2, 2);
12 ok(sum2plus2 == 4, "asyncSum responded 2+2=4");
14 function asyncSum(a, b) {
15 var defd = Promise.defer();
16 setTimeout(function(){
17 defd.resolve(a+b);
18 }, 25);
19 return defd.promise;
20 }
21 }
22 });
24 gTests.push({
25 desc: "addTab",
26 run: function testAddTab() {
27 let tab = yield addTab("http://example.com/");
28 is(tab, Browser.selectedTab, "The new tab is selected");
29 }
30 });