| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 gfx::Point point); | 344 gfx::Point point); |
| 345 // | 345 // |
| 346 // Waits until the cc::Surface associated with a guest/cross-process-iframe | 346 // Waits until the cc::Surface associated with a guest/cross-process-iframe |
| 347 // has been drawn for the first time. Once this method returns it should be | 347 // has been drawn for the first time. Once this method returns it should be |
| 348 // safe to assume that events sent to the top-level RenderWidgetHostView can | 348 // safe to assume that events sent to the top-level RenderWidgetHostView can |
| 349 // be expected to properly hit-test to this surface, if appropriate. | 349 // be expected to properly hit-test to this surface, if appropriate. |
| 350 void WaitForGuestSurfaceReady(content::WebContents* web_contents); | 350 void WaitForGuestSurfaceReady(content::WebContents* web_contents); |
| 351 | 351 |
| 352 #endif | 352 #endif |
| 353 | 353 |
| 354 // Waits until the cc::Surface associated with a cross-process child frame |
| 355 // has been drawn for the first time. Once this method returns it should be |
| 356 // safe to assume that events sent to the top-level RenderWidgetHostView can |
| 357 // be expected to properly hit-test to this surface, if appropriate. |
| 358 void WaitForChildFrameSurfaceReady(content::RenderFrameHost* child_frame); |
| 359 |
| 354 // Watches title changes on a WebContents, blocking until an expected title is | 360 // Watches title changes on a WebContents, blocking until an expected title is |
| 355 // set. | 361 // set. |
| 356 class TitleWatcher : public WebContentsObserver { | 362 class TitleWatcher : public WebContentsObserver { |
| 357 public: | 363 public: |
| 358 // |web_contents| must be non-NULL and needs to stay alive for the | 364 // |web_contents| must be non-NULL and needs to stay alive for the |
| 359 // entire lifetime of |this|. |expected_title| is the title that |this| | 365 // entire lifetime of |this|. |expected_title| is the title that |this| |
| 360 // will wait for. | 366 // will wait for. |
| 361 TitleWatcher(WebContents* web_contents, | 367 TitleWatcher(WebContents* web_contents, |
| 362 const base::string16& expected_title); | 368 const base::string16& expected_title); |
| 363 ~TitleWatcher() override; | 369 ~TitleWatcher() override; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 | 775 |
| 770 private: | 776 private: |
| 771 PwnMessageHelper(); // Not instantiable. | 777 PwnMessageHelper(); // Not instantiable. |
| 772 | 778 |
| 773 DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper); | 779 DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper); |
| 774 }; | 780 }; |
| 775 | 781 |
| 776 } // namespace content | 782 } // namespace content |
| 777 | 783 |
| 778 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 784 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| OLD | NEW |