diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-21 19:03:33 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-21 19:03:33 +0000 |
commit | 0bf46b99bb79d66c81587cb114b93516cb0af499 (patch) | |
tree | a7220ed87219b47ce247412d50551ff385d87f53 /chrome_frame/test/net/fake_external_tab.cc | |
parent | 102907fa8772f074bfd0f2b48bcdf75a819b6906 (diff) | |
download | chromium_src-0bf46b99bb79d66c81587cb114b93516cb0af499.zip chromium_src-0bf46b99bb79d66c81587cb114b93516cb0af499.tar.gz chromium_src-0bf46b99bb79d66c81587cb114b93516cb0af499.tar.bz2 |
A test for Chrome Frame delete browser history behaviour in IE8.
BUG=52612
TEST=chrome_frame_tests --gtest_filter=DeleteBrowsingHistoryTest.*
Review URL: http://codereview.chromium.org/3365010/show
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/net/fake_external_tab.cc')
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index b42b13b..59d4f84 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -105,7 +105,8 @@ class SupplyProxyCredentials : public WindowObserver { HWND password_; }; - virtual void OnWindowDetected(HWND hwnd, const std::string& caption); + virtual void OnWindowOpen(HWND hwnd); + virtual void OnWindowClose(HWND hwnd); static BOOL CALLBACK EnumChildren(HWND hwnd, LPARAM param); protected: @@ -119,12 +120,9 @@ SupplyProxyCredentials::SupplyProxyCredentials(const char* username, : username_(username), password_(password) { } -void SupplyProxyCredentials::OnWindowDetected(HWND hwnd, - const std::string& caption) { - // IE's dialog caption (en-US). - if (caption.compare("Windows Security") != 0) - return; +void SupplyProxyCredentials::OnWindowClose(HWND hwnd) { } +void SupplyProxyCredentials::OnWindowOpen(HWND hwnd) { DialogProps props = {0}; ::EnumChildWindows(hwnd, EnumChildren, reinterpret_cast<LPARAM>(&props)); DCHECK(::IsWindow(props.username_)); @@ -474,8 +472,7 @@ int main(int argc, char** argv) { WindowWatchdog watchdog; // See url_request_unittest.cc for these credentials. SupplyProxyCredentials credentials("user", "secret"); - // Check for a dialog class ("#32770") - watchdog.AddObserver(&credentials, "#32770"); + watchdog.AddObserver(&credentials, "Windows Security"); testing::InitGoogleTest(&argc, argv); FilterDisabledTests(); PluginService::EnableChromePlugins(false); |