Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: chrome/browser/ui/search/instant_test_utils.h

Issue 14130012: InstantExtendedManualTests should fail and not hang (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: virtual dtor Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/search/instant_test_utils.h
diff --git a/chrome/browser/ui/search/instant_test_utils.h b/chrome/browser/ui/search/instant_test_utils.h
index 902af6e9cd044c68c08854f37a2b13f5d6ff18db..f392b6dd398161b4c1cf8f43d4e6ef54749af2a2 100644
--- a/chrome/browser/ui/search/instant_test_utils.h
+++ b/chrome/browser/ui/search/instant_test_utils.h
@@ -32,17 +32,20 @@ class WebContents;
class InstantTestModelObserver : public InstantOverlayModelObserver {
public:
InstantTestModelObserver(InstantOverlayModel* model,
- SearchMode::Type desired_mode_type);
- ~InstantTestModelObserver();
+ SearchMode::Type expected_mode_type);
+ virtual ~InstantTestModelObserver();
- void WaitForDesiredOverlayState();
+ // Returns true if the |expected_mode_type_| was observed in
+ // OverlayStateChanged.
+ bool WaitForExpectedOverlayState();
// Overridden from InstantOverlayModelObserver:
virtual void OverlayStateChanged(const InstantOverlayModel& model) OVERRIDE;
private:
InstantOverlayModel* const model_;
- const SearchMode::Type desired_mode_type_;
+ const SearchMode::Type expected_mode_type_;
+ SearchMode::Type observed_mode_type_;
base::RunLoop run_loop_;
DISALLOW_COPY_AND_ASSIGN(InstantTestModelObserver);
@@ -89,7 +92,7 @@ class InstantTestBase {
void FocusOmniboxAndWaitForInstantExtendedSupport();
void SetOmniboxText(const std::string& text);
- void SetOmniboxTextAndWaitForOverlayToShow(const std::string& text);
+ bool SetOmniboxTextAndWaitForOverlayToShow(const std::string& text);
void SetOmniboxTextAndWaitForSuggestion(const std::string& text);
bool GetBoolFromJS(content::WebContents* contents,
« no previous file with comments | « chrome/browser/ui/search/instant_extended_manual_browsertest.cc ('k') | chrome/browser/ui/search/instant_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698