| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include <functional> | 31 #include <functional> |
| 32 #include <list> | 32 #include <list> |
| 33 #include <memory> | 33 #include <memory> |
| 34 #include "core/dom/NodeTraversal.h" | 34 #include "core/dom/NodeTraversal.h" |
| 35 #include "platform/testing/URLTestHelpers.h" | 35 #include "platform/testing/URLTestHelpers.h" |
| 36 #include "platform/testing/UnitTestHelpers.h" | 36 #include "platform/testing/UnitTestHelpers.h" |
| 37 #include "platform/wtf/PtrUtil.h" |
| 37 #include "public/platform/Platform.h" | 38 #include "public/platform/Platform.h" |
| 38 #include "public/platform/WebCache.h" | 39 #include "public/platform/WebCache.h" |
| 39 #include "public/platform/WebPrerender.h" | 40 #include "public/platform/WebPrerender.h" |
| 40 #include "public/platform/WebPrerenderingSupport.h" | 41 #include "public/platform/WebPrerenderingSupport.h" |
| 41 #include "public/platform/WebString.h" | 42 #include "public/platform/WebString.h" |
| 42 #include "public/platform/WebURLLoaderMockFactory.h" | 43 #include "public/platform/WebURLLoaderMockFactory.h" |
| 43 #include "public/web/WebFrame.h" | 44 #include "public/web/WebFrame.h" |
| 44 #include "public/web/WebPrerendererClient.h" | 45 #include "public/web/WebPrerendererClient.h" |
| 45 #include "public/web/WebScriptSource.h" | 46 #include "public/web/WebScriptSource.h" |
| 46 #include "public/web/WebView.h" | 47 #include "public/web/WebView.h" |
| 47 #include "public/web/WebViewClient.h" | 48 #include "public/web/WebViewClient.h" |
| 48 #include "testing/gtest/include/gtest/gtest.h" | 49 #include "testing/gtest/include/gtest/gtest.h" |
| 49 #include "web/WebLocalFrameImpl.h" | 50 #include "web/WebLocalFrameImpl.h" |
| 50 #include "web/tests/FrameTestHelpers.h" | 51 #include "web/tests/FrameTestHelpers.h" |
| 51 #include "wtf/PtrUtil.h" | |
| 52 | 52 |
| 53 namespace blink { | 53 namespace blink { |
| 54 | 54 |
| 55 namespace { | 55 namespace { |
| 56 | 56 |
| 57 WebURL toWebURL(const char* url) { | 57 WebURL toWebURL(const char* url) { |
| 58 return WebURL(blink::URLTestHelpers::toKURL(url)); | 58 return WebURL(blink::URLTestHelpers::toKURL(url)); |
| 59 } | 59 } |
| 60 | 60 |
| 61 class TestPrerendererClient : public WebPrerendererClient { | 61 class TestPrerendererClient : public WebPrerendererClient { |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 | 468 |
| 469 WebPrerender relNextAndPrerender = prerendererClient()->releaseWebPrerender(); | 469 WebPrerender relNextAndPrerender = prerendererClient()->releaseWebPrerender(); |
| 470 EXPECT_EQ(toWebURL("http://rel-next-and-prerender.com/"), | 470 EXPECT_EQ(toWebURL("http://rel-next-and-prerender.com/"), |
| 471 relNextAndPrerender.url()); | 471 relNextAndPrerender.url()); |
| 472 EXPECT_EQ( | 472 EXPECT_EQ( |
| 473 static_cast<unsigned>(PrerenderRelTypeNext | PrerenderRelTypePrerender), | 473 static_cast<unsigned>(PrerenderRelTypeNext | PrerenderRelTypePrerender), |
| 474 relNextAndPrerender.relTypes()); | 474 relNextAndPrerender.relTypes()); |
| 475 } | 475 } |
| 476 | 476 |
| 477 } // namespace blink | 477 } // namespace blink |
| OLD | NEW |