Chromium Code Reviews| Index: Source/web/tests/WebViewTest.cpp |
| diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp |
| index 60a64287b59825d9f426122b721fd0f98052d5b6..1bded023019b6b04561d7f58e078d6f59a275b45 100644 |
| --- a/Source/web/tests/WebViewTest.cpp |
| +++ b/Source/web/tests/WebViewTest.cpp |
| @@ -1809,7 +1809,7 @@ TEST_F(WebViewTest, DeleteElementWithRegisteredHandler) |
| URLTestHelpers::registerMockedURLLoad(toKURL(url), "simple_div.html"); |
| WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true); |
| - WebCore::Document* document = webViewImpl->mainFrameImpl()->frame()->document(); |
| + RefPtrWillBePersistent<WebCore::Document> document = webViewImpl->mainFrameImpl()->frame()->document(); |
|
jochen (gone - plz use gerrit)
2014/07/17 14:17:24
why this change?
wibling-chromium
2014/07/17 14:18:51
Because I am doing a GC with no pointers on stack
|
| WebCore::Element* div = document->getElementById("div"); |
| WebCore::EventHandlerRegistry& registry = document->frameHost()->eventHandlerRegistry(); |
| @@ -1818,6 +1818,11 @@ TEST_F(WebViewTest, DeleteElementWithRegisteredHandler) |
| WebCore::TrackExceptionState exceptionState; |
| div->remove(exceptionState); |
| +#if ENABLE(OILPAN) |
| + // For oilpan we have to force a GC to ensure the event handlers have been removed when |
| + // checking below. |
| + Heap::collectGarbage(ThreadState::NoHeapPointersOnStack); |
|
haraken
2014/07/17 14:32:28
We prefer using Heap::collectAllGarbage() in tests
wibling-chromium
2014/07/17 14:37:53
Done.
|
| +#endif |
| EXPECT_FALSE(registry.hasEventHandlers(WebCore::EventHandlerRegistry::ScrollEvent)); |
| } |