OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 2693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2704 webViewHelper.initializeAndLoad(m_baseURL + "viewport-inside-media.html", | 2704 webViewHelper.initializeAndLoad(m_baseURL + "viewport-inside-media.html", |
2705 true, nullptr, &client, nullptr, | 2705 true, nullptr, &client, nullptr, |
2706 enableViewportSettings); | 2706 enableViewportSettings); |
2707 webViewHelper.resize(WebSize(640, 480)); | 2707 webViewHelper.resize(WebSize(640, 480)); |
2708 | 2708 |
2709 EXPECT_EQ(2000, webViewHelper.webView() | 2709 EXPECT_EQ(2000, webViewHelper.webView() |
2710 ->mainFrameImpl() | 2710 ->mainFrameImpl() |
2711 ->frameView() | 2711 ->frameView() |
2712 ->layoutSize() | 2712 ->layoutSize() |
2713 .width()); | 2713 .width()); |
| 2714 |
| 2715 webViewHelper.resize(WebSize(1200, 480)); |
| 2716 |
| 2717 EXPECT_EQ(1200, webViewHelper.webView() |
| 2718 ->mainFrameImpl() |
| 2719 ->frameView() |
| 2720 ->layoutSize() |
| 2721 .width()); |
2714 } | 2722 } |
2715 | 2723 |
2716 TEST_P(ParameterizedWebFrameTest, AtViewportAffectingAtMediaRecalcCount) { | 2724 TEST_P(ParameterizedWebFrameTest, AtViewportAffectingAtMediaRecalcCount) { |
2717 registerMockedHttpURLLoad("viewport-and-media.html"); | 2725 registerMockedHttpURLLoad("viewport-and-media.html"); |
2718 | 2726 |
2719 FixedLayoutTestWebViewClient client; | 2727 FixedLayoutTestWebViewClient client; |
2720 FrameTestHelpers::WebViewHelper webViewHelper; | 2728 FrameTestHelpers::WebViewHelper webViewHelper; |
2721 webViewHelper.initialize(true, nullptr, &client, nullptr, | 2729 webViewHelper.initialize(true, nullptr, &client, nullptr, |
2722 enableViewportSettings); | 2730 enableViewportSettings); |
2723 webViewHelper.resize(WebSize(640, 480)); | 2731 webViewHelper.resize(WebSize(640, 480)); |
(...skipping 7528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10252 webViewHelper.webView()->handleInputEvent(endEvent); | 10260 webViewHelper.webView()->handleInputEvent(endEvent); |
10253 webViewHelper.webView()->handleInputEvent(updateEvent); | 10261 webViewHelper.webView()->handleInputEvent(updateEvent); |
10254 | 10262 |
10255 // Try a full Begin/Update/End cycle. | 10263 // Try a full Begin/Update/End cycle. |
10256 webViewHelper.webView()->handleInputEvent(beginEvent); | 10264 webViewHelper.webView()->handleInputEvent(beginEvent); |
10257 webViewHelper.webView()->handleInputEvent(updateEvent); | 10265 webViewHelper.webView()->handleInputEvent(updateEvent); |
10258 webViewHelper.webView()->handleInputEvent(endEvent); | 10266 webViewHelper.webView()->handleInputEvent(endEvent); |
10259 } | 10267 } |
10260 | 10268 |
10261 } // namespace blink | 10269 } // namespace blink |
OLD | NEW |