summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 19:06:57 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 19:06:57 +0000
commit76180ea4287b9458d97f8d547daf785bf136fba1 (patch)
treea8eeb50c3f486c330ea07530e1a77f126e195f55
parent64134fec4ed2f78dde84c6533dd2cc962f365ae6 (diff)
downloadchromium_src-76180ea4287b9458d97f8d547daf785bf136fba1.zip
chromium_src-76180ea4287b9458d97f8d547daf785bf136fba1.tar.gz
chromium_src-76180ea4287b9458d97f8d547daf785bf136fba1.tar.bz2
Load chrome.dll as a resource dll so that resources can be loaded by the browser.
TEST=fixes net tests for chrome frame BUG=none Review URL: http://codereview.chromium.org/437050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33094 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/resource_bundle_win.cc4
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc10
-rw-r--r--chrome_frame/test/net/fake_external_tab.h3
3 files changed, 13 insertions, 4 deletions
diff --git a/app/resource_bundle_win.cc b/app/resource_bundle_win.cc
index 63645d4..ec306ef 100644
--- a/app/resource_bundle_win.cc
+++ b/app/resource_bundle_win.cc
@@ -39,8 +39,8 @@ ResourceBundle::~ResourceBundle() {
}
void ResourceBundle::LoadResources(const std::wstring& pref_locale) {
- // As a convenience, set resources_data_ to the current module.
- resources_data_ = _AtlBaseModule.GetModuleInstance();
+ // As a convenience, set resources_data_ to the current resource module.
+ resources_data_ = _AtlBaseModule.GetResourceInstance();
DCHECK(NULL == locale_resources_data_) << "locale dll already loaded";
const FilePath& locale_path = GetLocaleFilePath(pref_locale);
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index 5caadd33..cc31331 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -104,6 +104,15 @@ void FakeExternalTab::Initialize() {
chrome::RegisterPathProvider();
app::RegisterPathProvider();
+ // Load Chrome.dll as our resource dll.
+ FilePath dll;
+ PathService::Get(base::DIR_MODULE, &dll);
+ dll = dll.Append(chrome::kBrowserResourcesDll);
+ HMODULE res_mod = ::LoadLibraryExW(dll.value().c_str(),
+ NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE);
+ DCHECK(res_mod);
+ _AtlBaseModule.SetResourceInstance(res_mod);
+
ResourceBundle::InitSharedInstance(L"en-US");
const CommandLine* cmd = CommandLine::ForCurrentProcess();
@@ -339,6 +348,7 @@ void FilterDisabledTests() {
const char* disabled_tests[] = {
// Tests disabled since they're testing the same functionality used
// by the TestAutomationProvider.
+ "URLRequestTest.Intercept",
"URLRequestTest.InterceptNetworkError",
"URLRequestTest.InterceptRestartRequired",
"URLRequestTest.InterceptRespectsCancelMain",
diff --git a/chrome_frame/test/net/fake_external_tab.h b/chrome_frame/test/net/fake_external_tab.h
index bd67a7f..dd35756 100644
--- a/chrome_frame/test/net/fake_external_tab.h
+++ b/chrome_frame/test/net/fake_external_tab.h
@@ -24,7 +24,7 @@ class ProcessSingleton;
class FakeExternalTab {
public:
FakeExternalTab();
- ~FakeExternalTab();
+ virtual ~FakeExternalTab();
virtual std::wstring GetProfileName();
@@ -92,7 +92,6 @@ class CFUrlRequestUnittestRunner
protected:
ScopedHandle test_thread_;
DWORD test_thread_id_;
- scoped_ptr<MessageLoop> test_thread_message_loop_;
scoped_ptr<test_server::SimpleWebServer> test_http_server_;
test_server::SimpleResponse chrome_frame_html_;