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

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

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with ariaTextAlternative Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "core/frame/VisualViewport.h" 7 #include "core/frame/VisualViewport.h"
8 8
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameHost.h" 10 #include "core/frame/FrameHost.h"
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 webViewImpl()->setPageScaleFactor(2); 1502 webViewImpl()->setPageScaleFactor(2);
1503 webViewImpl()->setVisualViewportOffset(WebFloatPoint(200, 230)); 1503 webViewImpl()->setVisualViewportOffset(WebFloatPoint(200, 230));
1504 frameView.layoutViewportScrollableArea()->setScrollPosition(DoublePoint(400, 1100), ProgrammaticScroll); 1504 frameView.layoutViewportScrollableArea()->setScrollPosition(DoublePoint(400, 1100), ProgrammaticScroll);
1505 1505
1506 // FIXME(504057): PaintLayerScrollableArea dirties the compositing state. 1506 // FIXME(504057): PaintLayerScrollableArea dirties the compositing state.
1507 forceFullCompositingUpdate(); 1507 forceFullCompositingUpdate();
1508 1508
1509 // Because of where the visual viewport is located, this should hit the bott om right 1509 // Because of where the visual viewport is located, this should hit the bott om right
1510 // target (target 4). 1510 // target (target 4).
1511 WebAXObject hitNode = webDoc.accessibilityObject().hitTest(WebPoint(154, 165 )); 1511 WebAXObject hitNode = webDoc.accessibilityObject().hitTest(WebPoint(154, 165 ));
1512 EXPECT_EQ(std::string("Target4"), hitNode.title().utf8()); 1512 WebAXNameFrom nameFrom;
1513 WebVector<WebAXObject> nameObjects;
1514 EXPECT_EQ(std::string("Target4"), hitNode.name(nameFrom, nameObjects).utf8() );
1513 } 1515 }
1514 1516
1515 // Tests that the maximum scroll offset of the viewport can be fractional. 1517 // Tests that the maximum scroll offset of the viewport can be fractional.
1516 TEST_P(ParameterizedVisualViewportTest, TestCoordinateTransforms) 1518 TEST_P(ParameterizedVisualViewportTest, TestCoordinateTransforms)
1517 { 1519 {
1518 initializeWithAndroidSettings(); 1520 initializeWithAndroidSettings();
1519 webViewImpl()->resize(IntSize(800, 600)); 1521 webViewImpl()->resize(IntSize(800, 600));
1520 registerMockedHttpURLLoad("content-width-1000.html"); 1522 registerMockedHttpURLLoad("content-width-1000.html");
1521 navigateTo(m_baseURL + "content-width-1000.html"); 1523 navigateTo(m_baseURL + "content-width-1000.html");
1522 1524
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 webViewImpl()->handleInputEvent(pinchUpdate); 1608 webViewImpl()->handleInputEvent(pinchUpdate);
1607 1609
1608 VisualViewport& visualViewport = webViewImpl()->page()->frameHost().visualVi ewport(); 1610 VisualViewport& visualViewport = webViewImpl()->page()->frameHost().visualVi ewport();
1609 FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView(); 1611 FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView();
1610 1612
1611 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 50), visualViewport.location()); 1613 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 50), visualViewport.location());
1612 EXPECT_FLOAT_POINT_EQ(FloatPoint(0, 0), frameView.scrollPositionDouble()); 1614 EXPECT_FLOAT_POINT_EQ(FloatPoint(0, 0), frameView.scrollPositionDouble());
1613 } 1615 }
1614 1616
1615 } // namespace 1617 } // namespace
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebAXObject.cpp ('k') | third_party/WebKit/public/web/WebAXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698