diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 21:29:15 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 21:29:15 +0000 |
commit | 0c4055044da98ab3ec9c778220f5852ba53dc2d7 (patch) | |
tree | 960f9797832e4452398bf0afa102056a2a33cc11 /chrome | |
parent | ddb6b7e213858782fe00b2d4020258b2b341abbb (diff) | |
download | chromium_src-0c4055044da98ab3ec9c778220f5852ba53dc2d7.zip chromium_src-0c4055044da98ab3ec9c778220f5852ba53dc2d7.tar.gz chromium_src-0c4055044da98ab3ec9c778220f5852ba53dc2d7.tar.bz2 |
Re-enable the NoScript unittest.
Turns out we need to broadcast the NOTIFY_USER_SCRIPTS_LOADED message even if
there are no scripts. I just removed the DCHECK that expects scripts.
Review URL: http://codereview.chromium.org/19475
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8913 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/extensions/user_script_master.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/user_script_master_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 1 |
3 files changed, 1 insertions, 4 deletions
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc index 86f5668..66a8d70 100644 --- a/chrome/browser/extensions/user_script_master.cc +++ b/chrome/browser/extensions/user_script_master.cc @@ -102,8 +102,6 @@ void UserScriptMaster::ScriptReloader::NotifyMaster( void UserScriptMaster::ScriptReloader::RunScan( const FilePath script_dir, const UserScriptList lone_scripts) { base::SharedMemory* shared_memory = GetNewScripts(script_dir, lone_scripts); - if (!shared_memory) - return; // No scripts to load. // Post the new scripts back to the master's message loop. master_message_loop_->PostTask(FROM_HERE, diff --git a/chrome/browser/extensions/user_script_master_unittest.cc b/chrome/browser/extensions/user_script_master_unittest.cc index a2081ee..f0f2dc2 100644 --- a/chrome/browser/extensions/user_script_master_unittest.cc +++ b/chrome/browser/extensions/user_script_master_unittest.cc @@ -68,7 +68,7 @@ class UserScriptMasterTest : public testing::Test, }; // Test that we *don't* get spurious notifications. -TEST_F(UserScriptMasterTest, DISABLED_NoScripts) { +TEST_F(UserScriptMasterTest, NoScripts) { // Set shared_memory_ to something non-NULL, so we can check it became NULL. shared_memory_ = reinterpret_cast<base::SharedMemory*>(1); diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index b208e89..8fc3742 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -759,7 +759,6 @@ void BrowserRenderProcessHost::Observe(NotificationType type, case NOTIFY_USER_SCRIPTS_LOADED: { base::SharedMemory* shared_memory = Details<base::SharedMemory>(details).ptr(); - DCHECK(shared_memory); if (shared_memory) { SendUserScriptsUpdate(shared_memory); } |