Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Side by Side Diff: Source/web/tests/FrameTestHelpers.h

Issue 1058403002: Revert of Refactor frame navigation/detach state cleanup to be more sane. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/xml/XSLTProcessor.cpp ('k') | Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/xml/XSLTProcessor.cpp ('k') | Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698