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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js

Issue 2879503002: [Devtools] Added product entry tests for network
Patch Set: rebase Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/page-mock.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
index 3f06fbf7460a19b31805a6c78a95db6c45c34ba9..6009ccbf91e967d3811c3d96199d38c3dc588bb1 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
@@ -427,6 +427,27 @@ InspectorTest.dumpNavigatorViewInMode = function(view, mode)
InspectorTest.dumpNavigatorView(view);
}
+/**
+ * @param {symbol} event
+ * @param {!Common.Object} obj
+ * @param {(function(?):boolean)|undefined}
+ * @return {!Promise}
+ */
+InspectorTest.waitEventListener = function(event, obj, condition = undefined)
+{
+ condition = condition || function() { return true;};
+ return new Promise(resolve => {
+ obj.addEventListener(event, onEventFired);
+
+ function onEventFired(event) {
+ if (!condition(event.data))
+ return;
+ obj.removeEventListener(event, onEventFired);
+ resolve(event.data);
+ }
+ });
+}
+
InspectorTest.waitForUISourceCode = function(urlSuffix, projectType)
{
function matches(uiSourceCode)
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/page-mock.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698