diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 09:55:54 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 09:55:54 +0000 |
commit | 8ce6a4419d4dd0e744d8ae7a6e5edaa6ed69e8b4 (patch) | |
tree | 47376d986ab5953d1f1dbdc12a8bd0a591d1df2c /chrome/test/data | |
parent | 1c8e3f02f193f48f28d899ee94ea7469046958b4 (diff) | |
download | chromium_src-8ce6a4419d4dd0e744d8ae7a6e5edaa6ed69e8b4.zip chromium_src-8ce6a4419d4dd0e744d8ae7a6e5edaa6ed69e8b4.tar.gz chromium_src-8ce6a4419d4dd0e744d8ae7a6e5edaa6ed69e8b4.tar.bz2 |
Fix crash when incognito split mode extension using the WebRequest API was reloaded
This fixes a CHECK assertion that was triggered if an incognito split mode
extension with two background pages (each having an active web reqeust event
listener) was restarted. The reason for the bug was that the event listener
from the incognito background page would not be unregistered properly.
BUG=224094
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/13572005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192537 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r-- | chrome/test/data/extensions/api_test/webrequest_reload/background.js | 16 | ||||
-rw-r--r-- | chrome/test/data/extensions/api_test/webrequest_reload/manifest.json | 13 |
2 files changed, 29 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/webrequest_reload/background.js b/chrome/test/data/extensions/api_test/webrequest_reload/background.js new file mode 100644 index 0000000..e8e55f4 --- /dev/null +++ b/chrome/test/data/extensions/api_test/webrequest_reload/background.js @@ -0,0 +1,16 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +chrome.webRequest.onBeforeRequest.addListener( + function(details) { + }, + { + urls: [], + types: [] + }, + []); +if (chrome.extension.inIncognitoContext) + chrome.test.sendMessage("done_incognito"); +else + chrome.test.sendMessage("done"); diff --git a/chrome/test/data/extensions/api_test/webrequest_reload/manifest.json b/chrome/test/data/extensions/api_test/webrequest_reload/manifest.json new file mode 100644 index 0000000..0498f1b --- /dev/null +++ b/chrome/test/data/extensions/api_test/webrequest_reload/manifest.json @@ -0,0 +1,13 @@ +{ + "name": "WebRequest + incognito = crash", + "incognito":"split", + "version": "1", + "manifest_version": 2, + "background": { + "scripts": ["background.js"] + }, + "permissions": [ + "webRequest", + "<all_urls>" + ] +} |