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

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

Issue 962053003: tests: Use runPendingTasks instead of WebThread::enterRunLoop()/exitRunLoop() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 9 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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Same as above, but for WebFrame::loadHistoryItem(). 60 // Same as above, but for WebFrame::loadHistoryItem().
61 void loadHistoryItem(WebFrame*, const WebHistoryItem&, WebHistoryLoadType, WebUR LRequest::CachePolicy); 61 void loadHistoryItem(WebFrame*, const WebHistoryItem&, WebHistoryLoadType, WebUR LRequest::CachePolicy);
62 // Same as above, but for WebFrame::reload(). 62 // Same as above, but for WebFrame::reload().
63 void reloadFrame(WebFrame*); 63 void reloadFrame(WebFrame*);
64 void reloadFrameIgnoringCache(WebFrame*); 64 void reloadFrameIgnoringCache(WebFrame*);
65 65
66 // Pumps pending resource requests while waiting for a frame to load. Don't use 66 // Pumps pending resource requests while waiting for a frame to load. Don't use
67 // this. Use one of the above helpers. 67 // this. Use one of the above helpers.
68 void pumpPendingRequestsDoNotUse(WebFrame*); 68 void pumpPendingRequestsDoNotUse(WebFrame*);
69 69
70 void runPendingTasks();
71
72 // Convenience class for handling the lifetime of a WebView and its associated m ainframe in tests. 70 // Convenience class for handling the lifetime of a WebView and its associated m ainframe in tests.
73 class WebViewHelper { 71 class WebViewHelper {
74 WTF_MAKE_NONCOPYABLE(WebViewHelper); 72 WTF_MAKE_NONCOPYABLE(WebViewHelper);
75 public: 73 public:
76 WebViewHelper(); 74 WebViewHelper();
77 ~WebViewHelper(); 75 ~WebViewHelper();
78 76
79 // Creates and initializes the WebView. Implicitly calls reset() first. IF a 77 // Creates and initializes the WebView. Implicitly calls reset() first. IF a
80 // WebFrameClient or a WebViewClient are passed in, they must outlive the 78 // WebFrameClient or a WebViewClient are passed in, they must outlive the
81 // WebViewHelper. 79 // WebViewHelper.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 { 145 {
148 Settings::setMockScrollbarsEnabled(false); 146 Settings::setMockScrollbarsEnabled(false);
149 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(false); 147 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(false);
150 } 148 }
151 }; 149 };
152 150
153 } // namespace FrameTestHelpers 151 } // namespace FrameTestHelpers
154 } // namespace blink 152 } // namespace blink
155 153
156 #endif // FrameTestHelpers_h 154 #endif // FrameTestHelpers_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698