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 TestWebRemoteFrameClient(); | 117 // Notifies the embedder that a postMessage was issued to a remote frame. |
118 | 118 virtual void postMessageEvent( |
119 WebRemoteFrame* frame() const { return m_frame; } | |
120 | |
121 // WebRemoteFrameClient overrides: | |
122 void frameDetached() override; | |
123 void postMessageEvent( | |
124 WebLocalFrame* sourceFrame, | 119 WebLocalFrame* sourceFrame, |
125 WebRemoteFrame* targetFrame, | 120 WebRemoteFrame* targetFrame, |
126 WebSecurityOrigin targetOrigin, | 121 WebSecurityOrigin targetOrigin, |
127 WebDOMMessageEvent) override { } | 122 WebDOMMessageEvent) { } |
128 | |
129 private: | |
130 WebRemoteFrame* const m_frame; | |
131 }; | 123 }; |
132 | 124 |
133 class TestWebViewClient : public WebViewClient { | 125 class TestWebViewClient : public WebViewClient { |
134 public: | 126 public: |
135 virtual ~TestWebViewClient() { } | 127 virtual ~TestWebViewClient() { } |
136 virtual void initializeLayerTreeView() override; | 128 virtual void initializeLayerTreeView() override; |
137 virtual WebLayerTreeView* layerTreeView() override { return m_layerTreeView.
get(); } | 129 virtual WebLayerTreeView* layerTreeView() override { return m_layerTreeView.
get(); } |
138 | 130 |
139 private: | 131 private: |
140 OwnPtr<WebLayerTreeView> m_layerTreeView; | 132 OwnPtr<WebLayerTreeView> m_layerTreeView; |
(...skipping 12 matching lines...) Expand all Loading... |
153 { | 145 { |
154 Settings::setMockScrollbarsEnabled(false); | 146 Settings::setMockScrollbarsEnabled(false); |
155 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(false); | 147 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(false); |
156 } | 148 } |
157 }; | 149 }; |
158 | 150 |
159 } // namespace FrameTestHelpers | 151 } // namespace FrameTestHelpers |
160 } // namespace blink | 152 } // namespace blink |
161 | 153 |
162 #endif // FrameTestHelpers_h | 154 #endif // FrameTestHelpers_h |
OLD | NEW |