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