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

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

Issue 10787010: Switch to TimeDelta interfaces in chrome automation test infrastructure. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/memory/ref_counted.h" 5 #include "base/memory/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/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ASSERT_TRUE(proxy->is_valid()); 48 ASSERT_TRUE(proxy->is_valid());
49 if (!proxy->DoesAttributeEventuallyMatch(attribute, new_value)) 49 if (!proxy->DoesAttributeEventuallyMatch(attribute, new_value))
50 FAIL() << "Executing or parsing JavaScript failed"; 50 FAIL() << "Executing or parsing JavaScript failed";
51 } 51 }
52 52
53 // Tests the DOMAutomation framework for manipulating DOMElements within 53 // Tests the DOMAutomation framework for manipulating DOMElements within
54 // browser tests. 54 // browser tests.
55 class DOMAutomationTest : public InProcessBrowserTest { 55 class DOMAutomationTest : public InProcessBrowserTest {
56 public: 56 public:
57 DOMAutomationTest() { 57 DOMAutomationTest() {
58 JavaScriptExecutionController::set_timeout(30000); 58 JavaScriptExecutionController::set_timeout(
59 base::TimeDelta::FromSeconds(30));
59 } 60 }
60 61
61 GURL GetTestURL(const char* path) { 62 GURL GetTestURL(const char* path) {
62 std::string url_path = "files/dom_automation/"; 63 std::string url_path = "files/dom_automation/";
63 url_path.append(path); 64 url_path.append(path);
64 return test_server()->GetURL(url_path); 65 return test_server()->GetURL(url_path);
65 } 66 }
66 }; 67 };
67 68
68 typedef DOMElementProxy::By By; 69 typedef DOMElementProxy::By By;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 L"' \"" 336 L"' \""
336 }; 337 };
337 for (size_t i = 0; i < 3; i++) { 338 for (size_t i = 0; i < 3; i++) {
338 ASSERT_TRUE(textarea->SetText(WideToUTF8(set_and_expect_strings[i]))); 339 ASSERT_TRUE(textarea->SetText(WideToUTF8(set_and_expect_strings[i])));
339 ASSERT_NO_FATAL_FAILURE(EnsureTextMatches( 340 ASSERT_NO_FATAL_FAILURE(EnsureTextMatches(
340 textarea, WideToUTF8(set_and_expect_strings[i]))); 341 textarea, WideToUTF8(set_and_expect_strings[i])));
341 } 342 }
342 } 343 }
343 344
344 } // namespace 345 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/automation/browser_proxy.cc ('k') | chrome/test/automation/javascript_execution_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698