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

Unified Diff: test/inspector/protocol-test.js

Issue 2663743002: [inspector] added test infrastructure and test for es6 modules (Closed)
Patch Set: addressed comment Created 3 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 | « test/inspector/inspector-test.cc ('k') | test/inspector/runtime/es6-module.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
{
« no previous file with comments | « test/inspector/inspector-test.cc ('k') | test/inspector/runtime/es6-module.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698