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

Side by Side Diff: chrome/test/selenium/selenium_test.cc

Issue 113722: Make automation proxy objects to ref_counted. That allows to process async no... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/reliability/page_load_test.cc ('k') | chrome/test/startup/feature_startup_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is a gTest-based test that runs the Selenium Core testsuite in Chrome 5 // This is a gTest-based test that runs the Selenium Core testsuite in Chrome
6 // using the UITest automation. The number of total and failed tests are 6 // using the UITest automation. The number of total and failed tests are
7 // written to stdout. 7 // written to stdout.
8 // 8 //
9 // TODO(darin): output the names of the failed tests so we can easily track 9 // TODO(darin): output the names of the failed tests so we can easily track
10 // deviations from the expected output. 10 // deviations from the expected output.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 PathService::Get(chrome::DIR_TEST_DATA, &test_path); 96 PathService::Get(chrome::DIR_TEST_DATA, &test_path);
97 file_util::UpOneDirectory(&test_path); 97 file_util::UpOneDirectory(&test_path);
98 file_util::UpOneDirectory(&test_path); 98 file_util::UpOneDirectory(&test_path);
99 file_util::UpOneDirectory(&test_path); 99 file_util::UpOneDirectory(&test_path);
100 file_util::AppendToPath(&test_path, L"data"); 100 file_util::AppendToPath(&test_path, L"data");
101 file_util::AppendToPath(&test_path, L"selenium_core"); 101 file_util::AppendToPath(&test_path, L"selenium_core");
102 file_util::AppendToPath(&test_path, L"core"); 102 file_util::AppendToPath(&test_path, L"core");
103 file_util::AppendToPath(&test_path, L"TestRunner.html"); 103 file_util::AppendToPath(&test_path, L"TestRunner.html");
104 104
105 GURL test_url(net::FilePathToFileURL(FilePath::FromWStringHack(test_path))); 105 GURL test_url(net::FilePathToFileURL(FilePath::FromWStringHack(test_path)));
106 scoped_ptr<TabProxy> tab(GetActiveTab()); 106 scoped_refptr<TabProxy> tab(GetActiveTab());
107 tab->NavigateToURL(test_url); 107 tab->NavigateToURL(test_url);
108 108
109 // Wait for the test to finish. 109 // Wait for the test to finish.
110 ASSERT_TRUE(WaitUntilCookieValue(tab.get(), test_url, "__tests_finished", 110 ASSERT_TRUE(WaitUntilCookieValue(tab.get(), test_url, "__tests_finished",
111 3000, UITest::test_timeout_ms(), "1")); 111 3000, UITest::test_timeout_ms(), "1"));
112 112
113 std::string cookie; 113 std::string cookie;
114 ASSERT_TRUE(tab->GetCookieByName(test_url, "__num_tests_total", &cookie)); 114 ASSERT_TRUE(tab->GetCookieByName(test_url, "__num_tests_total", &cookie));
115 total->swap(UTF8ToWide(cookie)); 115 total->swap(UTF8ToWide(cookie));
116 ASSERT_FALSE(total->empty()); 116 ASSERT_FALSE(total->empty());
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 if (!new_passes_list.empty()) { 166 if (!new_passes_list.empty()) {
167 printf("new tests passing:\n"); 167 printf("new tests passing:\n");
168 ResultsList::const_iterator it = new_passes_list.begin(); 168 ResultsList::const_iterator it = new_passes_list.begin();
169 for (; it != new_passes_list.end(); ++it) 169 for (; it != new_passes_list.end(); ++it)
170 printf(" %s\n", it->c_str()); 170 printf(" %s\n", it->c_str());
171 printf("\n"); 171 printf("\n");
172 } 172 }
173 } 173 }
OLDNEW
« no previous file with comments | « chrome/test/reliability/page_load_test.cc ('k') | chrome/test/startup/feature_startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698