OLD | NEW |
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 Loading... |
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 EnableDOMAutomation(); | |
59 JavaScriptExecutionController::set_timeout(30000); | 58 JavaScriptExecutionController::set_timeout(30000); |
60 } | 59 } |
61 | 60 |
62 GURL GetTestURL(const char* path) { | 61 GURL GetTestURL(const char* path) { |
63 std::string url_path = "files/dom_automation/"; | 62 std::string url_path = "files/dom_automation/"; |
64 url_path.append(path); | 63 url_path.append(path); |
65 return test_server()->GetURL(url_path); | 64 return test_server()->GetURL(url_path); |
66 } | 65 } |
67 }; | 66 }; |
68 | 67 |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 L"' \"" | 335 L"' \"" |
337 }; | 336 }; |
338 for (size_t i = 0; i < 3; i++) { | 337 for (size_t i = 0; i < 3; i++) { |
339 ASSERT_TRUE(textarea->SetText(WideToUTF8(set_and_expect_strings[i]))); | 338 ASSERT_TRUE(textarea->SetText(WideToUTF8(set_and_expect_strings[i]))); |
340 ASSERT_NO_FATAL_FAILURE(EnsureTextMatches( | 339 ASSERT_NO_FATAL_FAILURE(EnsureTextMatches( |
341 textarea, WideToUTF8(set_and_expect_strings[i]))); | 340 textarea, WideToUTF8(set_and_expect_strings[i]))); |
342 } | 341 } |
343 } | 342 } |
344 | 343 |
345 } // namespace | 344 } // namespace |
OLD | NEW |