Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: remoting/webapp/base/js/dns_blackhole_checker_unittest.js

Issue 1643823002: Revert of Fix flaky remoting webapp javascript unittest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/files.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/dns_blackhole_checker_unittest.js
diff --git a/remoting/webapp/base/js/dns_blackhole_checker_unittest.js b/remoting/webapp/base/js/dns_blackhole_checker_unittest.js
index 56faa7511a04bf5ea6897f85a6efcb90c206e184..fc6ce8f025b88d574e79cf441fe7c2c35319c4f5 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 @@
assert.equal(checker.getState(), state);
}
- return Promise.resolve().then(function() {
+ return base.SpyPromise.run(function() {
fakeXhr.respond(200);
}).then(function() {
sinon.assert.notCalled(onStateChange);
@@ -98,7 +98,7 @@
// Verify that DnsBlackholeChecker stays in HANDSHAKE state even if the
// signal strategy has connected.
- return Promise.resolve().then(function() {
+ return base.SpyPromise.run(function() {
signalStrategy.setStateForTesting(
remoting.SignalStrategy.State.CONNECTED);
}).then(function() {
@@ -107,7 +107,7 @@
// Verify that DnsBlackholeChecker goes to CONNECTED state after the
// the HTTP request has succeeded.
- return Promise.resolve().then(function() {
+ return base.SpyPromise.run(function() {
fakeXhr.respond(200);
});
}).then(function() {
@@ -123,7 +123,7 @@
sinon.assert.calledWith(onStateChange, state);
};
- return Promise.resolve().then(function() {
+ return base.SpyPromise.run(function() {
fakeXhr.respond(200);
}).then(function() {
sinon.assert.notCalled(onStateChange);
@@ -146,7 +146,7 @@
'checker state is still FAILED');
};
- return Promise.resolve().then(function() {
+ return base.SpyPromise.run(function() {
fakeXhr.respond(400);
}).then(function() {
sinon.assert.calledWith(
@@ -175,7 +175,7 @@
// Verify that DnsBlackholeChecker stays in HANDSHAKE state even
// if the signal strategy has connected.
- return Promise.resolve().then(function() {
+ return base.SpyPromise.run(function() {
signalStrategy.setStateForTesting(
remoting.SignalStrategy.State.CONNECTED);
}).then(function() {
@@ -184,7 +184,7 @@
// Verify that DnsBlackholeChecker goes to FAILED state after it
// gets the blocked HTTP response.
- return Promise.resolve().then(function() {
+ return base.SpyPromise.run(function() {
fakeXhr.respond(400);
});
}).then(function() {
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/files.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698