diff options
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/net/test_automation_provider.cc | 18 | ||||
-rw-r--r-- | chrome_frame/test/net/test_automation_provider.h | 3 |
2 files changed, 20 insertions, 1 deletions
diff --git a/chrome_frame/test/net/test_automation_provider.cc b/chrome_frame/test/net/test_automation_provider.cc index 322bf87..7594f30 100644 --- a/chrome_frame/test/net/test_automation_provider.cc +++ b/chrome_frame/test/net/test_automation_provider.cc @@ -5,8 +5,9 @@ #include "chrome_frame/test/net/test_automation_provider.h" #include "base/command_line.h" +#include "base/file_version_info.h" +#include "base/path_service.h" #include "chrome/test/automation/automation_messages.h" - #include "chrome_frame/test/net/test_automation_resource_message_filter.h" namespace { @@ -98,6 +99,21 @@ URLRequestJob* TestAutomationProvider::Factory(URLRequest* request, return NULL; } +std::string TestAutomationProvider::GetProtocolVersion() { + // Return the version of chrome.dll + FilePath path; + PathService::Get(base::DIR_MODULE, &path); + path = path.AppendASCII("chrome.dll"); + + std::string version; + scoped_ptr<FileVersionInfo> version_info( + FileVersionInfo::CreateFileVersionInfo(path)); + if (version_info.get()) { + version = WideToASCII(version_info->product_version()); + } + return version; +} + // static TestAutomationProvider* TestAutomationProvider::NewAutomationProvider( Profile* p, const std::string& channel, diff --git a/chrome_frame/test/net/test_automation_provider.h b/chrome_frame/test/net/test_automation_provider.h index d462108..9d3f65b 100644 --- a/chrome_frame/test/net/test_automation_provider.h +++ b/chrome_frame/test/net/test_automation_provider.h @@ -4,6 +4,7 @@ #ifndef CHROME_FRAME_TEST_NET_TEST_AUTOMATION_PROVIDER_H_ #define CHROME_FRAME_TEST_NET_TEST_AUTOMATION_PROVIDER_H_ +#include <string> #include "chrome/browser/automation/automation_provider.h" class TestAutomationResourceMessageFilter; @@ -47,6 +48,8 @@ class TestAutomationProvider TestAutomationProviderDelegate* delegate); protected: + virtual std::string GetProtocolVersion(); + int tab_handle_; TestAutomationProviderDelegate* delegate_; |