| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |