| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include <gtest/gtest.h> | 47 #include <gtest/gtest.h> |
| 48 #include <string> | 48 #include <string> |
| 49 | 49 |
| 50 namespace blink { | 50 namespace blink { |
| 51 | 51 |
| 52 class WebFrame; | 52 class WebFrame; |
| 53 class WebFrameWidget; | 53 class WebFrameWidget; |
| 54 class WebLocalFrame; | 54 class WebLocalFrame; |
| 55 class WebRemoteFrame; | 55 class WebRemoteFrame; |
| 56 class WebRemoteFrameImpl; | 56 class WebRemoteFrameImpl; |
| 57 enum class WebCachePolicy; |
| 57 | 58 |
| 58 namespace FrameTestHelpers { | 59 namespace FrameTestHelpers { |
| 59 | 60 |
| 60 class TestWebFrameClient; | 61 class TestWebFrameClient; |
| 61 | 62 |
| 62 // Loads a url into the specified WebFrame for testing purposes. Pumps any | 63 // Loads a url into the specified WebFrame for testing purposes. Pumps any |
| 63 // pending resource requests, as well as waiting for the threaded parser to | 64 // pending resource requests, as well as waiting for the threaded parser to |
| 64 // finish, before returning. | 65 // finish, before returning. |
| 65 void loadFrame(WebFrame*, const std::string& url); | 66 void loadFrame(WebFrame*, const std::string& url); |
| 66 // Same as above, but for WebFrame::loadHTMLString(). | 67 // Same as above, but for WebFrame::loadHTMLString(). |
| 67 void loadHTMLString(WebFrame*, const std::string& html, const WebURL& baseURL); | 68 void loadHTMLString(WebFrame*, const std::string& html, const WebURL& baseURL); |
| 68 // Same as above, but for WebFrame::loadHistoryItem(). | 69 // Same as above, but for WebFrame::loadHistoryItem(). |
| 69 void loadHistoryItem(WebFrame*, const WebHistoryItem&, WebHistoryLoadType, WebUR
LRequest::CachePolicy); | 70 void loadHistoryItem(WebFrame*, const WebHistoryItem&, WebHistoryLoadType, WebCa
chePolicy); |
| 70 // Same as above, but for WebFrame::reload(). | 71 // Same as above, but for WebFrame::reload(). |
| 71 void reloadFrame(WebFrame*); | 72 void reloadFrame(WebFrame*); |
| 72 void reloadFrameIgnoringCache(WebFrame*); | 73 void reloadFrameIgnoringCache(WebFrame*); |
| 73 | 74 |
| 74 // Pumps pending resource requests while waiting for a frame to load. Consider | 75 // Pumps pending resource requests while waiting for a frame to load. Consider |
| 75 // using one of the above helper methods whenever possible. | 76 // using one of the above helper methods whenever possible. |
| 76 void pumpPendingRequestsForFrameToLoad(WebFrame*); | 77 void pumpPendingRequestsForFrameToLoad(WebFrame*); |
| 77 | 78 |
| 78 WebMouseEvent createMouseEvent(WebInputEvent::Type, WebMouseEvent::Button, const
IntPoint&, int modifiers); | 79 WebMouseEvent createMouseEvent(WebInputEvent::Type, WebMouseEvent::Button, const
IntPoint&, int modifiers); |
| 79 | 80 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 WebDOMMessageEvent) override { } | 200 WebDOMMessageEvent) override { } |
| 200 | 201 |
| 201 private: | 202 private: |
| 202 Persistent<WebRemoteFrameImpl> const m_frame; | 203 Persistent<WebRemoteFrameImpl> const m_frame; |
| 203 }; | 204 }; |
| 204 | 205 |
| 205 } // namespace FrameTestHelpers | 206 } // namespace FrameTestHelpers |
| 206 } // namespace blink | 207 } // namespace blink |
| 207 | 208 |
| 208 #endif // FrameTestHelpers_h | 209 #endif // FrameTestHelpers_h |
| OLD | NEW |