OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. | 2 * Copyright (c) 2013, Opera Software ASA. 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 16 matching lines...) Expand all Loading... |
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
28 * OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "core/frame/FrameSerializer.h" | 31 #include "core/frame/FrameSerializer.h" |
32 | 32 |
33 #include <string> | 33 #include <string> |
34 #include "bindings/core/v8/V8BindingForCore.h" | 34 #include "bindings/core/v8/V8BindingForCore.h" |
35 #include "bindings/core/v8/V8BindingForTesting.h" | 35 #include "bindings/core/v8/V8BindingForTesting.h" |
36 #include "core/exported/WebViewBase.h" | 36 #include "core/exported/WebViewBase.h" |
| 37 #include "core/frame/WebLocalFrameBase.h" |
37 #include "platform/SerializedResource.h" | 38 #include "platform/SerializedResource.h" |
38 #include "platform/testing/URLTestHelpers.h" | 39 #include "platform/testing/URLTestHelpers.h" |
39 #include "platform/testing/UnitTestHelpers.h" | 40 #include "platform/testing/UnitTestHelpers.h" |
40 #include "platform/wtf/Assertions.h" | 41 #include "platform/wtf/Assertions.h" |
41 #include "platform/wtf/Deque.h" | 42 #include "platform/wtf/Deque.h" |
42 #include "platform/wtf/Vector.h" | 43 #include "platform/wtf/Vector.h" |
43 #include "public/platform/Platform.h" | 44 #include "public/platform/Platform.h" |
44 #include "public/platform/WebString.h" | 45 #include "public/platform/WebString.h" |
45 #include "public/platform/WebThread.h" | 46 #include "public/platform/WebThread.h" |
46 #include "public/platform/WebURL.h" | 47 #include "public/platform/WebURL.h" |
47 #include "public/platform/WebURLLoaderMockFactory.h" | 48 #include "public/platform/WebURLLoaderMockFactory.h" |
48 #include "public/platform/WebURLRequest.h" | 49 #include "public/platform/WebURLRequest.h" |
49 #include "public/platform/WebURLResponse.h" | 50 #include "public/platform/WebURLResponse.h" |
50 #include "public/web/WebSettings.h" | 51 #include "public/web/WebSettings.h" |
51 #include "testing/gtest/include/gtest/gtest.h" | 52 #include "testing/gtest/include/gtest/gtest.h" |
52 #include "web/WebLocalFrameImpl.h" | |
53 #include "web/tests/FrameTestHelpers.h" | 53 #include "web/tests/FrameTestHelpers.h" |
54 | 54 |
55 using blink::URLTestHelpers::ToKURL; | 55 using blink::URLTestHelpers::ToKURL; |
56 using blink::URLTestHelpers::RegisterMockedURLLoad; | 56 using blink::URLTestHelpers::RegisterMockedURLLoad; |
57 | 57 |
58 namespace blink { | 58 namespace blink { |
59 | 59 |
60 class FrameSerializerTest : public ::testing::Test, | 60 class FrameSerializerTest : public ::testing::Test, |
61 public FrameSerializer::Delegate { | 61 public FrameSerializer::Delegate { |
62 public: | 62 public: |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 KURL(kParsedURLString, "http://foo.com?--"))); | 554 KURL(kParsedURLString, "http://foo.com?--"))); |
555 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", | 555 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", |
556 FrameSerializer::MarkOfTheWebDeclaration( | 556 FrameSerializer::MarkOfTheWebDeclaration( |
557 KURL(kParsedURLString, "http://foo.com#--"))); | 557 KURL(kParsedURLString, "http://foo.com#--"))); |
558 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", | 558 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", |
559 FrameSerializer::MarkOfTheWebDeclaration( | 559 FrameSerializer::MarkOfTheWebDeclaration( |
560 KURL(kParsedURLString, "http://foo.com#bar--baz"))); | 560 KURL(kParsedURLString, "http://foo.com#bar--baz"))); |
561 } | 561 } |
562 | 562 |
563 } // namespace blink | 563 } // namespace blink |
OLD | NEW |