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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp

Issue 2860673002: Change all test cases to use WebViewBase instead of WebViewImpl. (Closed)
Patch Set: Address code review comments. Created 3 years, 7 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
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 String file_path("frameserialization/" + file_name); 157 String file_path("frameserialization/" + file_name);
158 RegisterMockedFileURLLoad(parsed_url, file_path, "text/html"); 158 RegisterMockedFileURLLoad(parsed_url, file_path, "text/html");
159 FrameTestHelpers::LoadFrame(MainFrameImpl(), url.Utf8().data()); 159 FrameTestHelpers::LoadFrame(MainFrameImpl(), url.Utf8().data());
160 SingleLinkRewritingDelegate delegate(parsed_url, WebString("local")); 160 SingleLinkRewritingDelegate delegate(parsed_url, WebString("local"));
161 SimpleWebFrameSerializerClient serializer_client; 161 SimpleWebFrameSerializerClient serializer_client;
162 WebFrameSerializer::Serialize(MainFrameImpl(), &serializer_client, 162 WebFrameSerializer::Serialize(MainFrameImpl(), &serializer_client,
163 &delegate); 163 &delegate);
164 return serializer_client.ToString(); 164 return serializer_client.ToString();
165 } 165 }
166 166
167 WebViewImpl* WebView() { return helper_.WebView(); } 167 WebViewBase* WebView() { return helper_.WebView(); }
168 168
169 WebLocalFrameImpl* MainFrameImpl() { 169 WebLocalFrameImpl* MainFrameImpl() {
170 return helper_.WebView()->MainFrameImpl(); 170 return helper_.WebView()->MainFrameImpl();
171 } 171 }
172 172
173 private: 173 private:
174 FrameTestHelpers::WebViewHelper helper_; 174 FrameTestHelpers::WebViewHelper helper_;
175 }; 175 };
176 176
177 TEST_F(WebFrameSerializerTest, URLAttributeValues) { 177 TEST_F(WebFrameSerializerTest, URLAttributeValues) {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 mhtml.Find("<meta http-equiv=3D\"Content-Security-Policy")); 442 mhtml.Find("<meta http-equiv=3D\"Content-Security-Policy"));
443 EXPECT_NE(WTF::kNotFound, mhtml.Find("<meta name=3D\"description")); 443 EXPECT_NE(WTF::kNotFound, mhtml.Find("<meta name=3D\"description"));
444 EXPECT_NE(WTF::kNotFound, mhtml.Find("<meta http-equiv=3D\"refresh")); 444 EXPECT_NE(WTF::kNotFound, mhtml.Find("<meta http-equiv=3D\"refresh"));
445 445
446 // If an element is removed, its children should also be skipped. 446 // If an element is removed, its children should also be skipped.
447 EXPECT_EQ(WTF::kNotFound, mhtml.Find("<select")); 447 EXPECT_EQ(WTF::kNotFound, mhtml.Find("<select"));
448 EXPECT_EQ(WTF::kNotFound, mhtml.Find("<option")); 448 EXPECT_EQ(WTF::kNotFound, mhtml.Find("<option"));
449 } 449 }
450 450
451 } // namespace blink 451 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698