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

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

Issue 2165573003: Simplify tests by using Web*Impl types directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void close() 192 void close()
193 { 193 {
194 m_webViewHelper.webView()->mainFrame()->collectGarbage(); 194 m_webViewHelper.webView()->mainFrame()->collectGarbage();
195 m_webViewHelper.reset(); 195 m_webViewHelper.reset();
196 196
197 WebCache::clear(); 197 WebCache::clear();
198 } 198 }
199 199
200 Element& console() 200 Element& console()
201 { 201 {
202 Document* document = m_webViewHelper.webViewImpl()->mainFrameImpl()->fra me()->document(); 202 Document* document = m_webViewHelper.webView()->mainFrameImpl()->frame() ->document();
203 Element* console = document->getElementById("console"); 203 Element* console = document->getElementById("console");
204 DCHECK(isHTMLUListElement(console)); 204 DCHECK(isHTMLUListElement(console));
205 return *console; 205 return *console;
206 } 206 }
207 207
208 unsigned consoleLength() 208 unsigned consoleLength()
209 { 209 {
210 return console().countChildren() - 1; 210 return console().countChildren() - 1;
211 } 211 }
212 212
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 WebPrerender relNextOnly = prerendererClient()->releaseWebPrerender(); 490 WebPrerender relNextOnly = prerendererClient()->releaseWebPrerender();
491 EXPECT_EQ(toWebURL("http://rel-next-only.com/"), relNextOnly.url()); 491 EXPECT_EQ(toWebURL("http://rel-next-only.com/"), relNextOnly.url());
492 EXPECT_EQ(PrerenderRelTypeNext, relNextOnly.relTypes()); 492 EXPECT_EQ(PrerenderRelTypeNext, relNextOnly.relTypes());
493 493
494 WebPrerender relNextAndPrerender = prerendererClient()->releaseWebPrerender( ); 494 WebPrerender relNextAndPrerender = prerendererClient()->releaseWebPrerender( );
495 EXPECT_EQ(toWebURL("http://rel-next-and-prerender.com/"), relNextAndPrerende r.url()); 495 EXPECT_EQ(toWebURL("http://rel-next-and-prerender.com/"), relNextAndPrerende r.url());
496 EXPECT_EQ(static_cast<unsigned>(PrerenderRelTypeNext | PrerenderRelTypePrere nder), relNextAndPrerender.relTypes()); 496 EXPECT_EQ(static_cast<unsigned>(PrerenderRelTypeNext | PrerenderRelTypePrere nder), relNextAndPrerender.relTypes());
497 } 497 }
498 498
499 } // namespace 499 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698