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

Unified Diff: chrome/test/automation/automation_proxy_uitest.cc

Issue 7104029: Automation: fix chrome/browser dependency on chrome/test headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « chrome/test/automation/autocomplete_edit_proxy.cc ('k') | chrome/test/automation/browser_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/automation_proxy_uitest.cc
===================================================================
--- chrome/test/automation/automation_proxy_uitest.cc (revision 87598)
+++ chrome/test/automation/automation_proxy_uitest.cc (working copy)
@@ -24,7 +24,6 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
-#include "chrome/test/automation/autocomplete_edit_proxy.h"
#include "chrome/test/automation/automation_proxy_uitest.h"
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/proxy_launcher.h"
@@ -1378,82 +1377,8 @@
::DestroyWindow(foo_host);
mock_->DestroyHostWindow();
}
-
#endif // defined(OS_WIN)
-// TODO(port): Need to port autocomplete_edit_proxy.* first.
-#if defined(OS_WIN) || defined(OS_LINUX)
-TEST_F(AutomationProxyTest, AutocompleteGetSetText) {
- scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
- ASSERT_TRUE(browser.get());
- scoped_refptr<AutocompleteEditProxy> edit(
- browser->GetAutocompleteEdit());
- ASSERT_TRUE(edit.get());
- EXPECT_TRUE(edit->is_valid());
- const string16 text_to_set = ASCIIToUTF16("Lollerskates");
- string16 actual_text;
- EXPECT_TRUE(edit->SetText(text_to_set));
- EXPECT_TRUE(edit->GetText(&actual_text));
- EXPECT_EQ(text_to_set, actual_text);
- scoped_refptr<AutocompleteEditProxy> edit2(
- browser->GetAutocompleteEdit());
- EXPECT_TRUE(edit2->GetText(&actual_text));
- EXPECT_EQ(text_to_set, actual_text);
-}
-
-TEST_F(AutomationProxyTest, AutocompleteParallelProxy) {
- scoped_refptr<BrowserProxy> browser1(automation()->GetBrowserWindow(0));
- ASSERT_TRUE(browser1.get());
- scoped_refptr<AutocompleteEditProxy> edit1(
- browser1->GetAutocompleteEdit());
- ASSERT_TRUE(edit1.get());
- EXPECT_TRUE(browser1->RunCommand(IDC_NEW_WINDOW));
- scoped_refptr<BrowserProxy> browser2(automation()->GetBrowserWindow(1));
- ASSERT_TRUE(browser2.get());
- scoped_refptr<AutocompleteEditProxy> edit2(
- browser2->GetAutocompleteEdit());
- ASSERT_TRUE(edit2.get());
- EXPECT_TRUE(browser2->GetTab(0)->WaitForTabToBeRestored(
- TestTimeouts::action_max_timeout_ms()));
- const string16 text_to_set1 = ASCIIToUTF16("Lollerskates");
- const string16 text_to_set2 = ASCIIToUTF16("Roflcopter");
- string16 actual_text1, actual_text2;
- EXPECT_TRUE(edit1->SetText(text_to_set1));
- EXPECT_TRUE(edit2->SetText(text_to_set2));
- EXPECT_TRUE(edit1->GetText(&actual_text1));
- EXPECT_TRUE(edit2->GetText(&actual_text2));
- EXPECT_EQ(text_to_set1, actual_text1);
- EXPECT_EQ(text_to_set2, actual_text2);
-}
-
-#endif // defined(OS_WIN) || defined(OS_LINUX)
-
-#if defined(OS_MACOSX)
-// Disabled, http://crbug.com/48601.
-#define AutocompleteMatchesTest DISABLED_AutocompleteMatchesTest
-#else
-// Flaky, http://crbug.com/19876.
-#define AutocompleteMatchesTest FLAKY_AutocompleteMatchesTest
-#endif
-TEST_F(AutomationProxyVisibleTest, AutocompleteMatchesTest) {
- scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
- ASSERT_TRUE(browser.get());
- scoped_refptr<AutocompleteEditProxy> edit(
- browser->GetAutocompleteEdit());
- ASSERT_TRUE(edit.get());
- EXPECT_TRUE(edit->is_valid());
- EXPECT_TRUE(browser->ApplyAccelerator(IDC_FOCUS_LOCATION));
- ASSERT_TRUE(edit->WaitForFocus());
- EXPECT_TRUE(edit->SetText(ASCIIToUTF16("Roflcopter")));
- EXPECT_TRUE(edit->WaitForQuery(TestTimeouts::action_max_timeout_ms()));
- bool query_in_progress;
- EXPECT_TRUE(edit->IsQueryInProgress(&query_in_progress));
- EXPECT_FALSE(query_in_progress);
- std::vector<AutocompleteMatchData> matches;
- EXPECT_TRUE(edit->GetAutocompleteMatches(&matches));
- EXPECT_FALSE(matches.empty());
-}
-
// Flaky especially on Windows. See crbug.com/25039.
TEST_F(AutomationProxyTest, FLAKY_AppModalDialogTest) {
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
« no previous file with comments | « chrome/test/automation/autocomplete_edit_proxy.cc ('k') | chrome/test/automation/browser_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698