| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 GetWebView()->HandleInputEvent( | 120 GetWebView()->HandleInputEvent( |
| 121 GenerateEvent(WebInputEvent::kGestureScrollEnd)); | 121 GenerateEvent(WebInputEvent::kGestureScrollEnd)); |
| 122 } | 122 } |
| 123 | 123 |
| 124 Element* GetElementById(const WebString& id) { | 124 Element* GetElementById(const WebString& id) { |
| 125 return static_cast<Element*>( | 125 return static_cast<Element*>( |
| 126 GetWebView()->MainFrameImpl()->GetDocument().GetElementById(id)); | 126 GetWebView()->MainFrameImpl()->GetDocument().GetElementById(id)); |
| 127 } | 127 } |
| 128 | 128 |
| 129 WebViewBase* GetWebView() const { return helper_.WebView(); } | 129 WebViewBase* GetWebView() const { return helper_.WebView(); } |
| 130 LocalFrame* GetFrame() const { | 130 LocalFrame* GetFrame() const { return helper_.LocalMainFrame()->GetFrame(); } |
| 131 return helper_.WebView()->MainFrameImpl()->GetFrame(); | |
| 132 } | |
| 133 VisualViewport& GetVisualViewport() const { | 131 VisualViewport& GetVisualViewport() const { |
| 134 return helper_.WebView()->GetPage()->GetVisualViewport(); | 132 return helper_.WebView()->GetPage()->GetVisualViewport(); |
| 135 } | 133 } |
| 136 | 134 |
| 137 private: | 135 private: |
| 138 std::string base_url_; | 136 std::string base_url_; |
| 139 FrameTestHelpers::WebViewHelper helper_; | 137 FrameTestHelpers::WebViewHelper helper_; |
| 140 }; | 138 }; |
| 141 | 139 |
| 142 #define EXPECT_SIZE_EQ(expected, actual) \ | 140 #define EXPECT_SIZE_EQ(expected, actual) \ |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 | 1069 |
| 1072 // Make sure we're not adding the browser controls height to the vh units as | 1070 // Make sure we're not adding the browser controls height to the vh units as |
| 1073 // when they're locked to hidden, the ICB fills the entire viewport already. | 1071 // when they're locked to hidden, the ICB fills the entire viewport already. |
| 1074 EXPECT_FLOAT_EQ(200.f, abs_pos->getBoundingClientRect()->height()); | 1072 EXPECT_FLOAT_EQ(200.f, abs_pos->getBoundingClientRect()->height()); |
| 1075 EXPECT_FLOAT_EQ(200.f, fixed_pos->getBoundingClientRect()->height()); | 1073 EXPECT_FLOAT_EQ(200.f, fixed_pos->getBoundingClientRect()->height()); |
| 1076 EXPECT_EQ(400, GetFrame()->View()->ViewportSizeForViewportUnits().Height()); | 1074 EXPECT_EQ(400, GetFrame()->View()->ViewportSizeForViewportUnits().Height()); |
| 1077 } | 1075 } |
| 1078 } | 1076 } |
| 1079 | 1077 |
| 1080 } // namespace blink | 1078 } // namespace blink |
| OLD | NEW |