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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.h

Issue 10168019: Adds an automation hook WaitUntilNavigationCompletes() which blocks until pending navigation comple… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a possible race condition. Created 8 years, 8 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 | « no previous file | chrome/browser/automation/testing_automation_provider.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) 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 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_
6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 // Example: 936 // Example:
937 // input: { "windex": 1, 937 // input: { "windex": 1,
938 // "tab_index": 3, 938 // "tab_index": 3,
939 // "auto_id": { "type": 0, "id": "awoein" }, 939 // "auto_id": { "type": 0, "id": "awoein" },
940 // "url": "http://www.google.com", 940 // "url": "http://www.google.com",
941 // "navigation_count": 1 // number of navigations to wait for 941 // "navigation_count": 1 // number of navigations to wait for
942 // } 942 // }
943 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } 943 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS }
944 void NavigateToURL(base::DictionaryValue* args, IPC::Message* reply_message); 944 void NavigateToURL(base::DictionaryValue* args, IPC::Message* reply_message);
945 945
946 // Waits until any pending navigation completes in the specified tab.
947 // The pair |windex| and |tab_index| or the single |auto_id| must be given
948 // to specify the tab.
949 // Example:
950 // input: { "windex": 1,
951 // "tab_index": 1,
952 // "auto_id": { "type": 0, "id": "awoein" },
953 // }
954 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS }
955 void WaitUntilNavigationCompletes(
956 base::DictionaryValue* args, IPC::Message* reply_message);
957
946 // Executes javascript in the specified frame. Uses the JSON interface. 958 // Executes javascript in the specified frame. Uses the JSON interface.
947 // Waits for a result from the |DOMAutomationController|. The javascript 959 // Waits for a result from the |DOMAutomationController|. The javascript
948 // must send a string. 960 // must send a string.
949 // The pair |windex| and |tab_index| or the single |auto_id| must be given 961 // The pair |windex| and |tab_index| or the single |auto_id| must be given
950 // to specify the tab. 962 // to specify the tab.
951 // Example: 963 // Example:
952 // input: { "windex": 1, 964 // input: { "windex": 1,
953 // "tab_index": 1, 965 // "tab_index": 1,
954 // "auto_id": { "type": 0, "id": "awoein" }, 966 // "auto_id": { "type": 0, "id": "awoein" },
955 // "frame_xpath": "//frames[1]", 967 // "frame_xpath": "//frames[1]",
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 ImportSettingsData import_settings_data_; 1594 ImportSettingsData import_settings_data_;
1583 1595
1584 // The automation event observer queue. It is lazily created when an observer 1596 // The automation event observer queue. It is lazily created when an observer
1585 // is added to avoid overhead when not needed. 1597 // is added to avoid overhead when not needed.
1586 scoped_ptr<AutomationEventQueue> automation_event_queue_; 1598 scoped_ptr<AutomationEventQueue> automation_event_queue_;
1587 1599
1588 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); 1600 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider);
1589 }; 1601 };
1590 1602
1591 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ 1603 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698