| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 111 } |
| 112 | 112 |
| 113 void RegisterSkipURL(const char* url) { | 113 void RegisterSkipURL(const char* url) { |
| 114 skip_urls_.push_back(KURL(base_url_, url)); | 114 skip_urls_.push_back(KURL(base_url_, url)); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void Serialize(const char* url) { | 117 void Serialize(const char* url) { |
| 118 FrameTestHelpers::LoadFrame(helper_.WebView()->MainFrameImpl(), | 118 FrameTestHelpers::LoadFrame(helper_.WebView()->MainFrameImpl(), |
| 119 KURL(base_url_, url).GetString().Utf8().data()); | 119 KURL(base_url_, url).GetString().Utf8().data()); |
| 120 FrameSerializer serializer(resources_, *this); | 120 FrameSerializer serializer(resources_, *this); |
| 121 Frame* frame = helper_.WebView()->MainFrameImpl()->GetFrame(); | 121 Frame* frame = helper_.LocalMainFrame()->GetFrame(); |
| 122 for (; frame; frame = frame->Tree().TraverseNext()) { | 122 for (; frame; frame = frame->Tree().TraverseNext()) { |
| 123 // This is safe, because tests do not do cross-site navigation | 123 // This is safe, because tests do not do cross-site navigation |
| 124 // (and therefore don't have remote frames). | 124 // (and therefore don't have remote frames). |
| 125 serializer.SerializeFrame(*ToLocalFrame(frame)); | 125 serializer.SerializeFrame(*ToLocalFrame(frame)); |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 Deque<SerializedResource>& GetResources() { return resources_; } | 129 Deque<SerializedResource>& GetResources() { return resources_; } |
| 130 | 130 |
| 131 const SerializedResource* GetResource(const KURL& url, | 131 const SerializedResource* GetResource(const KURL& url, |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 KURL(kParsedURLString, "http://foo.com?--"))); | 556 KURL(kParsedURLString, "http://foo.com?--"))); |
| 557 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", | 557 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", |
| 558 FrameSerializer::MarkOfTheWebDeclaration( | 558 FrameSerializer::MarkOfTheWebDeclaration( |
| 559 KURL(kParsedURLString, "http://foo.com#--"))); | 559 KURL(kParsedURLString, "http://foo.com#--"))); |
| 560 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", | 560 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", |
| 561 FrameSerializer::MarkOfTheWebDeclaration( | 561 FrameSerializer::MarkOfTheWebDeclaration( |
| 562 KURL(kParsedURLString, "http://foo.com#bar--baz"))); | 562 KURL(kParsedURLString, "http://foo.com#bar--baz"))); |
| 563 } | 563 } |
| 564 | 564 |
| 565 } // namespace blink | 565 } // namespace blink |
| OLD | NEW |