summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/base
diff options
context:
space:
mode:
authorkelvinp <kelvinp@chromium.org>2016-02-01 15:55:53 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-01 23:57:10 +0000
commit09fd68866e3c016bd0f0ffca096039a22e235a60 (patch)
tree1ac04997bd95564cd68895b70a8177abbc1bda54 /remoting/webapp/base
parent809dc5d993e19b5b3784efed496e4d50c0510c44 (diff)
downloadchromium_src-09fd68866e3c016bd0f0ffca096039a22e235a60.zip
chromium_src-09fd68866e3c016bd0f0ffca096039a22e235a60.tar.gz
chromium_src-09fd68866e3c016bd0f0ffca096039a22e235a60.tar.bz2
Fix broken remoting webapp javascript unittest.
After forcing tests to fail after a 10 seconds timeout, turns out the spy promise tests are the culprit. I have removed them from our tests as they are originally intended to test XHR's and we now have a better API for that. This CL also fixes a bug in our GN dependency declaration. BUG=582005 Review URL: https://codereview.chromium.org/1653443002 Cr-Commit-Position: refs/heads/master@{#372825}
Diffstat (limited to 'remoting/webapp/base')
-rw-r--r--remoting/webapp/base/js/dns_blackhole_checker_unittest.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/remoting/webapp/base/js/dns_blackhole_checker_unittest.js b/remoting/webapp/base/js/dns_blackhole_checker_unittest.js
index fc6ce8f..56faa751 100644
--- a/remoting/webapp/base/js/dns_blackhole_checker_unittest.js
+++ b/remoting/webapp/base/js/dns_blackhole_checker_unittest.js
@@ -74,7 +74,7 @@ QUnit.test('success',
assert.equal(checker.getState(), state);
}
- return base.SpyPromise.run(function() {
+ return Promise.resolve().then(function() {
fakeXhr.respond(200);
}).then(function() {
sinon.assert.notCalled(onStateChange);
@@ -98,7 +98,7 @@ QUnit.test('http response after connected',
// Verify that DnsBlackholeChecker stays in HANDSHAKE state even if the
// signal strategy has connected.
- return base.SpyPromise.run(function() {
+ return Promise.resolve().then(function() {
signalStrategy.setStateForTesting(
remoting.SignalStrategy.State.CONNECTED);
}).then(function() {
@@ -107,7 +107,7 @@ QUnit.test('http response after connected',
// Verify that DnsBlackholeChecker goes to CONNECTED state after the
// the HTTP request has succeeded.
- return base.SpyPromise.run(function() {
+ return Promise.resolve().then(function() {
fakeXhr.respond(200);
});
}).then(function() {
@@ -123,7 +123,7 @@ QUnit.test('connect failed',
sinon.assert.calledWith(onStateChange, state);
};
- return base.SpyPromise.run(function() {
+ return Promise.resolve().then(function() {
fakeXhr.respond(200);
}).then(function() {
sinon.assert.notCalled(onStateChange);
@@ -146,7 +146,7 @@ QUnit.test('blocked',
'checker state is still FAILED');
};
- return base.SpyPromise.run(function() {
+ return Promise.resolve().then(function() {
fakeXhr.respond(400);
}).then(function() {
sinon.assert.calledWith(
@@ -175,7 +175,7 @@ QUnit.test('blocked after connected',
// Verify that DnsBlackholeChecker stays in HANDSHAKE state even
// if the signal strategy has connected.
- return base.SpyPromise.run(function() {
+ return Promise.resolve().then(function() {
signalStrategy.setStateForTesting(
remoting.SignalStrategy.State.CONNECTED);
}).then(function() {
@@ -184,7 +184,7 @@ QUnit.test('blocked after connected',
// Verify that DnsBlackholeChecker goes to FAILED state after it
// gets the blocked HTTP response.
- return base.SpyPromise.run(function() {
+ return Promise.resolve().then(function() {
fakeXhr.respond(400);
});
}).then(function() {