| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 Element* getElementById(const WebString& id) { | 126 Element* getElementById(const WebString& id) { |
| 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 WebViewImpl* webViewImpl() const { return m_helper.webView(); } | 131 WebViewImpl* webViewImpl() const { return m_helper.webView(); } |
| 132 LocalFrame* frame() const { | 132 LocalFrame* frame() const { |
| 133 return m_helper.webView()->mainFrameImpl()->frame(); | 133 return m_helper.webView()->mainFrameImpl()->frame(); |
| 134 } | 134 } |
| 135 VisualViewport& visualViewport() const { | 135 VisualViewport& visualViewport() const { |
| 136 return m_helper.webView()->page()->frameHost().visualViewport(); | 136 return m_helper.webView()->page()->visualViewport(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 private: | 139 private: |
| 140 std::string m_baseURL; | 140 std::string m_baseURL; |
| 141 FrameTestHelpers::WebViewHelper m_helper; | 141 FrameTestHelpers::WebViewHelper m_helper; |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 #define EXPECT_SIZE_EQ(expected, actual) \ | 144 #define EXPECT_SIZE_EQ(expected, actual) \ |
| 145 do { \ | 145 do { \ |
| 146 EXPECT_FLOAT_EQ((expected).width(), (actual).width()); \ | 146 EXPECT_FLOAT_EQ((expected).width(), (actual).width()); \ |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 | 1058 |
| 1059 // Make sure we're not adding the browser controls height to the vh units as | 1059 // Make sure we're not adding the browser controls height to the vh units as |
| 1060 // when they're locked to hidden, the ICB fills the entire viewport already. | 1060 // when they're locked to hidden, the ICB fills the entire viewport already. |
| 1061 EXPECT_FLOAT_EQ(200.f, absPos->getBoundingClientRect()->height()); | 1061 EXPECT_FLOAT_EQ(200.f, absPos->getBoundingClientRect()->height()); |
| 1062 EXPECT_FLOAT_EQ(200.f, fixedPos->getBoundingClientRect()->height()); | 1062 EXPECT_FLOAT_EQ(200.f, fixedPos->getBoundingClientRect()->height()); |
| 1063 EXPECT_EQ(400, frame()->view()->viewportSizeForViewportUnits().height()); | 1063 EXPECT_EQ(400, frame()->view()->viewportSizeForViewportUnits().height()); |
| 1064 } | 1064 } |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 } // namespace blink | 1067 } // namespace blink |
| OLD | NEW |