| 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 3201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3212 webView->mainFrameImpl()->extractSmartClipData(cropRect, clipText, clipHtml); | 3212 webView->mainFrameImpl()->extractSmartClipData(cropRect, clipText, clipHtml); |
| 3213 } | 3213 } |
| 3214 | 3214 |
| 3215 class CreateChildCounterFrameClient | 3215 class CreateChildCounterFrameClient |
| 3216 : public FrameTestHelpers::TestWebFrameClient { | 3216 : public FrameTestHelpers::TestWebFrameClient { |
| 3217 public: | 3217 public: |
| 3218 CreateChildCounterFrameClient() : m_count(0) {} | 3218 CreateChildCounterFrameClient() : m_count(0) {} |
| 3219 WebLocalFrame* createChildFrame(WebLocalFrame* parent, | 3219 WebLocalFrame* createChildFrame(WebLocalFrame* parent, |
| 3220 WebTreeScopeType, | 3220 WebTreeScopeType, |
| 3221 const WebString& name, | 3221 const WebString& name, |
| 3222 const WebString& uniqueName, | 3222 const WebString& fallbackName, |
| 3223 WebSandboxFlags, | 3223 WebSandboxFlags, |
| 3224 const WebFrameOwnerProperties&) override; | 3224 const WebFrameOwnerProperties&) override; |
| 3225 | 3225 |
| 3226 int count() const { return m_count; } | 3226 int count() const { return m_count; } |
| 3227 | 3227 |
| 3228 private: | 3228 private: |
| 3229 int m_count; | 3229 int m_count; |
| 3230 }; | 3230 }; |
| 3231 | 3231 |
| 3232 WebLocalFrame* CreateChildCounterFrameClient::createChildFrame( | 3232 WebLocalFrame* CreateChildCounterFrameClient::createChildFrame( |
| 3233 WebLocalFrame* parent, | 3233 WebLocalFrame* parent, |
| 3234 WebTreeScopeType scope, | 3234 WebTreeScopeType scope, |
| 3235 const WebString& name, | 3235 const WebString& name, |
| 3236 const WebString& uniqueName, | 3236 const WebString& fallbackName, |
| 3237 WebSandboxFlags sandboxFlags, | 3237 WebSandboxFlags sandboxFlags, |
| 3238 const WebFrameOwnerProperties& frameOwnerProperties) { | 3238 const WebFrameOwnerProperties& frameOwnerProperties) { |
| 3239 ++m_count; | 3239 ++m_count; |
| 3240 return TestWebFrameClient::createChildFrame( | 3240 return TestWebFrameClient::createChildFrame( |
| 3241 parent, scope, name, uniqueName, sandboxFlags, frameOwnerProperties); | 3241 parent, scope, name, fallbackName, sandboxFlags, frameOwnerProperties); |
| 3242 } | 3242 } |
| 3243 | 3243 |
| 3244 TEST_P(WebViewTest, ChangeDisplayMode) { | 3244 TEST_P(WebViewTest, ChangeDisplayMode) { |
| 3245 registerMockedHttpURLLoad("display_mode.html"); | 3245 registerMockedHttpURLLoad("display_mode.html"); |
| 3246 WebView* webView = | 3246 WebView* webView = |
| 3247 m_webViewHelper.initializeAndLoad(m_baseURL + "display_mode.html", true); | 3247 m_webViewHelper.initializeAndLoad(m_baseURL + "display_mode.html", true); |
| 3248 | 3248 |
| 3249 std::string content = | 3249 std::string content = |
| 3250 WebFrameContentDumper::dumpWebViewAsText(webView, 21).utf8(); | 3250 WebFrameContentDumper::dumpWebViewAsText(webView, 21).utf8(); |
| 3251 EXPECT_EQ("regular-ui", content); | 3251 EXPECT_EQ("regular-ui", content); |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4428 EXPECT_FALSE(frameView->visualViewportSuppliesScrollbars()); | 4428 EXPECT_FALSE(frameView->visualViewportSuppliesScrollbars()); |
| 4429 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 4429 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 4430 EXPECT_NE(nullptr, | 4430 EXPECT_NE(nullptr, |
| 4431 frameView->layoutViewportScrollableArea()->verticalScrollbar()); | 4431 frameView->layoutViewportScrollableArea()->verticalScrollbar()); |
| 4432 } else { | 4432 } else { |
| 4433 EXPECT_NE(nullptr, frameView->verticalScrollbar()); | 4433 EXPECT_NE(nullptr, frameView->verticalScrollbar()); |
| 4434 } | 4434 } |
| 4435 } | 4435 } |
| 4436 | 4436 |
| 4437 } // namespace blink | 4437 } // namespace blink |
| OLD | NEW |