OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 void waitForLoadToComplete(); | 107 void waitForLoadToComplete(); |
108 | 108 |
109 private: | 109 private: |
110 int m_loadsInProgress; | 110 int m_loadsInProgress; |
111 }; | 111 }; |
112 | 112 |
113 // Minimal implementation of WebRemoteFrameClient needed for unit tests that loa
d remote frames. Tests that load | 113 // Minimal implementation of WebRemoteFrameClient needed for unit tests that loa
d remote frames. Tests that load |
114 // frames and need further specialization of WebFrameClient behavior should subc
lass this. | 114 // frames and need further specialization of WebFrameClient behavior should subc
lass this. |
115 class TestWebRemoteFrameClient : public WebRemoteFrameClient { | 115 class TestWebRemoteFrameClient : public WebRemoteFrameClient { |
116 public: | 116 public: |
117 // Notifies the embedder that a postMessage was issued to a remote frame. | 117 TestWebRemoteFrameClient(); |
118 virtual void postMessageEvent( | 118 |
| 119 WebRemoteFrame* frame() const { return m_frame; } |
| 120 |
| 121 // WebRemoteFrameClient overrides: |
| 122 void frameDetached() override; |
| 123 void postMessageEvent( |
119 WebLocalFrame* sourceFrame, | 124 WebLocalFrame* sourceFrame, |
120 WebRemoteFrame* targetFrame, | 125 WebRemoteFrame* targetFrame, |
121 WebSecurityOrigin targetOrigin, | 126 WebSecurityOrigin targetOrigin, |
122 WebDOMMessageEvent) { } | 127 WebDOMMessageEvent) override { } |
| 128 |
| 129 private: |
| 130 WebRemoteFrame* const m_frame; |
123 }; | 131 }; |
124 | 132 |
125 class TestWebViewClient : public WebViewClient { | 133 class TestWebViewClient : public WebViewClient { |
126 public: | 134 public: |
127 virtual ~TestWebViewClient() { } | 135 virtual ~TestWebViewClient() { } |
128 virtual void initializeLayerTreeView() override; | 136 virtual void initializeLayerTreeView() override; |
129 virtual WebLayerTreeView* layerTreeView() override { return m_layerTreeView.
get(); } | 137 virtual WebLayerTreeView* layerTreeView() override { return m_layerTreeView.
get(); } |
130 | 138 |
131 private: | 139 private: |
132 OwnPtr<WebLayerTreeView> m_layerTreeView; | 140 OwnPtr<WebLayerTreeView> m_layerTreeView; |
(...skipping 12 matching lines...) Expand all Loading... |
145 { | 153 { |
146 Settings::setMockScrollbarsEnabled(false); | 154 Settings::setMockScrollbarsEnabled(false); |
147 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(false); | 155 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(false); |
148 } | 156 } |
149 }; | 157 }; |
150 | 158 |
151 } // namespace FrameTestHelpers | 159 } // namespace FrameTestHelpers |
152 } // namespace blink | 160 } // namespace blink |
153 | 161 |
154 #endif // FrameTestHelpers_h | 162 #endif // FrameTestHelpers_h |
OLD | NEW |