| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 webViewImpl()->handleInputEvent(generateEvent(WebInputEvent::GestureScro
llEnd)); | 122 webViewImpl()->handleInputEvent(generateEvent(WebInputEvent::GestureScro
llEnd)); |
| 123 } | 123 } |
| 124 | 124 |
| 125 Element* getElementById(const WebString& id) | 125 Element* getElementById(const WebString& id) |
| 126 { | 126 { |
| 127 return static_cast<Element*>( | 127 return static_cast<Element*>( |
| 128 webViewImpl()->mainFrame()->document().getElementById(id)); | 128 webViewImpl()->mainFrame()->document().getElementById(id)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 | 131 |
| 132 WebViewImpl* webViewImpl() const { return m_helper.webViewImpl(); } | 132 WebViewImpl* webViewImpl() const { return m_helper.webView(); } |
| 133 LocalFrame* frame() const { return m_helper.webViewImpl()->mainFrameImpl()->
frame(); } | 133 LocalFrame* frame() const { return m_helper.webView()->mainFrameImpl()->fram
e(); } |
| 134 VisualViewport& visualViewport() const { return m_helper.webViewImpl()->page
()->frameHost().visualViewport(); } | 134 VisualViewport& visualViewport() const { return m_helper.webView()->page()->
frameHost().visualViewport(); } |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 std::string m_baseURL; | 137 std::string m_baseURL; |
| 138 FrameTestHelpers::WebViewHelper m_helper; | 138 FrameTestHelpers::WebViewHelper m_helper; |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 #define EXPECT_POINT_EQ(expected, actual) \ | 141 #define EXPECT_POINT_EQ(expected, actual) \ |
| 142 do { \ | 142 do { \ |
| 143 EXPECT_DOUBLE_EQ((expected).x(), (actual).x()); \ | 143 EXPECT_DOUBLE_EQ((expected).x(), (actual).x()); \ |
| 144 EXPECT_DOUBLE_EQ((expected).y(), (actual).y()); \ | 144 EXPECT_DOUBLE_EQ((expected).y(), (actual).y()); \ |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 | 825 |
| 826 ASSERT_EQ(80.f, webView->topControls().contentOffset()); | 826 ASSERT_EQ(80.f, webView->topControls().contentOffset()); |
| 827 EXPECT_EQ(expectedRootOffset, rootViewport->scrollPosition().y()); | 827 EXPECT_EQ(expectedRootOffset, rootViewport->scrollPosition().y()); |
| 828 | 828 |
| 829 webView->handleInputEvent( | 829 webView->handleInputEvent( |
| 830 generateEvent(WebInputEvent::GestureScrollEnd)); | 830 generateEvent(WebInputEvent::GestureScrollEnd)); |
| 831 } | 831 } |
| 832 } | 832 } |
| 833 | 833 |
| 834 } // namespace blink | 834 } // namespace blink |
| OLD | NEW |