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 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
303 // is equal to the given name. If not, sets up a notification waiter | 303 // is equal to the given name. If not, sets up a notification waiter |
304 // that listens for any accessibility event in any frame, and checks again | 304 // that listens for any accessibility event in any frame, and checks again |
305 // after each event. Keeps looping until the text is found (or the | 305 // after each event. Keeps looping until the text is found (or the |
306 // test times out). | 306 // test times out). |
307 void WaitForAccessibilityTreeToContainNodeWithName(WebContents* web_contents, | 307 void WaitForAccessibilityTreeToContainNodeWithName(WebContents* web_contents, |
308 const std::string& name); | 308 const std::string& name); |
309 | 309 |
310 // Get a snapshot of a web page's accessibility tree. | 310 // Get a snapshot of a web page's accessibility tree. |
311 ui::AXTreeUpdate GetAccessibilityTreeSnapshot(WebContents* web_contents); | 311 ui::AXTreeUpdate GetAccessibilityTreeSnapshot(WebContents* web_contents); |
312 | 312 |
313 // Find out if the BrowserPlugin for a guest webcontents is focused. Returns | |
Charlie Reis
2016/07/06 18:28:50
nit: WebContents
wjmaclean
2016/07/06 19:49:31
Done.
| |
314 // false if the WebContents doesn't have a BrowserPlugin. | |
Charlie Reis
2016/07/06 18:28:49
"doesn't have a BrowserPlugin": I'm not sure how t
wjmaclean
2016/07/06 19:49:31
Done.
| |
315 bool IsWebContentsBrowserPluginFocused(content::WebContents* web_contents); | |
316 | |
317 #if defined(USE_AURA) | |
318 // Send a TouchStart/End sequence routed via the main frame's | |
319 // RenderWidgetHostViewAura. | |
Charlie Reis
2016/07/06 18:28:49
Maybe mention why these two methods are useful?
wjmaclean
2016/07/06 19:49:31
Done.
| |
320 void SendRoutedTouchTapSequence(content::WebContents* web_contents, | |
321 gfx::Point point); | |
322 | |
323 // Send a GestureTapDown/GestureTap sequence routed via the main frame's | |
324 // RenderWidgetHostViewAura. | |
325 void SendRoutedGestureTapSequence(content::WebContents* web_contents, | |
326 gfx::Point point); | |
327 #endif | |
328 | |
329 void WaitForSurfaceReady(content::WebContents* web_contents); | |
Charlie Reis
2016/07/06 18:28:49
nit: Please comment all methods in the public inte
wjmaclean
2016/07/06 19:49:31
Done.
Ooops, forgot to comment this one!
| |
330 | |
313 // Watches title changes on a WebContents, blocking until an expected title is | 331 // Watches title changes on a WebContents, blocking until an expected title is |
314 // set. | 332 // set. |
315 class TitleWatcher : public WebContentsObserver { | 333 class TitleWatcher : public WebContentsObserver { |
316 public: | 334 public: |
317 // |web_contents| must be non-NULL and needs to stay alive for the | 335 // |web_contents| must be non-NULL and needs to stay alive for the |
318 // entire lifetime of |this|. |expected_title| is the title that |this| | 336 // entire lifetime of |this|. |expected_title| is the title that |this| |
319 // will wait for. | 337 // will wait for. |
320 TitleWatcher(WebContents* web_contents, | 338 TitleWatcher(WebContents* web_contents, |
321 const base::string16& expected_title); | 339 const base::string16& expected_title); |
322 ~TitleWatcher() override; | 340 ~TitleWatcher() override; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
522 blink::WebInputEvent::Type wait_for_type_; | 540 blink::WebInputEvent::Type wait_for_type_; |
523 uint32_t ack_result_; | 541 uint32_t ack_result_; |
524 base::Closure quit_; | 542 base::Closure quit_; |
525 | 543 |
526 DISALLOW_COPY_AND_ASSIGN(InputMsgWatcher); | 544 DISALLOW_COPY_AND_ASSIGN(InputMsgWatcher); |
527 }; | 545 }; |
528 | 546 |
529 } // namespace content | 547 } // namespace content |
530 | 548 |
531 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 549 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |