diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-23 13:17:26 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-23 13:17:26 +0000 |
commit | 0c24e342443934393d8acb99cceeff264db8ff1e (patch) | |
tree | 8962a8d3e762fe5cc0d7f03a2cebf7c69687f333 /chrome/test/data/extensions/api_test/webnavigation/framework.js | |
parent | d9ea9a3238041b8bf2db71c30f548d7f2d94a74f (diff) | |
download | chromium_src-0c24e342443934393d8acb99cceeff264db8ff1e.zip chromium_src-0c24e342443934393d8acb99cceeff264db8ff1e.tar.gz chromium_src-0c24e342443934393d8acb99cceeff264db8ff1e.tar.bz2 |
Send the correct process ID with webNavigation events
BUG=136090
TEST=browser_tests:*WebNavigation*
Review URL: https://chromiumcodereview.appspot.com/10815051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/extensions/api_test/webnavigation/framework.js')
-rw-r--r-- | chrome/test/data/extensions/api_test/webnavigation/framework.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/chrome/test/data/extensions/api_test/webnavigation/framework.js b/chrome/test/data/extensions/api_test/webnavigation/framework.js index 709df2c..5652dc1 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 |