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

Side by Side Diff: chrome/test/automation/dom_automation_browsertest.cc

Issue 4231004: Marking DOMAutomationTest.FindByXPath as flaky on windows.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "base/ref_counted.h" 5 #include "base/ref_counted.h"
6 #include "base/string_number_conversions.h" 6 #include "base/string_number_conversions.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/test/automation/dom_element_proxy.h" 8 #include "chrome/test/automation/dom_element_proxy.h"
9 #include "chrome/test/automation/javascript_execution_controller.h" 9 #include "chrome/test/automation/javascript_execution_controller.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 13 matching lines...) Expand all
24 24
25 GURL GetTestURL(const char* path) { 25 GURL GetTestURL(const char* path) {
26 std::string url_path = "files/dom_automation/"; 26 std::string url_path = "files/dom_automation/";
27 url_path.append(path); 27 url_path.append(path);
28 return test_server()->GetURL(url_path); 28 return test_server()->GetURL(url_path);
29 } 29 }
30 }; 30 };
31 31
32 typedef DOMElementProxy::By By; 32 typedef DOMElementProxy::By By;
33 33
34 IN_PROC_BROWSER_TEST_F(DOMAutomationTest, FindByXPath) { 34 #if defined(OS_WIN)
35 // See http://crbug.com/61636
36 #define MAYBE_FindByXPath FLAKY_FindByXPath
37 #else
38 #define MAYBE_FindByXPath FindByXPath
39 #endif
40
41 IN_PROC_BROWSER_TEST_F(DOMAutomationTest, MAYBE_FindByXPath) {
35 ASSERT_TRUE(test_server()->Start()); 42 ASSERT_TRUE(test_server()->Start());
36 ui_test_utils::NavigateToURL(browser(), 43 ui_test_utils::NavigateToURL(browser(),
37 GetTestURL("find_elements/test.html")); 44 GetTestURL("find_elements/test.html"));
38 DOMElementProxyRef main_doc = ui_test_utils::GetActiveDOMDocument(browser()); 45 DOMElementProxyRef main_doc = ui_test_utils::GetActiveDOMDocument(browser());
39 46
40 // Find first element. 47 // Find first element.
41 DOMElementProxyRef first_div = main_doc->FindElement(By::XPath("//div")); 48 DOMElementProxyRef first_div = main_doc->FindElement(By::XPath("//div"));
42 ASSERT_TRUE(first_div); 49 ASSERT_TRUE(first_div);
43 ASSERT_NO_FATAL_FAILURE(first_div->EnsureNameMatches("0")); 50 ASSERT_NO_FATAL_FAILURE(first_div->EnsureNameMatches("0"));
44 51
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 L"' \"" 294 L"' \""
288 }; 295 };
289 for (size_t i = 0; i < 3; i++) { 296 for (size_t i = 0; i < 3; i++) {
290 ASSERT_TRUE(textarea->SetText(WideToUTF8(set_and_expect_strings[i]))); 297 ASSERT_TRUE(textarea->SetText(WideToUTF8(set_and_expect_strings[i])));
291 ASSERT_NO_FATAL_FAILURE(textarea->EnsureTextMatches( 298 ASSERT_NO_FATAL_FAILURE(textarea->EnsureTextMatches(
292 WideToUTF8(set_and_expect_strings[i]))); 299 WideToUTF8(set_and_expect_strings[i])));
293 } 300 }
294 } 301 }
295 302
296 } // namespace 303 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698