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

Unified Diff: chrome/test/data/extensions/api_test/webnavigation/framework.js

Issue 10815051: Send the correct process ID with webNavigation events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/webnavigation/framework.js
diff --git a/chrome/test/data/extensions/api_test/webnavigation/framework.js b/chrome/test/data/extensions/api_test/webnavigation/framework.js
index 709df2c776d63ef1564af445dc190228f3530517..5652dc1d90e147675dce01352ebe968ff3d3b30f 100644
--- a/chrome/test/data/extensions/api_test/webnavigation/framework.js
+++ b/chrome/test/data/extensions/api_test/webnavigation/framework.js
@@ -10,6 +10,8 @@ var nextFrameId;
var frameIds;
var nextTabId;
var tabIds;
+var nextProcessId;
+var processIds;
var initialized = false;
function deepCopy(obj) {
@@ -48,6 +50,8 @@ function expect(data, order) {
frameIds = {};
nextTabId = 0;
tabIds = {};
+ nextProcessId = 0;
+ processIds = {}
initListeners();
}
@@ -130,13 +134,17 @@ function captureEvent(name, details) {
}
details.replacedTabId = tabIds[details.replacedTabId];
}
- // Don't bother testing those before we don't correctly dispatch events for
- // cross process navigations.
if ('processId' in details) {
- delete details.processId;
+ if (processIds[details.processId] === undefined) {
+ processIds[details.processId] = nextProcessId++;
+ }
+ details.processId = processIds[details.processId];
}
if ('sourceProcessId' in details) {
- delete details.sourceProcessId;
+ if (processIds[details.sourceProcessId] === undefined) {
+ processIds[details.sourceProcessId] = nextProcessId++;
+ }
+ details.sourceProcessId = processIds[details.sourceProcessId];
}
// find |details| in expectedEventData

Powered by Google App Engine
This is Rietveld 408576698