diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 06:17:54 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 06:17:54 +0000 |
commit | 84ac7f362e565c096851a783ca7163b78e19b659 (patch) | |
tree | 7f671e9c025e4e4b37468240e9be7a28926f6a7c /chrome/browser/extensions/extension_uitest.cc | |
parent | 17492f531825be1522991579c1a1bd6af2d8c4b1 (diff) | |
download | chromium_src-84ac7f362e565c096851a783ca7163b78e19b659.zip chromium_src-84ac7f362e565c096851a783ca7163b78e19b659.tar.gz chromium_src-84ac7f362e565c096851a783ca7163b78e19b659.tar.bz2 |
Generate IDs for --load-extension by hashing the path instead
of incrementing a static counter.
BUG=21281
TEST=Load an unpacked extension from chrome://extensions/ that
does not have an ID in its manifest. The resulting ID should
be random-looking, not something like "aaaaaa".
Review URL: http://codereview.chromium.org/256049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_uitest.cc')
-rw-r--r-- | chrome/browser/extensions/extension_uitest.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/chrome/browser/extensions/extension_uitest.cc b/chrome/browser/extensions/extension_uitest.cc index 1f9238a..8518dad 100644 --- a/chrome/browser/extensions/extension_uitest.cc +++ b/chrome/browser/extensions/extension_uitest.cc @@ -400,7 +400,7 @@ void BrowserEventAutomationProxy::HandleMessageFromChrome() { // TEST_F(BrowserEventExtensionTest, RunTest) to understand where the // extension Id comes from. tab_->HandleMessageFromExternalHost( - "{\"rqid\":0, \"extid\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"," + "{\"rqid\":0, \"extid\": \"ofoknjclcmghjfmbncljcnpjmfmldhno\"," " \"connid\": 1}", keys::kAutomationOrigin, keys::kAutomationPortRequestTarget); @@ -475,15 +475,8 @@ TEST_F(BrowserEventExtensionTest, RunTest) { // This test loads an HTML file that tries to add listeners to a bunch of // chrome.* events and upon adding a listener it posts the name of the event // to the automation layer, which we'll count to make sure the events work. - // - // The extension for this test does not specify a "key" property in its - // manifest file. Therefore, the extension system will automatically assign - // it an Id. To make this test consistent and non-flaky, the genetated Id - // counter is reset before the test so that we can hardcode the first Id - // that will be generated. - Extension::ResetGeneratedIdCounter(); TestWithURL(GURL( - "chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/test.html")); + "chrome-extension://ofoknjclcmghjfmbncljcnpjmfmldhno/test.html")); BrowserEventAutomationProxy* proxy = static_cast<BrowserEventAutomationProxy*>(automation()); |