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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/inspector_page.py

Issue 19774009: Fix for extension binding race condition when evaluating JS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tab unit tests Created 7 years, 3 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: tools/telemetry/telemetry/core/backends/chrome/inspector_page.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/inspector_page.py b/tools/telemetry/telemetry/core/backends/chrome/inspector_page.py
index 505a39852ec417a3f9be7b88f0710c3cfc4f1078..99890c3921473b59d79bdf535ac43b7a15645e00 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/inspector_page.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/inspector_page.py
@@ -14,13 +14,15 @@ class InspectorPage(object):
self._OnNotification,
self._OnClose)
self._navigation_pending = False
+ self._navigation_url = ""
def _OnNotification(self, msg):
logging.debug('Notification: %s', json.dumps(msg, indent=2))
if msg['method'] == 'Page.frameNavigated' and self._navigation_pending:
url = msg['params']['frame']['url']
- if (not url == 'chrome://newtab/' and not url == 'about:blank'
- and not 'parentId' in msg['params']['frame']):
+ if (self._navigation_url == url or
+ (not url == 'chrome://newtab/' and not url == 'about:blank'
+ and not 'parentId' in msg['params']['frame'])):
# Marks the navigation as complete and unblocks the
# PerformActionAndWaitForNavigate call.
self._navigation_pending = False
@@ -93,6 +95,7 @@ class InspectorPage(object):
}
}
self._inspector_backend.SendAndIgnoreResponse(request)
+ self._navigation_url = url
self.PerformActionAndWaitForNavigate(DoNavigate, timeout)
def GetCookieByName(self, name, timeout=60):

Powered by Google App Engine
This is Rietveld 408576698