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

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

Issue 2940863005: Move loading methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Created 3 years, 6 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) 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 166
167 void Initialize(const char* base_url, const char* file_name) { 167 void Initialize(const char* base_url, const char* file_name) {
168 URLTestHelpers::RegisterMockedURLLoadFromBase( 168 URLTestHelpers::RegisterMockedURLLoadFromBase(
169 WebString::FromUTF8(base_url), blink::testing::WebTestDataPath(), 169 WebString::FromUTF8(base_url), blink::testing::WebTestDataPath(),
170 WebString::FromUTF8(file_name)); 170 WebString::FromUTF8(file_name));
171 const bool kRunJavascript = true; 171 const bool kRunJavascript = true;
172 web_view_helper_.Initialize(kRunJavascript); 172 web_view_helper_.Initialize(kRunJavascript);
173 web_view_helper_.WebView()->SetPrerendererClient(&prerenderer_client_); 173 web_view_helper_.WebView()->SetPrerendererClient(&prerenderer_client_);
174 174
175 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrame(), 175 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrameImpl(),
176 std::string(base_url) + file_name); 176 std::string(base_url) + file_name);
177 } 177 }
178 178
179 void NavigateAway() { 179 void NavigateAway() {
180 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrame(), 180 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrameImpl(),
181 "about:blank"); 181 "about:blank");
182 } 182 }
183 183
184 void Close() { 184 void Close() {
185 web_view_helper_.WebView()->MainFrameImpl()->CollectGarbage(); 185 web_view_helper_.WebView()->MainFrameImpl()->CollectGarbage();
186 web_view_helper_.Reset(); 186 web_view_helper_.Reset();
187 187
188 WebCache::Clear(); 188 WebCache::Clear();
189 } 189 }
190 190
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 WebPrerender rel_next_and_prerender = 469 WebPrerender rel_next_and_prerender =
470 PrerendererClient()->ReleaseWebPrerender(); 470 PrerendererClient()->ReleaseWebPrerender();
471 EXPECT_EQ(ToWebURL("http://rel-next-and-prerender.com/"), 471 EXPECT_EQ(ToWebURL("http://rel-next-and-prerender.com/"),
472 rel_next_and_prerender.Url()); 472 rel_next_and_prerender.Url());
473 EXPECT_EQ( 473 EXPECT_EQ(
474 static_cast<unsigned>(kPrerenderRelTypeNext | kPrerenderRelTypePrerender), 474 static_cast<unsigned>(kPrerenderRelTypeNext | kPrerenderRelTypePrerender),
475 rel_next_and_prerender.RelTypes()); 475 rel_next_and_prerender.RelTypes());
476 } 476 }
477 477
478 } // namespace blink 478 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698