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

Unified Diff: chrome/test/data/extensions/api_test/socket/api/background.js

Issue 2017113002: [Extensions] DCHECK that ExtensionFunctions respond (and only once) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: chrome/test/data/extensions/api_test/socket/api/background.js
diff --git a/chrome/test/data/extensions/api_test/socket/api/background.js b/chrome/test/data/extensions/api_test/socket/api/background.js
index ff4864a40c13f7b6ab946847fdd452b535d0c1e0..d093aa0b0b56f38fd628d34bc7ed1905bb2e38fa 100644
--- a/chrome/test/data/extensions/api_test/socket/api/background.js
+++ b/chrome/test/data/extensions/api_test/socket/api/background.js
@@ -310,7 +310,7 @@ var testPendingCallback = function() {
chrome.test.assertEq(0, result, "failed to connect");
console.log("Socket connect: result=" + result, chrome.runtime.lastError);
- console.log("calling read with readCB2 callback");
+ console.log("calling read with readCB1 callback");
if (protocol == "tcp")
chrome.socket.read(socketId, readCB1);
else
@@ -330,7 +330,7 @@ var testPendingCallback = function() {
chrome.test.assertEq(0, result, "failed to connect");
console.log("Socket connect: result=" + result, chrome.runtime.lastError);
- console.log("calling read with readCB1 callback");
+ console.log("calling read with readCB2 callback");
if (protocol == "tcp")
chrome.socket.read(socketId, readCB2);
else
@@ -353,10 +353,9 @@ var testPendingCallback = function() {
function readCB1(readInfo) {
console.log("Socket read CB1: result=" + readInfo.resultCode,
chrome.runtime.lastError);
-
- if (readInfo.resultCode < 0) {
- chrome.test.fail("Error reading from socket: " + readInfo.resultCode);
- }
+ // We disconnect the socket right after calling read(), so behavior here
+ // is undefined.
+ // TODO(devlin): Why do we do that? What are we trying to do?
}
// Second callback, for read call after re-connect
« no previous file with comments | « chrome/test/data/extensions/api_test/hotword_private/audioHistory/test.js ('k') | chrome/test/ppapi/ppapi_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698