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 3127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3138 | 3138 |
3139 class CreateChildCounterFrameClient | 3139 class CreateChildCounterFrameClient |
3140 : public FrameTestHelpers::TestWebFrameClient { | 3140 : public FrameTestHelpers::TestWebFrameClient { |
3141 public: | 3141 public: |
3142 CreateChildCounterFrameClient() : count_(0) {} | 3142 CreateChildCounterFrameClient() : count_(0) {} |
3143 WebLocalFrame* CreateChildFrame(WebLocalFrame* parent, | 3143 WebLocalFrame* CreateChildFrame(WebLocalFrame* parent, |
3144 WebTreeScopeType, | 3144 WebTreeScopeType, |
3145 const WebString& name, | 3145 const WebString& name, |
3146 const WebString& fallback_name, | 3146 const WebString& fallback_name, |
3147 WebSandboxFlags, | 3147 WebSandboxFlags, |
| 3148 const WebParsedFeaturePolicy&, |
3148 const WebFrameOwnerProperties&) override; | 3149 const WebFrameOwnerProperties&) override; |
3149 | 3150 |
3150 int Count() const { return count_; } | 3151 int Count() const { return count_; } |
3151 | 3152 |
3152 private: | 3153 private: |
3153 int count_; | 3154 int count_; |
3154 }; | 3155 }; |
3155 | 3156 |
3156 WebLocalFrame* CreateChildCounterFrameClient::CreateChildFrame( | 3157 WebLocalFrame* CreateChildCounterFrameClient::CreateChildFrame( |
3157 WebLocalFrame* parent, | 3158 WebLocalFrame* parent, |
3158 WebTreeScopeType scope, | 3159 WebTreeScopeType scope, |
3159 const WebString& name, | 3160 const WebString& name, |
3160 const WebString& fallback_name, | 3161 const WebString& fallback_name, |
3161 WebSandboxFlags sandbox_flags, | 3162 WebSandboxFlags sandbox_flags, |
| 3163 const WebParsedFeaturePolicy& container_policy, |
3162 const WebFrameOwnerProperties& frame_owner_properties) { | 3164 const WebFrameOwnerProperties& frame_owner_properties) { |
3163 ++count_; | 3165 ++count_; |
3164 return TestWebFrameClient::CreateChildFrame(parent, scope, name, | 3166 return TestWebFrameClient::CreateChildFrame( |
3165 fallback_name, sandbox_flags, | 3167 parent, scope, name, fallback_name, sandbox_flags, container_policy, |
3166 frame_owner_properties); | 3168 frame_owner_properties); |
3167 } | 3169 } |
3168 | 3170 |
3169 TEST_P(WebViewTest, ChangeDisplayMode) { | 3171 TEST_P(WebViewTest, ChangeDisplayMode) { |
3170 RegisterMockedHttpURLLoad("display_mode.html"); | 3172 RegisterMockedHttpURLLoad("display_mode.html"); |
3171 WebView* web_view = | 3173 WebView* web_view = |
3172 web_view_helper_.InitializeAndLoad(base_url_ + "display_mode.html", true); | 3174 web_view_helper_.InitializeAndLoad(base_url_ + "display_mode.html", true); |
3173 | 3175 |
3174 std::string content = | 3176 std::string content = |
3175 WebFrameContentDumper::DumpWebViewAsText(web_view, 21).Utf8(); | 3177 WebFrameContentDumper::DumpWebViewAsText(web_view, 21).Utf8(); |
3176 EXPECT_EQ("regular-ui", content); | 3178 EXPECT_EQ("regular-ui", content); |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4362 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); | 4364 EXPECT_FALSE(frame_view->VisualViewportSuppliesScrollbars()); |
4363 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 4365 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
4364 EXPECT_NE(nullptr, | 4366 EXPECT_NE(nullptr, |
4365 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); | 4367 frame_view->LayoutViewportScrollableArea()->VerticalScrollbar()); |
4366 } else { | 4368 } else { |
4367 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); | 4369 EXPECT_NE(nullptr, frame_view->VerticalScrollbar()); |
4368 } | 4370 } |
4369 } | 4371 } |
4370 | 4372 |
4371 } // namespace blink | 4373 } // namespace blink |
OLD | NEW |