| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ | 5 #ifndef CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ |
| 6 #define CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ | 6 #define CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
| 15 #include "content/public/test/test_utils.h" | 15 #include "content/public/test/test_utils.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 class FrameTreeNode; | 20 class FrameTreeNode; |
| 21 class RenderFrameHostImpl; | |
| 22 class WebContents; | 21 class WebContents; |
| 23 struct LoadCommittedDetails; | |
| 24 | 22 |
| 25 // For content_browsertests, which run on the UI thread, run a second | 23 // For content_browsertests, which run on the UI thread, run a second |
| 26 // MessageLoop and quit when the navigation in a specific frame (and all of its | 24 // MessageLoop and quit when the navigation in a specific frame (and all of its |
| 27 // subframes) has completed loading. | 25 // subframes) has completed loading. |
| 28 class TestFrameNavigationObserver : public WebContentsObserver { | 26 class TestFrameNavigationObserver : public WebContentsObserver { |
| 29 public: | 27 public: |
| 30 // Create and register a new TestFrameNavigationObserver which will track | 28 // Create and register a new TestFrameNavigationObserver which will track |
| 31 // navigations performed in the specified |node| of the frame tree. | 29 // navigations performed in the specified |node| of the frame tree. |
| 32 explicit TestFrameNavigationObserver(FrameTreeNode* node); | 30 explicit TestFrameNavigationObserver(FrameTreeNode* node); |
| 33 | 31 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 66 |
| 69 // The MessageLoopRunner used to spin the message loop. | 67 // The MessageLoopRunner used to spin the message loop. |
| 70 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 68 scoped_refptr<MessageLoopRunner> message_loop_runner_; |
| 71 | 69 |
| 72 DISALLOW_COPY_AND_ASSIGN(TestFrameNavigationObserver); | 70 DISALLOW_COPY_AND_ASSIGN(TestFrameNavigationObserver); |
| 73 }; | 71 }; |
| 74 | 72 |
| 75 } // namespace content | 73 } // namespace content |
| 76 | 74 |
| 77 #endif // CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ | 75 #endif // CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ |
| OLD | NEW |