diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 17:42:42 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 17:42:42 +0000 |
commit | 8a3422c9488ce79e305973d29a01811762e35465 (patch) | |
tree | 7fc94cb7aa013f7bb2afaf4100b1a8f45208cc00 /chrome/test/automation/tab_proxy.h | |
parent | 5eb64653873981c7dbf693a9aba7c7da011b14a3 (diff) | |
download | chromium_src-8a3422c9488ce79e305973d29a01811762e35465.zip chromium_src-8a3422c9488ce79e305973d29a01811762e35465.tar.gz chromium_src-8a3422c9488ce79e305973d29a01811762e35465.tar.bz2 |
This CL adds new UI tests for the SSL UI.
Some more info:
SSL UI Tests:
Added new tests for redirects and frames.
Also improved the mixed-content test to exercise the "block mixed-contents" preference and the show info-bar.
Automation:
For the new UI tests, added methods to tab_proxy and browser_proxy. The ones of most interest are GetLastNavigatinTime and WaitForNavigation that ensures we wait for a navigation to occur or have occured when taking actions that asynchronously trigger navigations.
Resource loading:
Added a flag to the response we get when loading a resource that indicates whether that resource was filtered (blocked or altered) by the security peer. We use this flag to notify back the browser when we report a load has been committed.
This is so the SSL manager knows a frame has been filtered (in which case we have no cert info but should not consider that as unsafe).
BUG=2004
Review URL: http://codereview.chromium.org/3165
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2553 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/tab_proxy.h')
-rw-r--r-- | chrome/test/automation/tab_proxy.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index 220d096..a13e6a5 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -44,10 +44,9 @@ class TabProxy : public AutomationResourceProxy { // failure. ConstrainedWindowProxy* GetConstrainedWindow(int window_index) const; - // Execute a javascript in a frame's context whose xpath - // is provided as the first parameter and extract - // the values from the resulting json string. - // Example: + // Executes a javascript in a frame's context whose xpath is provided as the + // first parameter and extract the values from the resulting json string. + // Examples: // jscript = "window.domAutomationController.send('string');" // will result in value = "string" // jscript = "window.domAutomationController.send(24);" @@ -254,6 +253,28 @@ class TabProxy : public AutomationResourceProxy { const std::string& target, const std::string& message); + // Retrieves the number of SSL related info-bars currently showing in |count|. + bool GetSSLInfoBarCount(int* count); + + // Causes a click on the link of the info-bar at |info_bar_index|. If + // |wait_for_navigation| is true, this call does not return until a navigation + // has occured. + bool ClickSSLInfoBarLink(int info_bar_index, bool wait_for_navigation); + + // Retrieves the time at which the last navigation occured. This is intended + // to be used with WaitForNavigation (see below). + bool GetLastNavigationTime(int64* last_navigation_time); + + // Waits for a new navigation if none as occurred since |last_navigation_time| + // The purpose of this function is for operations that causes asynchronous + // navigation to happen. + // It is supposed to be used as follow: + // int64 last_nav_time; + // tab_proxy->GetLastNavigationTime(&last_nav_time); + // tab_proxy->SomeOperationThatTriggersAnAsynchronousNavigation(); + // tab_proxy->WaitForNavigation(last_nav_time); + bool WaitForNavigation(int64 last_navigation_time); + private: DISALLOW_COPY_AND_ASSIGN(TabProxy); }; |