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

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

Issue 2097413003: Re-enable GPU Rasterization for content with any author defined viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unit test. Created 4 years, 6 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: third_party/WebKit/Source/web/tests/ViewportTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/ViewportTest.cpp b/third_party/WebKit/Source/web/tests/ViewportTest.cpp
index 695cd6a973755aefbf8d77a32f8d280407e8f273..5f15078101f61a7d59684d0068c8bc170b6a0c02 100644
--- a/third_party/WebKit/Source/web/tests/ViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ViewportTest.cpp
@@ -2786,8 +2786,14 @@ TEST_F(ViewportTest, viewportLimitsAdjustedForNoUserScaleControl)
TEST_F(ViewportTest, viewportTriggersGpuRasterization)
{
- registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization.html");
FrameTestHelpers::WebViewHelper webViewHelper;
+
+ registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization-disabled-without-viewport.html");
+ webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasterization-disabled-without-viewport.html", true, nullptr, nullptr, nullptr, setViewportSettings);
+ webViewHelper.webView()->resize(WebSize(640, 480));
+ EXPECT_FALSE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
+
+ registerMockedHttpURLLoad("viewport/viewport-gpu-rasterization.html");
webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-gpu-rasterization.html", true, nullptr, nullptr, nullptr, setViewportSettings);
webViewHelper.webView()->resize(WebSize(640, 480));
EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
@@ -2797,25 +2803,30 @@ TEST_F(ViewportTest, viewportTriggersGpuRasterization)
webViewHelper.webView()->resize(WebSize(640, 480));
EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
- registerMockedHttpURLLoad("viewport/viewport-inferred-values-do-not-trigger-gpu-rasterization.html");
- webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-inferred-values-do-not-trigger-gpu-rasterization.html", true, nullptr, nullptr, nullptr, setViewportSettings);
- webViewHelper.webView()->resize(WebSize(640, 480));
- EXPECT_FALSE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
-
registerMockedHttpURLLoad("viewport/viewport-1.html");
webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-1.html", true, nullptr, nullptr, nullptr, setViewportSettings);
webViewHelper.webView()->resize(WebSize(640, 480));
- EXPECT_FALSE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
+ EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
registerMockedHttpURLLoad("viewport/viewport-15.html");
webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-15.html", true, nullptr, nullptr, nullptr, setViewportSettings);
webViewHelper.webView()->resize(WebSize(640, 480));
- EXPECT_FALSE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
+ EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
registerMockedHttpURLLoad("viewport/viewport-130.html");
webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-130.html", true, nullptr, nullptr, nullptr, setViewportSettings);
webViewHelper.webView()->resize(WebSize(640, 480));
- EXPECT_FALSE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
+ EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
+
+ registerMockedHttpURLLoad("viewport/viewport-legacy-handheldfriendly.html");
+ webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-legacy-handheldfriendly.html", true, nullptr, nullptr, nullptr, setViewportSettings);
+ webViewHelper.webView()->resize(WebSize(640, 480));
+ EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
+
+ registerMockedHttpURLLoad("viewport/viewport-legacy-mobileoptimized.html");
+ webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-legacy-handheldfriendly.html", true, nullptr, nullptr, nullptr, setViewportSettings);
+ webViewHelper.webView()->resize(WebSize(640, 480));
+ EXPECT_TRUE(webViewHelper.webViewImpl()->matchesHeuristicsForGpuRasterizationForTesting());
}
class ConsoleMessageWebFrameClient : public FrameTestHelpers::TestWebFrameClient {

Powered by Google App Engine
This is Rietveld 408576698