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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 1772323002: Properly disable tests under Mac ASAN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 break; 306 break;
307 case RootLayerScrolls: 307 case RootLayerScrolls:
308 *os << "RootLayerScrolls"; 308 *os << "RootLayerScrolls";
309 break; 309 break;
310 } 310 }
311 } 311 }
312 312
313 // Flakily failing on Mac ASAN. 313 // Flakily failing on Mac ASAN.
314 // https://crbug.com/592771 314 // https://crbug.com/592771
315 #if OS(MACOSX) && defined(ADDRESS_SANITIZER) 315 #if OS(MACOSX) && defined(ADDRESS_SANITIZER)
316 #define MAYBE(test) DISABLED_##test 316 #define MAYBE_TEST_P(fixture, test) TEST_P(fixture, DISABLED_##test)
317 #else 317 #else
318 #define MAYBE(test) test 318 #define MAYBE_TEST_P(fixture, test) TEST_P(fixture, test)
319 #endif 319 #endif
320 320
321 INSTANTIATE_TEST_CASE_P(All, ParameterizedWebFrameTest, ::testing::Values( 321 INSTANTIATE_TEST_CASE_P(All, ParameterizedWebFrameTest, ::testing::Values(
322 ParameterizedWebFrameTestConfig::Default, 322 ParameterizedWebFrameTestConfig::Default,
323 ParameterizedWebFrameTestConfig::RootLayerScrolls)); 323 ParameterizedWebFrameTestConfig::RootLayerScrolls));
324 324
325 TEST_P(ParameterizedWebFrameTest, ContentText) 325 TEST_P(ParameterizedWebFrameTest, ContentText)
326 { 326 {
327 registerMockedHttpURLLoad("iframes_test.html"); 327 registerMockedHttpURLLoad("iframes_test.html");
328 registerMockedHttpURLLoad("visible_iframe.html"); 328 registerMockedHttpURLLoad("visible_iframe.html");
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 float enforcedPageScaleFactor = 0.5f; 1379 float enforcedPageScaleFactor = 0.5f;
1380 1380
1381 FrameTestHelpers::WebViewHelper webViewHelper(this); 1381 FrameTestHelpers::WebViewHelper webViewHelper(this);
1382 webViewHelper.initializeAndLoad(m_baseURL + "viewport-wide-2x-initial-scale. html", true, 0, &client, enableViewportSettings); 1382 webViewHelper.initializeAndLoad(m_baseURL + "viewport-wide-2x-initial-scale. html", true, 0, &client, enableViewportSettings);
1383 webViewHelper.webView()->setInitialPageScaleOverride(enforcedPageScaleFactor ); 1383 webViewHelper.webView()->setInitialPageScaleOverride(enforcedPageScaleFactor );
1384 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 1384 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
1385 1385
1386 EXPECT_EQ(enforcedPageScaleFactor, webViewHelper.webView()->pageScaleFactor( )); 1386 EXPECT_EQ(enforcedPageScaleFactor, webViewHelper.webView()->pageScaleFactor( ));
1387 } 1387 }
1388 1388
1389 TEST_P(ParameterizedWebFrameTest, MAYBE(SmallPermanentInitialPageScaleFactorIsCl obbered)) 1389 MAYBE_TEST_P(ParameterizedWebFrameTest, SmallPermanentInitialPageScaleFactorIsCl obbered)
1390 { 1390 {
1391 const char* pages[] = { 1391 const char* pages[] = {
1392 // These pages trigger the clobbering condition. There must be a matchin g item in "pageScaleFactors" array. 1392 // These pages trigger the clobbering condition. There must be a matchin g item in "pageScaleFactors" array.
1393 "viewport-device-0.5x-initial-scale.html", 1393 "viewport-device-0.5x-initial-scale.html",
1394 "viewport-initial-scale-1.html", 1394 "viewport-initial-scale-1.html",
1395 // These ones do not. 1395 // These ones do not.
1396 "viewport-auto-initial-scale.html", 1396 "viewport-auto-initial-scale.html",
1397 "viewport-target-densitydpi-device-and-fixed-width.html" 1397 "viewport-target-densitydpi-device-and-fixed-width.html"
1398 }; 1398 };
1399 float pageScaleFactors[] = { 0.5f, 1.0f }; 1399 float pageScaleFactors[] = { 0.5f, 1.0f };
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 EXPECT_EQ(0, childDocument->firstBodyElement()->getIntegralAttribute(HTMLNam es::marginheightAttr)); 1631 EXPECT_EQ(0, childDocument->firstBodyElement()->getIntegralAttribute(HTMLNam es::marginheightAttr));
1632 1632
1633 FrameView* frameView = static_cast<WebLocalFrameImpl*>(localFrame)->frameVie w(); 1633 FrameView* frameView = static_cast<WebLocalFrameImpl*>(localFrame)->frameVie w();
1634 EXPECT_EQ(nullptr, frameView->horizontalScrollbar()); 1634 EXPECT_EQ(nullptr, frameView->horizontalScrollbar());
1635 EXPECT_EQ(nullptr, frameView->verticalScrollbar()); 1635 EXPECT_EQ(nullptr, frameView->verticalScrollbar());
1636 1636
1637 view->close(); 1637 view->close();
1638 } 1638 }
1639 1639
1640 1640
1641 TEST_P(ParameterizedWebFrameTest, MAYBE(SetForceZeroLayoutHeightWorksAcrossNavig ations)) 1641 MAYBE_TEST_P(ParameterizedWebFrameTest, SetForceZeroLayoutHeightWorksAcrossNavig ations)
1642 { 1642 {
1643 registerMockedHttpURLLoad("200-by-300.html"); 1643 registerMockedHttpURLLoad("200-by-300.html");
1644 registerMockedHttpURLLoad("large-div.html"); 1644 registerMockedHttpURLLoad("large-div.html");
1645 1645
1646 FixedLayoutTestWebViewClient client; 1646 FixedLayoutTestWebViewClient client;
1647 client.m_screenInfo.deviceScaleFactor = 1; 1647 client.m_screenInfo.deviceScaleFactor = 1;
1648 int viewportWidth = 640; 1648 int viewportWidth = 640;
1649 int viewportHeight = 480; 1649 int viewportHeight = 480;
1650 1650
1651 FrameTestHelpers::WebViewHelper webViewHelper(this); 1651 FrameTestHelpers::WebViewHelper webViewHelper(this);
(...skipping 21 matching lines...) Expand all
1673 1673
1674 webViewHelper.initializeAndLoad(m_baseURL + "200-by-300.html", true, 0, &cli ent, enableViewportSettings); 1674 webViewHelper.initializeAndLoad(m_baseURL + "200-by-300.html", true, 0, &cli ent, enableViewportSettings);
1675 webViewHelper.webView()->settings()->setWideViewportQuirkEnabled(true); 1675 webViewHelper.webView()->settings()->setWideViewportQuirkEnabled(true);
1676 webViewHelper.webView()->settings()->setUseWideViewport(true); 1676 webViewHelper.webView()->settings()->setUseWideViewport(true);
1677 webViewHelper.webView()->settings()->setForceZeroLayoutHeight(true); 1677 webViewHelper.webView()->settings()->setForceZeroLayoutHeight(true);
1678 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 1678 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
1679 1679
1680 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->layo utSize().height()); 1680 EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->layo utSize().height());
1681 } 1681 }
1682 1682
1683 TEST_P(ParameterizedWebFrameTest, MAYBE(WideViewportAndWideContentWithInitialSca le)) 1683 MAYBE_TEST_P(ParameterizedWebFrameTest, WideViewportAndWideContentWithInitialSca le)
1684 { 1684 {
1685 registerMockedHttpURLLoad("wide_document_width_viewport.html"); 1685 registerMockedHttpURLLoad("wide_document_width_viewport.html");
1686 registerMockedHttpURLLoad("white-1x1.png"); 1686 registerMockedHttpURLLoad("white-1x1.png");
1687 1687
1688 FixedLayoutTestWebViewClient client; 1688 FixedLayoutTestWebViewClient client;
1689 client.m_screenInfo.deviceScaleFactor = 1; 1689 client.m_screenInfo.deviceScaleFactor = 1;
1690 int viewportWidth = 600; 1690 int viewportWidth = 600;
1691 int viewportHeight = 800; 1691 int viewportHeight = 800;
1692 1692
1693 FrameTestHelpers::WebViewHelper webViewHelper(this); 1693 FrameTestHelpers::WebViewHelper webViewHelper(this);
1694 webViewHelper.initializeAndLoad("about:blank", true, 0, &client, enableViewp ortSettings); 1694 webViewHelper.initializeAndLoad("about:blank", true, 0, &client, enableViewp ortSettings);
1695 webViewHelper.webView()->settings()->setWideViewportQuirkEnabled(true); 1695 webViewHelper.webView()->settings()->setWideViewportQuirkEnabled(true);
1696 webViewHelper.webView()->settings()->setUseWideViewport(true); 1696 webViewHelper.webView()->settings()->setUseWideViewport(true);
1697 webViewHelper.webView()->settings()->setViewportMetaLayoutSizeQuirk(true); 1697 webViewHelper.webView()->settings()->setViewportMetaLayoutSizeQuirk(true);
1698 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 1698 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
1699 1699
1700 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL + "wide_document_width_viewport.html"); 1700 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL + "wide_document_width_viewport.html");
1701 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 1701 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
1702 1702
1703 int wideDocumentWidth = 800; 1703 int wideDocumentWidth = 800;
1704 float minimumPageScaleFactor = viewportWidth / (float) wideDocumentWidth; 1704 float minimumPageScaleFactor = viewportWidth / (float) wideDocumentWidth;
1705 EXPECT_EQ(minimumPageScaleFactor, webViewHelper.webViewImpl()->pageScaleFact or()); 1705 EXPECT_EQ(minimumPageScaleFactor, webViewHelper.webViewImpl()->pageScaleFact or());
1706 EXPECT_EQ(minimumPageScaleFactor, webViewHelper.webViewImpl()->minimumPageSc aleFactor()); 1706 EXPECT_EQ(minimumPageScaleFactor, webViewHelper.webViewImpl()->minimumPageSc aleFactor());
1707 } 1707 }
1708 1708
1709 TEST_P(ParameterizedWebFrameTest, MAYBE(WideViewportQuirkClobbersHeight)) 1709 MAYBE_TEST_P(ParameterizedWebFrameTest, WideViewportQuirkClobbersHeight)
1710 { 1710 {
1711 registerMockedHttpURLLoad("viewport-height-1000.html"); 1711 registerMockedHttpURLLoad("viewport-height-1000.html");
1712 1712
1713 FixedLayoutTestWebViewClient client; 1713 FixedLayoutTestWebViewClient client;
1714 client.m_screenInfo.deviceScaleFactor = 1; 1714 client.m_screenInfo.deviceScaleFactor = 1;
1715 int viewportWidth = 600; 1715 int viewportWidth = 600;
1716 int viewportHeight = 800; 1716 int viewportHeight = 800;
1717 1717
1718 FrameTestHelpers::WebViewHelper webViewHelper(this); 1718 FrameTestHelpers::WebViewHelper webViewHelper(this);
1719 webViewHelper.initializeAndLoad("about:blank", true, 0, &client, enableViewp ortSettings); 1719 webViewHelper.initializeAndLoad("about:blank", true, 0, &client, enableViewp ortSettings);
1720 webViewHelper.webView()->settings()->setWideViewportQuirkEnabled(true); 1720 webViewHelper.webView()->settings()->setWideViewportQuirkEnabled(true);
1721 webViewHelper.webView()->settings()->setUseWideViewport(false); 1721 webViewHelper.webView()->settings()->setUseWideViewport(false);
1722 webViewHelper.webView()->settings()->setViewportMetaLayoutSizeQuirk(true); 1722 webViewHelper.webView()->settings()->setViewportMetaLayoutSizeQuirk(true);
1723 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 1723 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
1724 1724
1725 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL + "viewport-height-1000.html"); 1725 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL + "viewport-height-1000.html");
1726 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 1726 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
1727 1727
1728 EXPECT_EQ(800, webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->la youtSize().height()); 1728 EXPECT_EQ(800, webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->la youtSize().height());
1729 EXPECT_EQ(1, webViewHelper.webView()->pageScaleFactor()); 1729 EXPECT_EQ(1, webViewHelper.webView()->pageScaleFactor());
1730 } 1730 }
1731 1731
1732 TEST_P(ParameterizedWebFrameTest, MAYBE(LayoutSize320Quirk)) 1732 MAYBE_TEST_P(ParameterizedWebFrameTest, LayoutSize320Quirk)
1733 { 1733 {
1734 registerMockedHttpURLLoad("viewport/viewport-30.html"); 1734 registerMockedHttpURLLoad("viewport/viewport-30.html");
1735 1735
1736 FixedLayoutTestWebViewClient client; 1736 FixedLayoutTestWebViewClient client;
1737 client.m_screenInfo.deviceScaleFactor = 1; 1737 client.m_screenInfo.deviceScaleFactor = 1;
1738 int viewportWidth = 600; 1738 int viewportWidth = 600;
1739 int viewportHeight = 800; 1739 int viewportHeight = 800;
1740 1740
1741 FrameTestHelpers::WebViewHelper webViewHelper(this); 1741 FrameTestHelpers::WebViewHelper webViewHelper(this);
1742 webViewHelper.initializeAndLoad("about:blank", true, 0, &client, enableViewp ortSettings); 1742 webViewHelper.initializeAndLoad("about:blank", true, 0, &client, enableViewp ortSettings);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 FrameTestHelpers::WebViewHelper webViewHelper(this); 2021 FrameTestHelpers::WebViewHelper webViewHelper(this);
2022 webViewHelper.initializeAndLoad(m_baseURL + "fixed_layout.html", true, 0, &c lient, enableViewportSettings); 2022 webViewHelper.initializeAndLoad(m_baseURL + "fixed_layout.html", true, 0, &c lient, enableViewportSettings);
2023 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 2023 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
2024 2024
2025 webViewHelper.webView()->setPageScaleFactor(2); 2025 webViewHelper.webView()->setPageScaleFactor(2);
2026 2026
2027 EXPECT_EQ(980, toLocalFrame(webViewHelper.webViewImpl()->page()->mainFrame() )->contentLayoutObject()->documentRect().width()); 2027 EXPECT_EQ(980, toLocalFrame(webViewHelper.webViewImpl()->page()->mainFrame() )->contentLayoutObject()->documentRect().width());
2028 EXPECT_EQ(980, webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->co ntentsSize().width()); 2028 EXPECT_EQ(980, webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->co ntentsSize().width());
2029 } 2029 }
2030 2030
2031 TEST_P(ParameterizedWebFrameTest, MAYBE(targetDensityDpiHigh)) 2031 MAYBE_TEST_P(ParameterizedWebFrameTest, targetDensityDpiHigh)
2032 { 2032 {
2033 registerMockedHttpURLLoad("viewport-target-densitydpi-high.html"); 2033 registerMockedHttpURLLoad("viewport-target-densitydpi-high.html");
2034 2034
2035 FixedLayoutTestWebViewClient client; 2035 FixedLayoutTestWebViewClient client;
2036 // high-dpi = 240 2036 // high-dpi = 240
2037 float targetDpi = 240.0f; 2037 float targetDpi = 240.0f;
2038 float deviceScaleFactors[] = { 1.0f, 4.0f / 3.0f, 2.0f }; 2038 float deviceScaleFactors[] = { 1.0f, 4.0f / 3.0f, 2.0f };
2039 int viewportWidth = 640; 2039 int viewportWidth = 640;
2040 int viewportHeight = 480; 2040 int viewportHeight = 480;
2041 2041
(...skipping 10 matching lines...) Expand all
2052 2052
2053 // We need to account for the fact that logical pixels are unconditional ly multiplied by deviceScaleFactor to produce 2053 // We need to account for the fact that logical pixels are unconditional ly multiplied by deviceScaleFactor to produce
2054 // physical pixels. 2054 // physical pixels.
2055 float densityDpiScaleRatio = deviceScaleFactor * targetDpi / deviceDpi; 2055 float densityDpiScaleRatio = deviceScaleFactor * targetDpi / deviceDpi;
2056 EXPECT_NEAR(viewportWidth * densityDpiScaleRatio, webViewHelper.webViewI mpl()->mainFrameImpl()->frameView()->layoutSize().width(), 1.0f); 2056 EXPECT_NEAR(viewportWidth * densityDpiScaleRatio, webViewHelper.webViewI mpl()->mainFrameImpl()->frameView()->layoutSize().width(), 1.0f);
2057 EXPECT_NEAR(viewportHeight * densityDpiScaleRatio, webViewHelper.webView Impl()->mainFrameImpl()->frameView()->layoutSize().height(), 1.0f); 2057 EXPECT_NEAR(viewportHeight * densityDpiScaleRatio, webViewHelper.webView Impl()->mainFrameImpl()->frameView()->layoutSize().height(), 1.0f);
2058 EXPECT_NEAR(1.0f / densityDpiScaleRatio, webViewHelper.webView()->pageSc aleFactor(), 0.01f); 2058 EXPECT_NEAR(1.0f / densityDpiScaleRatio, webViewHelper.webView()->pageSc aleFactor(), 0.01f);
2059 } 2059 }
2060 } 2060 }
2061 2061
2062 TEST_P(ParameterizedWebFrameTest, MAYBE(targetDensityDpiDevice)) 2062 MAYBE_TEST_P(ParameterizedWebFrameTest, targetDensityDpiDevice)
2063 { 2063 {
2064 registerMockedHttpURLLoad("viewport-target-densitydpi-device.html"); 2064 registerMockedHttpURLLoad("viewport-target-densitydpi-device.html");
2065 2065
2066 float deviceScaleFactors[] = { 1.0f, 4.0f / 3.0f, 2.0f }; 2066 float deviceScaleFactors[] = { 1.0f, 4.0f / 3.0f, 2.0f };
2067 2067
2068 FixedLayoutTestWebViewClient client; 2068 FixedLayoutTestWebViewClient client;
2069 int viewportWidth = 640; 2069 int viewportWidth = 640;
2070 int viewportHeight = 480; 2070 int viewportHeight = 480;
2071 2071
2072 for (size_t i = 0; i < WTF_ARRAY_LENGTH(deviceScaleFactors); ++i) { 2072 for (size_t i = 0; i < WTF_ARRAY_LENGTH(deviceScaleFactors); ++i) {
2073 client.m_screenInfo.deviceScaleFactor = deviceScaleFactors[i]; 2073 client.m_screenInfo.deviceScaleFactor = deviceScaleFactors[i];
2074 2074
2075 FrameTestHelpers::WebViewHelper webViewHelper(this); 2075 FrameTestHelpers::WebViewHelper webViewHelper(this);
2076 webViewHelper.initializeAndLoad(m_baseURL + "viewport-target-densitydpi- device.html", true, 0, &client, enableViewportSettings); 2076 webViewHelper.initializeAndLoad(m_baseURL + "viewport-target-densitydpi- device.html", true, 0, &client, enableViewportSettings);
2077 webViewHelper.webView()->settings()->setWideViewportQuirkEnabled(true); 2077 webViewHelper.webView()->settings()->setWideViewportQuirkEnabled(true);
2078 webViewHelper.webView()->settings()->setSupportDeprecatedTargetDensityDP I(true); 2078 webViewHelper.webView()->settings()->setSupportDeprecatedTargetDensityDP I(true);
2079 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 2079 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
2080 2080
2081 EXPECT_NEAR(viewportWidth * client.m_screenInfo.deviceScaleFactor, webVi ewHelper.webViewImpl()->mainFrameImpl()->frameView()->layoutSize().width(), 1.0f ); 2081 EXPECT_NEAR(viewportWidth * client.m_screenInfo.deviceScaleFactor, webVi ewHelper.webViewImpl()->mainFrameImpl()->frameView()->layoutSize().width(), 1.0f );
2082 EXPECT_NEAR(viewportHeight * client.m_screenInfo.deviceScaleFactor, webV iewHelper.webViewImpl()->mainFrameImpl()->frameView()->layoutSize().height(), 1. 0f); 2082 EXPECT_NEAR(viewportHeight * client.m_screenInfo.deviceScaleFactor, webV iewHelper.webViewImpl()->mainFrameImpl()->frameView()->layoutSize().height(), 1. 0f);
2083 EXPECT_NEAR(1.0f / client.m_screenInfo.deviceScaleFactor, webViewHelper. webView()->pageScaleFactor(), 0.01f); 2083 EXPECT_NEAR(1.0f / client.m_screenInfo.deviceScaleFactor, webViewHelper. webView()->pageScaleFactor(), 0.01f);
2084 } 2084 }
2085 } 2085 }
2086 2086
2087 TEST_P(ParameterizedWebFrameTest, MAYBE(targetDensityDpiDeviceAndFixedWidth)) 2087 MAYBE_TEST_P(ParameterizedWebFrameTest, targetDensityDpiDeviceAndFixedWidth)
2088 { 2088 {
2089 registerMockedHttpURLLoad("viewport-target-densitydpi-device-and-fixed-width .html"); 2089 registerMockedHttpURLLoad("viewport-target-densitydpi-device-and-fixed-width .html");
2090 2090
2091 float deviceScaleFactors[] = { 1.0f, 4.0f / 3.0f, 2.0f }; 2091 float deviceScaleFactors[] = { 1.0f, 4.0f / 3.0f, 2.0f };
2092 2092
2093 FixedLayoutTestWebViewClient client; 2093 FixedLayoutTestWebViewClient client;
2094 int viewportWidth = 640; 2094 int viewportWidth = 640;
2095 int viewportHeight = 480; 2095 int viewportHeight = 480;
2096 2096
2097 for (size_t i = 0; i < WTF_ARRAY_LENGTH(deviceScaleFactors); ++i) { 2097 for (size_t i = 0; i < WTF_ARRAY_LENGTH(deviceScaleFactors); ++i) {
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
2883 blockBound = IntRect(webViewHelper.webViewImpl()->computeBlockBound(WebPoint (90, 90), true)); 2883 blockBound = IntRect(webViewHelper.webViewImpl()->computeBlockBound(WebPoint (90, 90), true));
2884 EXPECT_RECT_EQ(rectBack, blockBound); 2884 EXPECT_RECT_EQ(rectBack, blockBound);
2885 2885
2886 blockBound = IntRect(webViewHelper.webViewImpl()->computeBlockBound(WebPoint (109, 109), true)); 2886 blockBound = IntRect(webViewHelper.webViewImpl()->computeBlockBound(WebPoint (109, 109), true));
2887 EXPECT_RECT_EQ(rectBack, blockBound); 2887 EXPECT_RECT_EQ(rectBack, blockBound);
2888 2888
2889 blockBound = IntRect(webViewHelper.webViewImpl()->computeBlockBound(WebPoint (110, 110), true)); 2889 blockBound = IntRect(webViewHelper.webViewImpl()->computeBlockBound(WebPoint (110, 110), true));
2890 EXPECT_RECT_EQ(rectRightBottom, blockBound); 2890 EXPECT_RECT_EQ(rectRightBottom, blockBound);
2891 } 2891 }
2892 2892
2893 TEST_P(ParameterizedWebFrameTest, MAYBE(DivMultipleTargetZoomMultipleDivsTest)) 2893 MAYBE_TEST_P(ParameterizedWebFrameTest, DivMultipleTargetZoomMultipleDivsTest)
2894 { 2894 {
2895 registerMockedHttpURLLoad("get_multiple_divs_for_auto_zoom_test.html"); 2895 registerMockedHttpURLLoad("get_multiple_divs_for_auto_zoom_test.html");
2896 2896
2897 const float deviceScaleFactor = 2.0f; 2897 const float deviceScaleFactor = 2.0f;
2898 int viewportWidth = 640 / deviceScaleFactor; 2898 int viewportWidth = 640 / deviceScaleFactor;
2899 int viewportHeight = 1280 / deviceScaleFactor; 2899 int viewportHeight = 1280 / deviceScaleFactor;
2900 float doubleTapZoomAlreadyLegibleRatio = 1.2f; 2900 float doubleTapZoomAlreadyLegibleRatio = 1.2f;
2901 FrameTestHelpers::WebViewHelper webViewHelper(this); 2901 FrameTestHelpers::WebViewHelper webViewHelper(this);
2902 webViewHelper.initializeAndLoad(m_baseURL + "get_multiple_divs_for_auto_zoom _test.html"); 2902 webViewHelper.initializeAndLoad(m_baseURL + "get_multiple_divs_for_auto_zoom _test.html");
2903 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); 2903 webViewHelper.resize(WebSize(viewportWidth, viewportHeight));
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
3159 webViewHelper.webView()->advanceFocus(true); 3159 webViewHelper.webView()->advanceFocus(true);
3160 WebRect rect, caret; 3160 WebRect rect, caret;
3161 webViewHelper.webViewImpl()->selectionBounds(caret, rect); 3161 webViewHelper.webViewImpl()->selectionBounds(caret, rect);
3162 webViewHelper.webViewImpl()->computeScaleAndScrollForFocusedNode(webViewHelp er.webViewImpl()->focusedElement(), autoZoomToLegibleScale, scale, scroll, needA nimation); 3162 webViewHelper.webViewImpl()->computeScaleAndScrollForFocusedNode(webViewHelp er.webViewImpl()->focusedElement(), autoZoomToLegibleScale, scale, scroll, needA nimation);
3163 3163
3164 // There should be no change at all since the textbox is fully visible alrea dy. 3164 // There should be no change at all since the textbox is fully visible alrea dy.
3165 EXPECT_EQ(initialScale, scale); 3165 EXPECT_EQ(initialScale, scale);
3166 EXPECT_FALSE(needAnimation); 3166 EXPECT_FALSE(needAnimation);
3167 } 3167 }
3168 3168
3169 TEST_P(ParameterizedWebFrameTest, MAYBE(CharacterIndexAtPointWithPinchZoom)) 3169 MAYBE_TEST_P(ParameterizedWebFrameTest, CharacterIndexAtPointWithPinchZoom)
3170 { 3170 {
3171 registerMockedHttpURLLoad("sometext.html"); 3171 registerMockedHttpURLLoad("sometext.html");
3172 3172
3173 FrameTestHelpers::WebViewHelper webViewHelper(this); 3173 FrameTestHelpers::WebViewHelper webViewHelper(this);
3174 webViewHelper.initializeAndLoad(m_baseURL + "sometext.html"); 3174 webViewHelper.initializeAndLoad(m_baseURL + "sometext.html");
3175 webViewHelper.resize(WebSize(640, 480)); 3175 webViewHelper.resize(WebSize(640, 480));
3176 3176
3177 webViewHelper.webViewImpl()->setPageScaleFactor(2); 3177 webViewHelper.webViewImpl()->setPageScaleFactor(2);
3178 webViewHelper.webViewImpl()->setVisualViewportOffset(WebFloatPoint(50, 60)); 3178 webViewHelper.webViewImpl()->setVisualViewportOffset(WebFloatPoint(50, 60));
3179 3179
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
4408 4408
4409 // If the selection is editable text, we can't extend it into non-editable t ext. 4409 // If the selection is editable text, we can't extend it into non-editable t ext.
4410 frame->executeScript(WebScriptSource("selectElement('editable_1');")); 4410 frame->executeScript(WebScriptSource("selectElement('editable_1');"));
4411 EXPECT_EQ("Editable 1.", selectionAsString(frame)); 4411 EXPECT_EQ("Editable 1.", selectionAsString(frame));
4412 frame->selectRange(topLeft(elementBounds(frame, "editable_1")), bottomRightM inusOne(elementBounds(frame, "footer_1"))); 4412 frame->selectRange(topLeft(elementBounds(frame, "editable_1")), bottomRightM inusOne(elementBounds(frame, "footer_1")));
4413 // positionForPoint returns the wrong values for contenteditable spans. See 4413 // positionForPoint returns the wrong values for contenteditable spans. See
4414 // http://crbug.com/238334. 4414 // http://crbug.com/238334.
4415 // EXPECT_EQ("Editable 1. Editable 2. ]", selectionAsString(frame)); 4415 // EXPECT_EQ("Editable 1. Editable 2. ]", selectionAsString(frame));
4416 } 4416 }
4417 4417
4418 TEST_P(ParameterizedWebFrameTest, MAYBE(MoveRangeSelectionExtent)) 4418 MAYBE_TEST_P(ParameterizedWebFrameTest, MoveRangeSelectionExtent)
4419 { 4419 {
4420 WebLocalFrameImpl* frame; 4420 WebLocalFrameImpl* frame;
4421 WebRect startWebRect; 4421 WebRect startWebRect;
4422 WebRect endWebRect; 4422 WebRect endWebRect;
4423 4423
4424 registerMockedHttpURLLoad("move_range_selection_extent.html"); 4424 registerMockedHttpURLLoad("move_range_selection_extent.html");
4425 4425
4426 FrameTestHelpers::WebViewHelper webViewHelper(this); 4426 FrameTestHelpers::WebViewHelper webViewHelper(this);
4427 initializeTextSelectionWebView(m_baseURL + "move_range_selection_extent.html ", &webViewHelper); 4427 initializeTextSelectionWebView(m_baseURL + "move_range_selection_extent.html ", &webViewHelper);
4428 frame = toWebLocalFrameImpl(webViewHelper.webView()->mainFrame()); 4428 frame = toWebLocalFrameImpl(webViewHelper.webView()->mainFrame());
(...skipping 13 matching lines...) Expand all
4442 frame->moveRangeSelectionExtent(WebPoint(640, 480)); 4442 frame->moveRangeSelectionExtent(WebPoint(640, 480));
4443 EXPECT_EQ(" 16-char footer.", selectionAsString(frame)); 4443 EXPECT_EQ(" 16-char footer.", selectionAsString(frame));
4444 4444
4445 frame->moveRangeSelectionExtent(WebPoint(0, 0)); 4445 frame->moveRangeSelectionExtent(WebPoint(0, 0));
4446 EXPECT_EQ("16-char header. This text is initially selected.", selectionAsStr ing(frame)); 4446 EXPECT_EQ("16-char header. This text is initially selected.", selectionAsStr ing(frame));
4447 4447
4448 frame->executeCommand(WebString::fromUTF8("Unselect")); 4448 frame->executeCommand(WebString::fromUTF8("Unselect"));
4449 EXPECT_EQ("", selectionAsString(frame)); 4449 EXPECT_EQ("", selectionAsString(frame));
4450 } 4450 }
4451 4451
4452 TEST_P(ParameterizedWebFrameTest, MAYBE(MoveRangeSelectionExtentCannotCollapse)) 4452 MAYBE_TEST_P(ParameterizedWebFrameTest, MoveRangeSelectionExtentCannotCollapse)
4453 { 4453 {
4454 WebLocalFrameImpl* frame; 4454 WebLocalFrameImpl* frame;
4455 WebRect startWebRect; 4455 WebRect startWebRect;
4456 WebRect endWebRect; 4456 WebRect endWebRect;
4457 4457
4458 registerMockedHttpURLLoad("move_range_selection_extent.html"); 4458 registerMockedHttpURLLoad("move_range_selection_extent.html");
4459 4459
4460 FrameTestHelpers::WebViewHelper webViewHelper(this); 4460 FrameTestHelpers::WebViewHelper webViewHelper(this);
4461 initializeTextSelectionWebView(m_baseURL + "move_range_selection_extent.html ", &webViewHelper); 4461 initializeTextSelectionWebView(m_baseURL + "move_range_selection_extent.html ", &webViewHelper);
4462 frame = toWebLocalFrameImpl(webViewHelper.webView()->mainFrame()); 4462 frame = toWebLocalFrameImpl(webViewHelper.webView()->mainFrame());
4463 EXPECT_EQ("This text is initially selected.", selectionAsString(frame)); 4463 EXPECT_EQ("This text is initially selected.", selectionAsString(frame));
4464 webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); 4464 webViewHelper.webView()->selectionBounds(startWebRect, endWebRect);
4465 4465
4466 frame->moveRangeSelectionExtent(bottomRightMinusOne(startWebRect)); 4466 frame->moveRangeSelectionExtent(bottomRightMinusOne(startWebRect));
4467 EXPECT_EQ("This text is initially selected.", selectionAsString(frame)); 4467 EXPECT_EQ("This text is initially selected.", selectionAsString(frame));
4468 4468
4469 // Reset with swapped base and extent. 4469 // Reset with swapped base and extent.
4470 frame->selectRange(topLeft(endWebRect), bottomRightMinusOne(startWebRect)); 4470 frame->selectRange(topLeft(endWebRect), bottomRightMinusOne(startWebRect));
4471 EXPECT_EQ("This text is initially selected.", selectionAsString(frame)); 4471 EXPECT_EQ("This text is initially selected.", selectionAsString(frame));
4472 4472
4473 frame->moveRangeSelectionExtent(bottomRightMinusOne(endWebRect)); 4473 frame->moveRangeSelectionExtent(bottomRightMinusOne(endWebRect));
4474 EXPECT_EQ("This text is initially selected.", selectionAsString(frame)); 4474 EXPECT_EQ("This text is initially selected.", selectionAsString(frame));
4475 } 4475 }
4476 4476
4477 TEST_P(ParameterizedWebFrameTest, MAYBE(MoveRangeSelectionExtentScollsInputField )) 4477 MAYBE_TEST_P(ParameterizedWebFrameTest, MoveRangeSelectionExtentScollsInputField )
4478 { 4478 {
4479 WebLocalFrameImpl* frame; 4479 WebLocalFrameImpl* frame;
4480 WebRect startWebRect; 4480 WebRect startWebRect;
4481 WebRect endWebRect; 4481 WebRect endWebRect;
4482 4482
4483 registerMockedHttpURLLoad("move_range_selection_extent_input_field.html"); 4483 registerMockedHttpURLLoad("move_range_selection_extent_input_field.html");
4484 4484
4485 FrameTestHelpers::WebViewHelper webViewHelper(this); 4485 FrameTestHelpers::WebViewHelper webViewHelper(this);
4486 initializeTextSelectionWebView(m_baseURL + "move_range_selection_extent_inpu t_field.html", &webViewHelper); 4486 initializeTextSelectionWebView(m_baseURL + "move_range_selection_extent_inpu t_field.html", &webViewHelper);
4487 frame = toWebLocalFrameImpl(webViewHelper.webView()->mainFrame()); 4487 frame = toWebLocalFrameImpl(webViewHelper.webView()->mainFrame());
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
4829 WebGestureEvent event; 4829 WebGestureEvent event;
4830 event.type = WebInputEvent::GestureTap; 4830 event.type = WebInputEvent::GestureTap;
4831 event.sourceDevice = WebGestureDeviceTouchscreen; 4831 event.sourceDevice = WebGestureDeviceTouchscreen;
4832 event.x = x; 4832 event.x = x;
4833 event.y = y; 4833 event.y = y;
4834 event.data.tap.width = 50; 4834 event.data.tap.width = 50;
4835 event.data.tap.height = 50; 4835 event.data.tap.height = 50;
4836 return event; 4836 return event;
4837 } 4837 }
4838 4838
4839 TEST_P(ParameterizedWebFrameTest, MAYBE(DisambiguationPopup)) 4839 MAYBE_TEST_P(ParameterizedWebFrameTest, DisambiguationPopup)
4840 { 4840 {
4841 const std::string htmlFile = "disambiguation_popup.html"; 4841 const std::string htmlFile = "disambiguation_popup.html";
4842 registerMockedHttpURLLoad(htmlFile); 4842 registerMockedHttpURLLoad(htmlFile);
4843 4843
4844 DisambiguationPopupTestWebViewClient client; 4844 DisambiguationPopupTestWebViewClient client;
4845 4845
4846 // Make sure we initialize to minimum scale, even if the window size 4846 // Make sure we initialize to minimum scale, even if the window size
4847 // only becomes available after the load begins. 4847 // only becomes available after the load begins.
4848 FrameTestHelpers::WebViewHelper webViewHelper(this); 4848 FrameTestHelpers::WebViewHelper webViewHelper(this);
4849 webViewHelper.initializeAndLoad(m_baseURL + htmlFile, true, 0, &client); 4849 webViewHelper.initializeAndLoad(m_baseURL + htmlFile, true, 0, &client);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4883 // multi-target-tap. 4883 // multi-target-tap.
4884 webViewHelper.webView()->settings()->setMultiTargetTapNotificationEnabled(fa lse); 4884 webViewHelper.webView()->settings()->setMultiTargetTapNotificationEnabled(fa lse);
4885 4885
4886 for (int i = 0; i <= 46; i++) { 4886 for (int i = 0; i <= 46; i++) {
4887 client.resetTriggered(); 4887 client.resetTriggered();
4888 webViewHelper.webView()->handleInputEvent(fatTap(10 + i * 5, 590)); 4888 webViewHelper.webView()->handleInputEvent(fatTap(10 + i * 5, 590));
4889 EXPECT_FALSE(client.triggered()); 4889 EXPECT_FALSE(client.triggered());
4890 } 4890 }
4891 } 4891 }
4892 4892
4893 TEST_P(ParameterizedWebFrameTest, MAYBE(DisambiguationPopupNoContainer)) 4893 MAYBE_TEST_P(ParameterizedWebFrameTest, DisambiguationPopupNoContainer)
4894 { 4894 {
4895 registerMockedHttpURLLoad("disambiguation_popup_no_container.html"); 4895 registerMockedHttpURLLoad("disambiguation_popup_no_container.html");
4896 4896
4897 DisambiguationPopupTestWebViewClient client; 4897 DisambiguationPopupTestWebViewClient client;
4898 4898
4899 // Make sure we initialize to minimum scale, even if the window size 4899 // Make sure we initialize to minimum scale, even if the window size
4900 // only becomes available after the load begins. 4900 // only becomes available after the load begins.
4901 FrameTestHelpers::WebViewHelper webViewHelper(this); 4901 FrameTestHelpers::WebViewHelper webViewHelper(this);
4902 webViewHelper.initializeAndLoad(m_baseURL + "disambiguation_popup_no_contain er.html", true, 0, &client); 4902 webViewHelper.initializeAndLoad(m_baseURL + "disambiguation_popup_no_contain er.html", true, 0, &client);
4903 webViewHelper.resize(WebSize(1000, 1000)); 4903 webViewHelper.resize(WebSize(1000, 1000));
4904 4904
4905 client.resetTriggered(); 4905 client.resetTriggered();
4906 webViewHelper.webView()->handleInputEvent(fatTap(50, 50)); 4906 webViewHelper.webView()->handleInputEvent(fatTap(50, 50));
4907 EXPECT_FALSE(client.triggered()); 4907 EXPECT_FALSE(client.triggered());
4908 } 4908 }
4909 4909
4910 TEST_P(ParameterizedWebFrameTest, MAYBE(DisambiguationPopupMobileSite)) 4910 MAYBE_TEST_P(ParameterizedWebFrameTest, DisambiguationPopupMobileSite)
4911 { 4911 {
4912 const std::string htmlFile = "disambiguation_popup_mobile_site.html"; 4912 const std::string htmlFile = "disambiguation_popup_mobile_site.html";
4913 registerMockedHttpURLLoad(htmlFile); 4913 registerMockedHttpURLLoad(htmlFile);
4914 4914
4915 DisambiguationPopupTestWebViewClient client; 4915 DisambiguationPopupTestWebViewClient client;
4916 4916
4917 // Make sure we initialize to minimum scale, even if the window size 4917 // Make sure we initialize to minimum scale, even if the window size
4918 // only becomes available after the load begins. 4918 // only becomes available after the load begins.
4919 FrameTestHelpers::WebViewHelper webViewHelper(this); 4919 FrameTestHelpers::WebViewHelper webViewHelper(this);
4920 webViewHelper.initializeAndLoad(m_baseURL + htmlFile, true, 0, &client, enab leViewportSettings); 4920 webViewHelper.initializeAndLoad(m_baseURL + htmlFile, true, 0, &client, enab leViewportSettings);
(...skipping 13 matching lines...) Expand all
4934 EXPECT_FALSE(client.triggered()); 4934 EXPECT_FALSE(client.triggered());
4935 } 4935 }
4936 4936
4937 for (int i = 0; i <= 46; i++) { 4937 for (int i = 0; i <= 46; i++) {
4938 client.resetTriggered(); 4938 client.resetTriggered();
4939 webViewHelper.webView()->handleInputEvent(fatTap(10 + i * 5, 590)); 4939 webViewHelper.webView()->handleInputEvent(fatTap(10 + i * 5, 590));
4940 EXPECT_FALSE(client.triggered()); 4940 EXPECT_FALSE(client.triggered());
4941 } 4941 }
4942 } 4942 }
4943 4943
4944 TEST_P(ParameterizedWebFrameTest, MAYBE(DisambiguationPopupViewportSite)) 4944 MAYBE_TEST_P(ParameterizedWebFrameTest, DisambiguationPopupViewportSite)
4945 { 4945 {
4946 const std::string htmlFile = "disambiguation_popup_viewport_site.html"; 4946 const std::string htmlFile = "disambiguation_popup_viewport_site.html";
4947 registerMockedHttpURLLoad(htmlFile); 4947 registerMockedHttpURLLoad(htmlFile);
4948 4948
4949 DisambiguationPopupTestWebViewClient client; 4949 DisambiguationPopupTestWebViewClient client;
4950 4950
4951 // Make sure we initialize to minimum scale, even if the window size 4951 // Make sure we initialize to minimum scale, even if the window size
4952 // only becomes available after the load begins. 4952 // only becomes available after the load begins.
4953 FrameTestHelpers::WebViewHelper webViewHelper(this); 4953 FrameTestHelpers::WebViewHelper webViewHelper(this);
4954 webViewHelper.initializeAndLoad(m_baseURL + htmlFile, true, 0, &client, enab leViewportSettings); 4954 webViewHelper.initializeAndLoad(m_baseURL + htmlFile, true, 0, &client, enab leViewportSettings);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5018 EXPECT_TRUE(client.triggered()); 5018 EXPECT_TRUE(client.triggered());
5019 5019
5020 // The same tap shouldn't trigger didTapMultipleTargets() after disabling th e notification for 5020 // The same tap shouldn't trigger didTapMultipleTargets() after disabling th e notification for
5021 // multi-target-tap. 5021 // multi-target-tap.
5022 webViewHelper.webView()->settings()->setMultiTargetTapNotificationEnabled(fa lse); 5022 webViewHelper.webView()->settings()->setMultiTargetTapNotificationEnabled(fa lse);
5023 client.resetTriggered(); 5023 client.resetTriggered();
5024 webViewHelper.webView()->handleInputEvent(fatTap(10, 60)); 5024 webViewHelper.webView()->handleInputEvent(fatTap(10, 60));
5025 EXPECT_FALSE(client.triggered()); 5025 EXPECT_FALSE(client.triggered());
5026 } 5026 }
5027 5027
5028 TEST_P(ParameterizedWebFrameTest, MAYBE(DisambiguationPopupBlacklist)) 5028 MAYBE_TEST_P(ParameterizedWebFrameTest, DisambiguationPopupBlacklist)
5029 { 5029 {
5030 const unsigned viewportWidth = 500; 5030 const unsigned viewportWidth = 500;
5031 const unsigned viewportHeight = 1000; 5031 const unsigned viewportHeight = 1000;
5032 const unsigned divHeight = 100; 5032 const unsigned divHeight = 100;
5033 const std::string htmlFile = "disambiguation_popup_blacklist.html"; 5033 const std::string htmlFile = "disambiguation_popup_blacklist.html";
5034 registerMockedHttpURLLoad(htmlFile); 5034 registerMockedHttpURLLoad(htmlFile);
5035 5035
5036 DisambiguationPopupTestWebViewClient client; 5036 DisambiguationPopupTestWebViewClient client;
5037 5037
5038 // Make sure we initialize to minimum scale, even if the window size 5038 // Make sure we initialize to minimum scale, even if the window size
(...skipping 11 matching lines...) Expand all
5050 client.resetTriggered(); 5050 client.resetTriggered();
5051 webViewHelper.webView()->handleInputEvent(fatTap(viewportWidth / 2, divHeigh t)); 5051 webViewHelper.webView()->handleInputEvent(fatTap(viewportWidth / 2, divHeigh t));
5052 EXPECT_TRUE(client.triggered()); 5052 EXPECT_TRUE(client.triggered());
5053 5053
5054 // The third div container should be blacklisted if you click on the link it contains. 5054 // The third div container should be blacklisted if you click on the link it contains.
5055 client.resetTriggered(); 5055 client.resetTriggered();
5056 webViewHelper.webView()->handleInputEvent(fatTap(viewportWidth / 2, divHeigh t * 3.25)); 5056 webViewHelper.webView()->handleInputEvent(fatTap(viewportWidth / 2, divHeigh t * 3.25));
5057 EXPECT_FALSE(client.triggered()); 5057 EXPECT_FALSE(client.triggered());
5058 } 5058 }
5059 5059
5060 TEST_P(ParameterizedWebFrameTest, MAYBE(DisambiguationPopupPageScale)) 5060 MAYBE_TEST_P(ParameterizedWebFrameTest, DisambiguationPopupPageScale)
5061 { 5061 {
5062 registerMockedHttpURLLoad("disambiguation_popup_page_scale.html"); 5062 registerMockedHttpURLLoad("disambiguation_popup_page_scale.html");
5063 5063
5064 DisambiguationPopupTestWebViewClient client; 5064 DisambiguationPopupTestWebViewClient client;
5065 5065
5066 // Make sure we initialize to minimum scale, even if the window size 5066 // Make sure we initialize to minimum scale, even if the window size
5067 // only becomes available after the load begins. 5067 // only becomes available after the load begins.
5068 FrameTestHelpers::WebViewHelper webViewHelper(this); 5068 FrameTestHelpers::WebViewHelper webViewHelper(this);
5069 webViewHelper.initializeAndLoad(m_baseURL + "disambiguation_popup_page_scale .html", true, 0, &client); 5069 webViewHelper.initializeAndLoad(m_baseURL + "disambiguation_popup_page_scale .html", true, 0, &client);
5070 webViewHelper.resize(WebSize(1000, 1000)); 5070 webViewHelper.resize(WebSize(1000, 1000));
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
6407 webViewHelper.resize(WebSize(100, 200)); 6407 webViewHelper.resize(WebSize(100, 200));
6408 EXPECT_EQ(800, bottomFixed->offsetTop() + bottomFixed->offsetHeight()); 6408 EXPECT_EQ(800, bottomFixed->offsetTop() + bottomFixed->offsetHeight());
6409 EXPECT_EQ(800, topBottomFixed->offsetHeight()); 6409 EXPECT_EQ(800, topBottomFixed->offsetHeight());
6410 6410
6411 // Now the layout viewport hits the content width limit of 500px so it'll be 500x500. 6411 // Now the layout viewport hits the content width limit of 500px so it'll be 500x500.
6412 webViewHelper.resize(WebSize(200, 200)); 6412 webViewHelper.resize(WebSize(200, 200));
6413 EXPECT_EQ(500, rightFixed->offsetLeft() + rightFixed->offsetWidth()); 6413 EXPECT_EQ(500, rightFixed->offsetLeft() + rightFixed->offsetWidth());
6414 EXPECT_EQ(500, leftRightFixed->offsetWidth()); 6414 EXPECT_EQ(500, leftRightFixed->offsetWidth());
6415 } 6415 }
6416 6416
6417 TEST_P(ParameterizedWebFrameTest, MAYBE(FrameViewMoveWithSetFrameRect)) 6417 MAYBE_TEST_P(ParameterizedWebFrameTest, FrameViewMoveWithSetFrameRect)
6418 { 6418 {
6419 FrameTestHelpers::WebViewHelper webViewHelper(this); 6419 FrameTestHelpers::WebViewHelper webViewHelper(this);
6420 webViewHelper.initializeAndLoad("about:blank"); 6420 webViewHelper.initializeAndLoad("about:blank");
6421 webViewHelper.resize(WebSize(200, 200)); 6421 webViewHelper.resize(WebSize(200, 200));
6422 webViewHelper.webViewImpl()->updateAllLifecyclePhases(); 6422 webViewHelper.webViewImpl()->updateAllLifecyclePhases();
6423 6423
6424 FrameView* frameView = webViewHelper.webViewImpl()->mainFrameImpl()->frameVi ew(); 6424 FrameView* frameView = webViewHelper.webViewImpl()->mainFrameImpl()->frameVi ew();
6425 EXPECT_RECT_EQ(IntRect(0, 0, 200, 200), frameView->frameRect()); 6425 EXPECT_RECT_EQ(IntRect(0, 0, 200, 200), frameView->frameRect());
6426 frameView->setFrameRect(IntRect(100, 100, 200, 200)); 6426 frameView->setFrameRect(IntRect(100, 100, 200, 200));
6427 EXPECT_RECT_EQ(IntRect(100, 100, 200, 200), frameView->frameRect()); 6427 EXPECT_RECT_EQ(IntRect(100, 100, 200, 200), frameView->frameRect());
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
6610 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); 6610 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal());
6611 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); 6611 ASSERT_TRUE(webScrollLayer->userScrollableVertical());
6612 6612
6613 // Verify the main frame still behaves correctly after a resize. 6613 // Verify the main frame still behaves correctly after a resize.
6614 webViewHelper.resize(WebSize(viewportHeight, viewportWidth)); 6614 webViewHelper.resize(WebSize(viewportHeight, viewportWidth));
6615 ASSERT_TRUE(webScrollLayer->scrollable()); 6615 ASSERT_TRUE(webScrollLayer->scrollable());
6616 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); 6616 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal());
6617 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); 6617 ASSERT_TRUE(webScrollLayer->userScrollableVertical());
6618 } 6618 }
6619 6619
6620 TEST_P(ParameterizedWebFrameTest, MAYBE(FullscreenSubframe)) 6620 MAYBE_TEST_P(ParameterizedWebFrameTest, FullscreenSubframe)
6621 { 6621 {
6622 FakeCompositingWebViewClient client; 6622 FakeCompositingWebViewClient client;
6623 registerMockedHttpURLLoad("fullscreen_iframe.html"); 6623 registerMockedHttpURLLoad("fullscreen_iframe.html");
6624 registerMockedHttpURLLoad("fullscreen_div.html"); 6624 registerMockedHttpURLLoad("fullscreen_div.html");
6625 FrameTestHelpers::WebViewHelper webViewHelper(this); 6625 FrameTestHelpers::WebViewHelper webViewHelper(this);
6626 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full screen_iframe.html", true, 0, &client, configureAndroid); 6626 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "full screen_iframe.html", true, 0, &client, configureAndroid);
6627 int viewportWidth = 640; 6627 int viewportWidth = 640;
6628 int viewportHeight = 480; 6628 int viewportHeight = 480;
6629 client.m_screenInfo.rect.width = viewportWidth; 6629 client.m_screenInfo.rect.width = viewportWidth;
6630 client.m_screenInfo.rect.height = viewportHeight; 6630 client.m_screenInfo.rect.height = viewportHeight;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
6731 6731
6732 webViewImpl->didExitFullScreen(); 6732 webViewImpl->didExitFullScreen();
6733 webViewImpl->updateAllLifecyclePhases(); 6733 webViewImpl->updateAllLifecyclePhases();
6734 EXPECT_EQ(320, layoutView->logicalWidth().floor()); 6734 EXPECT_EQ(320, layoutView->logicalWidth().floor());
6735 EXPECT_EQ(192, layoutView->logicalHeight().floor()); 6735 EXPECT_EQ(192, layoutView->logicalHeight().floor());
6736 EXPECT_FLOAT_EQ(2, webViewImpl->pageScaleFactor()); 6736 EXPECT_FLOAT_EQ(2, webViewImpl->pageScaleFactor());
6737 EXPECT_FLOAT_EQ(2, webViewImpl->minimumPageScaleFactor()); 6737 EXPECT_FLOAT_EQ(2, webViewImpl->minimumPageScaleFactor());
6738 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor()); 6738 EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor());
6739 } 6739 }
6740 6740
6741 TEST_P(ParameterizedWebFrameTest, MAYBE(LayoutBlockPercentHeightDescendants)) 6741 MAYBE_TEST_P(ParameterizedWebFrameTest, LayoutBlockPercentHeightDescendants)
6742 { 6742 {
6743 registerMockedHttpURLLoad("percent-height-descendants.html"); 6743 registerMockedHttpURLLoad("percent-height-descendants.html");
6744 FrameTestHelpers::WebViewHelper webViewHelper(this); 6744 FrameTestHelpers::WebViewHelper webViewHelper(this);
6745 webViewHelper.initializeAndLoad(m_baseURL + "percent-height-descendants.html "); 6745 webViewHelper.initializeAndLoad(m_baseURL + "percent-height-descendants.html ");
6746 6746
6747 WebView* webView = webViewHelper.webView(); 6747 WebView* webView = webViewHelper.webView();
6748 webViewHelper.resize(WebSize(800, 800)); 6748 webViewHelper.resize(WebSize(800, 800));
6749 webView->updateAllLifecyclePhases(); 6749 webView->updateAllLifecyclePhases();
6750 6750
6751 Document* document = toWebLocalFrameImpl(webView->mainFrame())->frame()->doc ument(); 6751 Document* document = toWebLocalFrameImpl(webView->mainFrame())->frame()->doc ument();
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
8505 } 8505 }
8506 8506
8507 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange) 8507 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange)
8508 { 8508 {
8509 swapLocalFrameToRemoteFrame(); 8509 swapLocalFrameToRemoteFrame();
8510 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p arentElement.style.display = 'none';")); 8510 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p arentElement.style.display = 'none';"));
8511 EXPECT_FALSE(remoteFrameClient()->isVisible()); 8511 EXPECT_FALSE(remoteFrameClient()->isVisible());
8512 } 8512 }
8513 8513
8514 } // namespace blink 8514 } // namespace blink
OLDNEW
« 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