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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2591733003: Fix use-after-scope issue in WebFrameTest. (Closed)
Patch Set: Fix a few more similar cases Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index dca39b89d8bc25e6f2395ad1298046a7c15fe60e..089729b50e6e7f3a2dc6d7868477b3c9b1320942 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -4118,8 +4118,8 @@ TEST_F(WebFrameTest, ReloadWithOverrideURLPreservesState) {
registerMockedHttpURLLoad(secondURL);
registerMockedHttpURLLoad(thirdURL);
- FrameTestHelpers::WebViewHelper webViewHelper;
ClearScrollStateOnCommitWebFrameClient client;
+ FrameTestHelpers::WebViewHelper webViewHelper;
webViewHelper.initializeAndLoad(m_baseURL + firstURL, true, &client);
webViewHelper.resize(WebSize(pageWidth, pageHeight));
webViewHelper.webView()->mainFrame()->setScrollOffset(
@@ -7398,8 +7398,8 @@ TEST_P(ParameterizedWebFrameTest, FirstBlankSubframeNavigation) {
registerMockedHttpURLLoad("history.html");
registerMockedHttpURLLoad("find.html");
- FrameTestHelpers::WebViewHelper webViewHelper;
TestHistoryWebFrameClient client;
+ FrameTestHelpers::WebViewHelper webViewHelper;
webViewHelper.initializeAndLoad("about:blank", true, &client);
WebFrame* frame = webViewHelper.webView()->mainFrame();
@@ -7430,8 +7430,8 @@ TEST_P(ParameterizedWebFrameTest, FirstNonBlankSubframeNavigation) {
registerMockedHttpURLLoad("history.html");
registerMockedHttpURLLoad("find.html");
- FrameTestHelpers::WebViewHelper webViewHelper;
TestHistoryWebFrameClient client;
+ FrameTestHelpers::WebViewHelper webViewHelper;
webViewHelper.initializeAndLoad("about:blank", true, &client);
WebFrame* frame = webViewHelper.webView()->mainFrame();
@@ -8446,8 +8446,8 @@ class ThemeColorTestWebFrameClient
TEST_P(ParameterizedWebFrameTest, ThemeColor) {
registerMockedHttpURLLoad("theme_color_test.html");
- FrameTestHelpers::WebViewHelper webViewHelper;
ThemeColorTestWebFrameClient client;
+ FrameTestHelpers::WebViewHelper webViewHelper;
webViewHelper.initializeAndLoad(m_baseURL + "theme_color_test.html", true,
&client);
EXPECT_TRUE(client.didNotify());
@@ -10108,8 +10108,8 @@ class CallbackOrderingWebFrameClient
TEST_F(WebFrameTest, CallbackOrdering) {
registerMockedHttpURLLoad("foo.html");
- FrameTestHelpers::WebViewHelper webViewHelper;
CallbackOrderingWebFrameClient client;
+ FrameTestHelpers::WebViewHelper webViewHelper;
webViewHelper.initializeAndLoad(m_baseURL + "foo.html", true, &client);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698