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

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

Issue 2580703003: Make sure pages that are closing but not yet closed are still suspended. (Closed)
Patch Set: revert no longer needed test change 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
Index: third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp b/third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp
index 034bde6eb59ccb71de9313dc56472f3e1c98a807..4ec36224379274c1bac80becec049e36eecdca39 100644
--- a/third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp
@@ -30,6 +30,7 @@
#include "core/loader/FrameLoadRequest.h"
#include "core/page/Page.h"
+#include "core/page/ScopedPageSuspender.h"
#include "public/platform/WebInputEvent.h"
#include "public/web/WebFrameClient.h"
#include "public/web/WebLocalFrame.h"
@@ -268,14 +269,13 @@ class CreateWindowTest : public testing::Test {
};
TEST_F(CreateWindowTest, CreateWindowFromSuspendedPage) {
- m_webView->page()->setSuspended(true);
+ ScopedPageSuspender suspender;
LocalFrame* frame = toWebLocalFrameImpl(m_mainFrame)->frame();
FrameLoadRequest request(frame->document());
WindowFeatures features;
EXPECT_EQ(nullptr,
m_chromeClientImpl->createWindow(frame, request, features,
NavigationPolicyNewForegroundTab));
- m_webView->page()->setSuspended(false);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698