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

Unified Diff: Source/web/tests/CustomEventTest.cpp

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add WebViewHelper for unittests. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/web/tests/CustomEventTest.cpp
diff --git a/Source/web/tests/CustomEventTest.cpp b/Source/web/tests/CustomEventTest.cpp
index f2ae08fc488bffe6d0234cd7b4f10f084ec075b2..7b227cc20729aa28dae83c537a0278f063211b8b 100644
--- a/Source/web/tests/CustomEventTest.cpp
+++ b/Source/web/tests/CustomEventTest.cpp
@@ -100,8 +100,8 @@ TEST(CustomEventTest, InitWithSerializedScriptValue)
const std::string path = "visible_iframe.html";
URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(baseURL.c_str()), WebString::fromUTF8(path.c_str()));
- WebView* webView = FrameTestHelpers::createWebViewAndLoad(baseURL + path);
- WebFrameImpl* frame = toWebFrameImpl(webView->mainFrame());
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ WebFrameImpl* frame = toWebFrameImpl(webViewHelper.initializeAndLoad(baseURL + path)->mainFrame());
WebDOMEvent event = frame->frame()->document()->createEvent("CustomEvent", IGNORE_EXCEPTION);
WebDOMCustomEvent customEvent = event.to<WebDOMCustomEvent>();
@@ -113,7 +113,6 @@ TEST(CustomEventTest, InitWithSerializedScriptValue)
frame->frame()->document()->dispatchEvent(event);
Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
- webView->close();
}
}

Powered by Google App Engine
This is Rietveld 408576698