|
1 | 1 | <?php
|
2 | 2 | return array(
|
3 | 3 | 'set_up' => static function ( Test_Embed_Optimizer_Optimization_Detective $test_case ): void {
|
4 |
| - foreach ( array_merge( od_get_breakpoint_max_widths(), array( 1000 ) ) as $viewport_width ) { |
| 4 | + foreach ( array_merge( od_get_breakpoint_max_widths(), array( 1000 ) ) as $i => $viewport_width ) { |
5 | 5 | $elements = array(
|
6 | 6 | array(
|
7 | 7 | 'xpath' => '/*[1][self::HTML]/*[2][self::BODY]/*[1][self::FIGURE]/*[1][self::DIV]',
|
8 | 8 | 'isLCP' => true,
|
9 |
| - 'resizedBoundingClientRect' => array_merge( $test_case->get_sample_dom_rect(), array( 'height' => 500 ) ), |
| 9 | + 'resizedBoundingClientRect' => array_merge( $test_case->get_sample_dom_rect(), array( 'height' => 500 + $i * 100 ) ), |
10 | 10 | ),
|
11 | 11 | );
|
12 | 12 |
|
|
17 | 17 | }
|
18 | 18 |
|
19 | 19 | $sample_size = od_get_url_metrics_breakpoint_sample_size();
|
20 |
| - for ( $i = 0; $i < $sample_size; $i++ ) { |
| 20 | + for ( $j = 0; $j < $sample_size; $j++ ) { |
21 | 21 | OD_URL_Metrics_Post_Type::store_url_metric(
|
22 | 22 | od_get_url_metrics_slug( od_get_normalized_query_vars() ),
|
23 | 23 | $test_case->get_sample_url_metric(
|
|
53 | 53 | <title>...</title>
|
54 | 54 | <style>
|
55 | 55 | @media (max-width: 480px) { #embed-optimizer-a7659db28ecaa36ddee6ae66857dabd8 { min-height: 500px; } }
|
56 |
| - @media (min-width: 481px) and (max-width: 600px) { #embed-optimizer-a7659db28ecaa36ddee6ae66857dabd8 { min-height: 500px; } } |
57 |
| - @media (min-width: 601px) and (max-width: 782px) { #embed-optimizer-a7659db28ecaa36ddee6ae66857dabd8 { min-height: 500px; } } |
58 |
| - @media (min-width: 783px) { #embed-optimizer-a7659db28ecaa36ddee6ae66857dabd8 { min-height: 500px; } } |
| 56 | + @media (min-width: 481px) and (max-width: 600px) { #embed-optimizer-a7659db28ecaa36ddee6ae66857dabd8 { min-height: 600px; } } |
| 57 | + @media (min-width: 601px) and (max-width: 782px) { #embed-optimizer-a7659db28ecaa36ddee6ae66857dabd8 { min-height: 700px; } } |
| 58 | + @media (min-width: 783px) { #embed-optimizer-a7659db28ecaa36ddee6ae66857dabd8 { min-height: 800px; } } |
59 | 59 | </style>
|
60 | 60 | <link data-od-added-tag rel="preconnect" href="https://pbs.twimg.com" media="(min-width: 481px)">
|
61 | 61 | <link data-od-added-tag rel="preconnect" href="https://syndication.twitter.com" media="(min-width: 481px)">
|
|
0 commit comments