Index: test/inspector/protocol-test.js |
diff --git a/test/inspector/protocol-test.js b/test/inspector/protocol-test.js |
index 5a12f84994110b19425e59cb0d905f99f0ff5dcf..d04d951d5976ddfcd1ce72c975878deb0b1aa073 100644 |
--- a/test/inspector/protocol-test.js |
+++ b/test/inspector/protocol-test.js |
@@ -135,13 +135,17 @@ InspectorTest.completeTest = function() |
InspectorTest.completeTestAfterPendingTimeouts = function() |
{ |
- Protocol.Runtime.evaluate({ |
- expression: "new Promise(resolve => setTimeout(resolve, 0))", |
- awaitPromise: true }).then(InspectorTest.completeTest); |
+ InspectorTest.waitPendingTasks().then(InspectorTest.completeTest); |
} |
-InspectorTest.addScript = (string, lineOffset, columnOffset) => compileAndRunWithOrigin(string, "", lineOffset || 0, columnOffset || 0); |
-InspectorTest.addScriptWithUrl = (string, url) => compileAndRunWithOrigin(string, url, 0, 0); |
+InspectorTest.waitPendingTasks = function() |
+{ |
+ return Protocol.Runtime.evaluate({ expression: "new Promise(r => setTimeout(r, 0))//# sourceURL=wait-pending-tasks.js", awaitPromise: true }); |
+} |
+ |
+InspectorTest.addScript = (string, lineOffset, columnOffset) => compileAndRunWithOrigin(string, "", lineOffset || 0, columnOffset || 0, false); |
+InspectorTest.addScriptWithUrl = (string, url) => compileAndRunWithOrigin(string, url, 0, 0, false); |
+InspectorTest.addModule = (string, url, lineOffset, columnOffset) => compileAndRunWithOrigin(string, url, lineOffset || 0, columnOffset || 0, true); |
InspectorTest.startDumpingProtocolMessages = function() |
{ |