| 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 3218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3229 | 3229 |
| 3230 class CreateChildCounterFrameClient | 3230 class CreateChildCounterFrameClient |
| 3231 : public FrameTestHelpers::TestWebFrameClient { | 3231 : public FrameTestHelpers::TestWebFrameClient { |
| 3232 public: | 3232 public: |
| 3233 CreateChildCounterFrameClient() : m_count(0) {} | 3233 CreateChildCounterFrameClient() : m_count(0) {} |
| 3234 WebLocalFrame* createChildFrame(WebLocalFrame* parent, | 3234 WebLocalFrame* createChildFrame(WebLocalFrame* parent, |
| 3235 WebTreeScopeType, | 3235 WebTreeScopeType, |
| 3236 const WebString& name, | 3236 const WebString& name, |
| 3237 const WebString& fallbackName, | 3237 const WebString& fallbackName, |
| 3238 WebSandboxFlags, | 3238 WebSandboxFlags, |
| 3239 const WebParsedFeaturePolicy&, |
| 3239 const WebFrameOwnerProperties&) override; | 3240 const WebFrameOwnerProperties&) override; |
| 3240 | 3241 |
| 3241 int count() const { return m_count; } | 3242 int count() const { return m_count; } |
| 3242 | 3243 |
| 3243 private: | 3244 private: |
| 3244 int m_count; | 3245 int m_count; |
| 3245 }; | 3246 }; |
| 3246 | 3247 |
| 3247 WebLocalFrame* CreateChildCounterFrameClient::createChildFrame( | 3248 WebLocalFrame* CreateChildCounterFrameClient::createChildFrame( |
| 3248 WebLocalFrame* parent, | 3249 WebLocalFrame* parent, |
| 3249 WebTreeScopeType scope, | 3250 WebTreeScopeType scope, |
| 3250 const WebString& name, | 3251 const WebString& name, |
| 3251 const WebString& fallbackName, | 3252 const WebString& fallbackName, |
| 3252 WebSandboxFlags sandboxFlags, | 3253 WebSandboxFlags sandboxFlags, |
| 3254 const WebParsedFeaturePolicy& containerPolicy, |
| 3253 const WebFrameOwnerProperties& frameOwnerProperties) { | 3255 const WebFrameOwnerProperties& frameOwnerProperties) { |
| 3254 ++m_count; | 3256 ++m_count; |
| 3255 return TestWebFrameClient::createChildFrame( | 3257 return TestWebFrameClient::createChildFrame(parent, scope, name, fallbackName, |
| 3256 parent, scope, name, fallbackName, sandboxFlags, frameOwnerProperties); | 3258 sandboxFlags, containerPolicy, |
| 3259 frameOwnerProperties); |
| 3257 } | 3260 } |
| 3258 | 3261 |
| 3259 TEST_P(WebViewTest, ChangeDisplayMode) { | 3262 TEST_P(WebViewTest, ChangeDisplayMode) { |
| 3260 registerMockedHttpURLLoad("display_mode.html"); | 3263 registerMockedHttpURLLoad("display_mode.html"); |
| 3261 WebView* webView = | 3264 WebView* webView = |
| 3262 m_webViewHelper.initializeAndLoad(m_baseURL + "display_mode.html", true); | 3265 m_webViewHelper.initializeAndLoad(m_baseURL + "display_mode.html", true); |
| 3263 | 3266 |
| 3264 std::string content = | 3267 std::string content = |
| 3265 WebFrameContentDumper::dumpWebViewAsText(webView, 21).utf8(); | 3268 WebFrameContentDumper::dumpWebViewAsText(webView, 21).utf8(); |
| 3266 EXPECT_EQ("regular-ui", content); | 3269 EXPECT_EQ("regular-ui", content); |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4443 EXPECT_FALSE(frameView->visualViewportSuppliesScrollbars()); | 4446 EXPECT_FALSE(frameView->visualViewportSuppliesScrollbars()); |
| 4444 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 4447 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 4445 EXPECT_NE(nullptr, | 4448 EXPECT_NE(nullptr, |
| 4446 frameView->layoutViewportScrollableArea()->verticalScrollbar()); | 4449 frameView->layoutViewportScrollableArea()->verticalScrollbar()); |
| 4447 } else { | 4450 } else { |
| 4448 EXPECT_NE(nullptr, frameView->verticalScrollbar()); | 4451 EXPECT_NE(nullptr, frameView->verticalScrollbar()); |
| 4449 } | 4452 } |
| 4450 } | 4453 } |
| 4451 | 4454 |
| 4452 } // namespace blink | 4455 } // namespace blink |
| OLD | NEW |