| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3179 webView->mainFrameImpl()->extractSmartClipData(cropRect, clipText, clipHtml); | 3179 webView->mainFrameImpl()->extractSmartClipData(cropRect, clipText, clipHtml); |
| 3180 } | 3180 } |
| 3181 | 3181 |
| 3182 class CreateChildCounterFrameClient | 3182 class CreateChildCounterFrameClient |
| 3183 : public FrameTestHelpers::TestWebFrameClient { | 3183 : public FrameTestHelpers::TestWebFrameClient { |
| 3184 public: | 3184 public: |
| 3185 CreateChildCounterFrameClient() : m_count(0) {} | 3185 CreateChildCounterFrameClient() : m_count(0) {} |
| 3186 WebLocalFrame* createChildFrame(WebLocalFrame* parent, | 3186 WebLocalFrame* createChildFrame(WebLocalFrame* parent, |
| 3187 WebTreeScopeType, | 3187 WebTreeScopeType, |
| 3188 const WebString& name, | 3188 const WebString& name, |
| 3189 const WebString& uniqueName, | 3189 const WebString& fallbackName, |
| 3190 WebSandboxFlags, | 3190 WebSandboxFlags, |
| 3191 const WebFrameOwnerProperties&) override; | 3191 const WebFrameOwnerProperties&) override; |
| 3192 | 3192 |
| 3193 int count() const { return m_count; } | 3193 int count() const { return m_count; } |
| 3194 | 3194 |
| 3195 private: | 3195 private: |
| 3196 int m_count; | 3196 int m_count; |
| 3197 }; | 3197 }; |
| 3198 | 3198 |
| 3199 WebLocalFrame* CreateChildCounterFrameClient::createChildFrame( | 3199 WebLocalFrame* CreateChildCounterFrameClient::createChildFrame( |
| 3200 WebLocalFrame* parent, | 3200 WebLocalFrame* parent, |
| 3201 WebTreeScopeType scope, | 3201 WebTreeScopeType scope, |
| 3202 const WebString& name, | 3202 const WebString& name, |
| 3203 const WebString& uniqueName, | 3203 const WebString& fallbackName, |
| 3204 WebSandboxFlags sandboxFlags, | 3204 WebSandboxFlags sandboxFlags, |
| 3205 const WebFrameOwnerProperties& frameOwnerProperties) { | 3205 const WebFrameOwnerProperties& frameOwnerProperties) { |
| 3206 ++m_count; | 3206 ++m_count; |
| 3207 return TestWebFrameClient::createChildFrame( | 3207 return TestWebFrameClient::createChildFrame( |
| 3208 parent, scope, name, uniqueName, sandboxFlags, frameOwnerProperties); | 3208 parent, scope, name, fallbackName, sandboxFlags, frameOwnerProperties); |
| 3209 } | 3209 } |
| 3210 | 3210 |
| 3211 TEST_P(WebViewTest, ChangeDisplayMode) { | 3211 TEST_P(WebViewTest, ChangeDisplayMode) { |
| 3212 registerMockedHttpURLLoad("display_mode.html"); | 3212 registerMockedHttpURLLoad("display_mode.html"); |
| 3213 WebView* webView = | 3213 WebView* webView = |
| 3214 m_webViewHelper.initializeAndLoad(m_baseURL + "display_mode.html", true); | 3214 m_webViewHelper.initializeAndLoad(m_baseURL + "display_mode.html", true); |
| 3215 | 3215 |
| 3216 std::string content = | 3216 std::string content = |
| 3217 WebFrameContentDumper::dumpWebViewAsText(webView, 21).utf8(); | 3217 WebFrameContentDumper::dumpWebViewAsText(webView, 21).utf8(); |
| 3218 EXPECT_EQ("regular-ui", content); | 3218 EXPECT_EQ("regular-ui", content); |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4333 EXPECT_FALSE(frameView->visualViewportSuppliesScrollbars()); | 4333 EXPECT_FALSE(frameView->visualViewportSuppliesScrollbars()); |
| 4334 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 4334 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 4335 EXPECT_NE(nullptr, | 4335 EXPECT_NE(nullptr, |
| 4336 frameView->layoutViewportScrollableArea()->verticalScrollbar()); | 4336 frameView->layoutViewportScrollableArea()->verticalScrollbar()); |
| 4337 } else { | 4337 } else { |
| 4338 EXPECT_NE(nullptr, frameView->verticalScrollbar()); | 4338 EXPECT_NE(nullptr, frameView->verticalScrollbar()); |
| 4339 } | 4339 } |
| 4340 } | 4340 } |
| 4341 | 4341 |
| 4342 } // namespace blink | 4342 } // namespace blink |
| OLD | NEW |