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

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

Issue 1052993006: Refactor frame navigation/detach state cleanup to be more sane. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor test cleanup 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 // 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
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
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