| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 ->UnregisterAllURLsAndClearMemoryCache(); | 164 ->UnregisterAllURLsAndClearMemoryCache(); |
| 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 web_view_helper_.Initialize(); | 171 web_view_helper_.Initialize(); |
| 172 web_view_helper_.WebView()->SetPrerendererClient(&prerenderer_client_); | 172 web_view_helper_.WebView()->SetPrerendererClient(&prerenderer_client_); |
| 173 | 173 |
| 174 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrame(), | 174 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrameImpl(), |
| 175 std::string(base_url) + file_name); | 175 std::string(base_url) + file_name); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void NavigateAway() { | 178 void NavigateAway() { |
| 179 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrame(), | 179 FrameTestHelpers::LoadFrame(web_view_helper_.WebView()->MainFrameImpl(), |
| 180 "about:blank"); | 180 "about:blank"); |
| 181 } | 181 } |
| 182 | 182 |
| 183 void Close() { | 183 void Close() { |
| 184 web_view_helper_.WebView()->MainFrameImpl()->CollectGarbage(); | 184 web_view_helper_.WebView()->MainFrameImpl()->CollectGarbage(); |
| 185 web_view_helper_.Reset(); | 185 web_view_helper_.Reset(); |
| 186 | 186 |
| 187 WebCache::Clear(); | 187 WebCache::Clear(); |
| 188 } | 188 } |
| 189 | 189 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 WebPrerender rel_next_and_prerender = | 468 WebPrerender rel_next_and_prerender = |
| 469 PrerendererClient()->ReleaseWebPrerender(); | 469 PrerendererClient()->ReleaseWebPrerender(); |
| 470 EXPECT_EQ(ToWebURL("http://rel-next-and-prerender.com/"), | 470 EXPECT_EQ(ToWebURL("http://rel-next-and-prerender.com/"), |
| 471 rel_next_and_prerender.Url()); | 471 rel_next_and_prerender.Url()); |
| 472 EXPECT_EQ( | 472 EXPECT_EQ( |
| 473 static_cast<unsigned>(kPrerenderRelTypeNext | kPrerenderRelTypePrerender), | 473 static_cast<unsigned>(kPrerenderRelTypeNext | kPrerenderRelTypePrerender), |
| 474 rel_next_and_prerender.RelTypes()); | 474 rel_next_and_prerender.RelTypes()); |
| 475 } | 475 } |
| 476 | 476 |
| 477 } // namespace blink | 477 } // namespace blink |
| OLD | NEW |