Lines Matching refs:constraints
132 PageScaleConstraints constraints = description.resolve(initialViewportSize, WebCore::Length(980, WebCore::Fixed));
134 constraints.fitToContentsWidth(constraints.layoutSize.width(), initialWidth);
135 return constraints;
147 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
149 EXPECT_EQ(320, constraints.layoutSize.width());
150 EXPECT_EQ(352, constraints.layoutSize.height());
151 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
152 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
153 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
166 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
168 EXPECT_EQ(980, constraints.layoutSize.width());
169 EXPECT_EQ(352, constraints.layoutSize.height());
170 EXPECT_NEAR(0.32f, constraints.initialScale, 0.01f);
171 EXPECT_NEAR(0.32f, constraints.minimumScale, 0.01f);
172 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
185 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
187 EXPECT_EQ(320, constraints.layoutSize.width());
188 EXPECT_EQ(352, constraints.layoutSize.height());
189 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
190 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
191 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
204 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
206 EXPECT_EQ(160, constraints.layoutSize.width());
207 EXPECT_EQ(176, constraints.layoutSize.height());
208 EXPECT_NEAR(2.0f, constraints.initialScale, 0.01f);
209 EXPECT_NEAR(2.0f, constraints.minimumScale, 0.01f);
210 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
223 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
225 EXPECT_EQ(640, constraints.layoutSize.width());
226 EXPECT_EQ(704, constraints.layoutSize.height());
227 EXPECT_NEAR(0.5f, constraints.initialScale, 0.01f);
228 EXPECT_NEAR(0.5f, constraints.minimumScale, 0.01f);
229 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
242 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
244 EXPECT_EQ(200, constraints.layoutSize.width());
245 EXPECT_EQ(220, constraints.layoutSize.height());
246 EXPECT_NEAR(1.6f, constraints.initialScale, 0.01f);
247 EXPECT_NEAR(1.6f, constraints.minimumScale, 0.01f);
248 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
261 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
263 EXPECT_EQ(1280, constraints.layoutSize.width());
264 EXPECT_EQ(1408, constraints.layoutSize.height());
265 EXPECT_NEAR(0.25f, constraints.initialScale, 0.01f);
266 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
267 EXPECT_NEAR(0.25f, constraints.maximumScale, 0.01f);
280 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
282 EXPECT_EQ(1280, constraints.layoutSize.width());
283 EXPECT_EQ(1408, constraints.layoutSize.height());
284 EXPECT_NEAR(0.25f, constraints.initialScale, 0.01f);
285 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
286 EXPECT_NEAR(0.25f, constraints.maximumScale, 0.01f);
299 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
301 EXPECT_EQ(1280, constraints.layoutSize.width());
302 EXPECT_EQ(1408, constraints.layoutSize.height());
303 EXPECT_NEAR(0.25f, constraints.initialScale, 0.01f);
304 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
305 EXPECT_NEAR(0.25f, constraints.maximumScale, 0.01f);
318 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
320 EXPECT_EQ(1280, constraints.layoutSize.width());
321 EXPECT_EQ(1408, constraints.layoutSize.height());
322 EXPECT_NEAR(0.25f, constraints.initialScale, 0.01f);
323 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
324 EXPECT_NEAR(0.25f, constraints.maximumScale, 0.01f);
337 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
339 EXPECT_EQ(980, constraints.layoutSize.width());
340 EXPECT_EQ(1078, constraints.layoutSize.height());
341 EXPECT_NEAR(0.32f, constraints.initialScale, 0.01f);
342 EXPECT_NEAR(0.32f, constraints.minimumScale, 0.01f);
343 EXPECT_NEAR(0.5f, constraints.maximumScale, 0.01f);
356 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
358 EXPECT_EQ(640, constraints.layoutSize.width());
359 EXPECT_EQ(704, constraints.layoutSize.height());
360 EXPECT_NEAR(0.5f, constraints.initialScale, 0.01f);
361 EXPECT_NEAR(0.5f, constraints.minimumScale, 0.01f);
362 EXPECT_NEAR(0.5f, constraints.maximumScale, 0.01f);
375 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
377 EXPECT_EQ(1280, constraints.layoutSize.width());
378 EXPECT_EQ(1408, constraints.layoutSize.height());
379 EXPECT_NEAR(0.25f, constraints.initialScale, 0.01f);
380 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
381 EXPECT_NEAR(0.5f, constraints.maximumScale, 0.01f);
394 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
396 EXPECT_EQ(320, constraints.layoutSize.width());
397 EXPECT_EQ(352, constraints.layoutSize.height());
398 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
399 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
400 EXPECT_NEAR(1.0f, constraints.maximumScale, 0.01f);
413 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
415 EXPECT_EQ(980, constraints.layoutSize.width());
416 EXPECT_EQ(1078, constraints.layoutSize.height());
417 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
418 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
419 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
432 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
434 EXPECT_EQ(980, constraints.layoutSize.width());
435 EXPECT_EQ(1078, constraints.layoutSize.height());
436 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
437 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
438 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
451 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
453 EXPECT_EQ(980, constraints.layoutSize.width());
454 EXPECT_EQ(1078, constraints.layoutSize.height());
455 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
456 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
457 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
470 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
472 EXPECT_EQ(64, constraints.layoutSize.width());
473 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
474 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
475 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
476 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
489 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
491 EXPECT_EQ(160, constraints.layoutSize.width());
492 EXPECT_EQ(176, constraints.layoutSize.height());
493 EXPECT_NEAR(2.0f, constraints.initialScale, 0.01f);
494 EXPECT_NEAR(2.0f, constraints.minimumScale, 0.01f);
495 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
508 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
510 EXPECT_EQ(980, constraints.layoutSize.width());
511 EXPECT_EQ(1078, constraints.layoutSize.height());
512 EXPECT_NEAR(10.0f, constraints.initialScale, 0.01f);
513 EXPECT_NEAR(10.0f, constraints.minimumScale, 0.01f);
514 EXPECT_NEAR(10.0f, constraints.maximumScale, 0.01f);
527 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
529 EXPECT_EQ(980, constraints.layoutSize.width());
530 EXPECT_EQ(1078, constraints.layoutSize.height());
531 EXPECT_NEAR(10.0f, constraints.initialScale, 0.01f);
532 EXPECT_NEAR(10.0f, constraints.minimumScale, 0.01f);
533 EXPECT_NEAR(10.0f, constraints.maximumScale, 0.01f);
546 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
548 EXPECT_EQ(980, constraints.layoutSize.width());
549 EXPECT_EQ(1078, constraints.layoutSize.height());
550 EXPECT_NEAR(10.0f, constraints.initialScale, 0.01f);
551 EXPECT_NEAR(10.0f, constraints.minimumScale, 0.01f);
552 EXPECT_NEAR(10.0f, constraints.maximumScale, 0.01f);
565 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
567 EXPECT_EQ(980, constraints.layoutSize.width());
568 EXPECT_EQ(1078, constraints.layoutSize.height());
569 EXPECT_NEAR(3.0f, constraints.initialScale, 0.01f);
570 EXPECT_NEAR(3.0f, constraints.minimumScale, 0.01f);
571 EXPECT_NEAR(3.0f, constraints.maximumScale, 0.01f);
584 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
586 EXPECT_EQ(980, constraints.layoutSize.width());
587 EXPECT_EQ(1078, constraints.layoutSize.height());
588 EXPECT_NEAR(4.0f, constraints.initialScale, 0.01f);
589 EXPECT_NEAR(4.0f, constraints.minimumScale, 0.01f);
590 EXPECT_NEAR(4.0f, constraints.maximumScale, 0.01f);
603 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
605 EXPECT_EQ(980, constraints.layoutSize.width());
606 EXPECT_EQ(1078, constraints.layoutSize.height());
607 EXPECT_NEAR(10.0f, constraints.initialScale, 0.01f);
608 EXPECT_NEAR(10.0f, constraints.minimumScale, 0.01f);
609 EXPECT_NEAR(10.0f, constraints.maximumScale, 0.01f);
622 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
624 EXPECT_EQ(980, constraints.layoutSize.width());
625 EXPECT_EQ(1078, constraints.layoutSize.height());
626 EXPECT_NEAR(8.0f, constraints.initialScale, 0.01f);
627 EXPECT_NEAR(8.0f, constraints.minimumScale, 0.01f);
628 EXPECT_NEAR(9.0f, constraints.maximumScale, 0.01f);
641 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
643 EXPECT_EQ(980, constraints.layoutSize.width());
644 EXPECT_EQ(1078, constraints.layoutSize.height());
645 EXPECT_NEAR(0.32f, constraints.initialScale, 0.01f);
646 EXPECT_NEAR(0.32f, constraints.minimumScale, 0.01f);
647 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
660 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
662 EXPECT_EQ(352, constraints.layoutSize.width());
663 EXPECT_NEAR(387.2, constraints.layoutSize.height(), 0.01);
664 EXPECT_NEAR(0.91f, constraints.initialScale, 0.01f);
665 EXPECT_NEAR(0.91f, constraints.minimumScale, 0.01f);
666 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
679 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
681 EXPECT_EQ(700, constraints.layoutSize.width());
682 EXPECT_EQ(770, constraints.layoutSize.height());
683 EXPECT_NEAR(0.46f, constraints.initialScale, 0.01f);
684 EXPECT_NEAR(0.46f, constraints.minimumScale, 0.01f);
685 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
698 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
700 EXPECT_EQ(200, constraints.layoutSize.width());
701 EXPECT_EQ(220, constraints.layoutSize.height());
702 EXPECT_NEAR(1.6f, constraints.initialScale, 0.01f);
703 EXPECT_NEAR(1.6f, constraints.minimumScale, 0.01f);
704 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
717 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
719 EXPECT_EQ(980, constraints.layoutSize.width());
720 EXPECT_EQ(700, constraints.layoutSize.height());
721 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
722 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
723 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
736 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
738 EXPECT_EQ(980, constraints.layoutSize.width());
739 EXPECT_EQ(200, constraints.layoutSize.height());
740 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
741 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
742 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
755 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
757 EXPECT_EQ(320, constraints.layoutSize.width());
758 EXPECT_EQ(352, constraints.layoutSize.height());
759 EXPECT_NEAR(2.0f, constraints.initialScale, 0.01f);
760 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
761 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
774 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
776 EXPECT_EQ(640, constraints.layoutSize.width());
777 EXPECT_EQ(704, constraints.layoutSize.height());
778 EXPECT_NEAR(0.5f, constraints.initialScale, 0.01f);
779 EXPECT_NEAR(0.5f, constraints.minimumScale, 0.01f);
780 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
793 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
795 EXPECT_EQ(1280, constraints.layoutSize.width());
796 EXPECT_EQ(1408, constraints.layoutSize.height());
797 EXPECT_NEAR(0.25f, constraints.initialScale, 0.01f);
798 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
799 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
812 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
814 EXPECT_NEAR(636.36, constraints.layoutSize.width(), 0.01f);
815 EXPECT_EQ(700, constraints.layoutSize.height());
816 EXPECT_NEAR(1.6f, constraints.initialScale, 0.01f);
817 EXPECT_NEAR(0.50f, constraints.minimumScale, 0.01f);
818 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
831 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
833 EXPECT_EQ(320, constraints.layoutSize.width());
834 EXPECT_EQ(352, constraints.layoutSize.height());
835 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
836 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
837 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
850 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
852 EXPECT_EQ(640, constraints.layoutSize.width());
853 EXPECT_EQ(704, constraints.layoutSize.height());
854 EXPECT_NEAR(0.5f, constraints.initialScale, 0.01f);
855 EXPECT_NEAR(0.5f, constraints.minimumScale, 0.01f);
856 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
869 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
871 EXPECT_EQ(200, constraints.layoutSize.width());
872 EXPECT_EQ(700, constraints.layoutSize.height());
873 EXPECT_NEAR(1.6f, constraints.initialScale, 0.01f);
874 EXPECT_NEAR(1.6f, constraints.minimumScale, 0.01f);
875 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
888 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
890 EXPECT_EQ(700, constraints.layoutSize.width());
891 EXPECT_EQ(352, constraints.layoutSize.height());
892 EXPECT_NEAR(0.46f, constraints.initialScale, 0.01f);
893 EXPECT_NEAR(0.46f, constraints.minimumScale, 0.01f);
894 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
907 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
909 EXPECT_EQ(1000, constraints.layoutSize.width());
910 EXPECT_EQ(704, constraints.layoutSize.height());
911 EXPECT_NEAR(0.5f, constraints.initialScale, 0.01f);
912 EXPECT_NEAR(0.32f, constraints.minimumScale, 0.01f);
913 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
926 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
928 EXPECT_EQ(320, constraints.layoutSize.width());
929 EXPECT_EQ(1000, constraints.layoutSize.height());
930 EXPECT_NEAR(2.0f, constraints.initialScale, 0.01f);
931 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
932 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
945 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
947 EXPECT_EQ(64, constraints.layoutSize.width());
948 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
949 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
950 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
951 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
964 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
966 EXPECT_EQ(10000, constraints.layoutSize.width());
967 EXPECT_EQ(10000, constraints.layoutSize.height());
968 EXPECT_NEAR(0.25f, constraints.initialScale, 0.01f);
969 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
970 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
983 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
985 EXPECT_EQ(3200, constraints.layoutSize.width());
986 EXPECT_EQ(3520, constraints.layoutSize.height());
987 EXPECT_NEAR(0.1f, constraints.initialScale, 0.01f);
988 EXPECT_NEAR(0.1f, constraints.minimumScale, 0.01f);
989 EXPECT_NEAR(0.1f, constraints.maximumScale, 0.01f);
1002 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1004 EXPECT_EQ(32, constraints.layoutSize.width());
1005 EXPECT_NEAR(35.2, constraints.layoutSize.height(), 0.01f);
1006 EXPECT_NEAR(10.0f, constraints.initialScale, 0.01f);
1007 EXPECT_NEAR(10.0f, constraints.minimumScale, 0.01f);
1008 EXPECT_NEAR(10.0f, constraints.maximumScale, 0.01f);
1021 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1023 EXPECT_EQ(320, constraints.layoutSize.width());
1024 EXPECT_EQ(3000, constraints.layoutSize.height());
1025 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1026 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1027 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1040 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1042 EXPECT_EQ(3000, constraints.layoutSize.width());
1043 EXPECT_EQ(352, constraints.layoutSize.height());
1044 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1045 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
1046 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1059 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1061 EXPECT_EQ(320, constraints.layoutSize.width());
1062 EXPECT_EQ(352, constraints.layoutSize.height());
1063 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1064 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1065 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1078 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1080 EXPECT_EQ(980, constraints.layoutSize.width());
1081 EXPECT_EQ(1078, constraints.layoutSize.height());
1082 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1083 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1084 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1097 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1099 EXPECT_EQ(980, constraints.layoutSize.width());
1100 EXPECT_EQ(1078, constraints.layoutSize.height());
1101 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1102 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1103 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1116 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1118 EXPECT_EQ(64, constraints.layoutSize.width());
1119 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
1120 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
1121 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
1122 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1135 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1137 EXPECT_EQ(980, constraints.layoutSize.width());
1138 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
1139 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1140 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1141 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1154 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1156 EXPECT_EQ(64, constraints.layoutSize.width());
1157 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
1158 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
1159 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
1160 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1173 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1175 EXPECT_EQ(64, constraints.layoutSize.width());
1176 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
1177 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
1178 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
1179 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1192 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1194 EXPECT_EQ(980, constraints.layoutSize.width());
1195 EXPECT_EQ(1078, constraints.layoutSize.height());
1196 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1197 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1198 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1211 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1213 EXPECT_EQ(320, constraints.layoutSize.width());
1214 EXPECT_EQ(352, constraints.layoutSize.height());
1215 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1216 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1217 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1230 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1232 EXPECT_EQ(3200, constraints.layoutSize.width());
1233 EXPECT_EQ(3520, constraints.layoutSize.height());
1234 EXPECT_NEAR(0.1f, constraints.initialScale, 0.01f);
1235 EXPECT_NEAR(0.1f, constraints.minimumScale, 0.01f);
1236 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1249 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1251 EXPECT_EQ(320, constraints.layoutSize.width());
1252 EXPECT_EQ(352, constraints.layoutSize.height());
1253 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1254 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1255 EXPECT_NEAR(1.0f, constraints.maximumScale, 0.01f);
1268 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1270 EXPECT_EQ(32, constraints.layoutSize.width());
1271 EXPECT_NEAR(35.2, constraints.layoutSize.height(), 0.01f);
1272 EXPECT_NEAR(10.0f, constraints.initialScale, 0.01f);
1273 EXPECT_NEAR(10.0f, constraints.minimumScale, 0.01f);
1274 EXPECT_NEAR(10.0f, constraints.maximumScale, 0.01f);
1287 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1289 EXPECT_EQ(320, constraints.layoutSize.width());
1290 EXPECT_EQ(352, constraints.layoutSize.height());
1291 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1292 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1293 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1306 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1308 EXPECT_EQ(320, constraints.layoutSize.width());
1309 EXPECT_EQ(352, constraints.layoutSize.height());
1310 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1311 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1312 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1325 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1327 EXPECT_EQ(320, constraints.layoutSize.width());
1328 EXPECT_EQ(352, constraints.layoutSize.height());
1329 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1330 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1331 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1344 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1346 EXPECT_EQ(320, constraints.layoutSize.width());
1347 EXPECT_EQ(352, constraints.layoutSize.height());
1348 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1349 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1350 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1363 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1365 EXPECT_EQ(100, constraints.layoutSize.width());
1366 EXPECT_EQ(110, constraints.layoutSize.height());
1367 EXPECT_NEAR(3.2f, constraints.initialScale, 0.01f);
1368 EXPECT_NEAR(3.2f, constraints.minimumScale, 0.01f);
1369 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1382 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1384 EXPECT_EQ(100, constraints.layoutSize.width());
1385 EXPECT_EQ(110, constraints.layoutSize.height());
1386 EXPECT_NEAR(3.2f, constraints.initialScale, 0.01f);
1387 EXPECT_NEAR(3.2f, constraints.minimumScale, 0.01f);
1388 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1401 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1403 EXPECT_EQ(320, constraints.layoutSize.width());
1404 EXPECT_EQ(352, constraints.layoutSize.height());
1405 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1406 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1407 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1420 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1422 EXPECT_EQ(320, constraints.layoutSize.width());
1423 EXPECT_EQ(352, constraints.layoutSize.height());
1424 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1425 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1426 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1439 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1441 EXPECT_EQ(100, constraints.layoutSize.width());
1442 EXPECT_EQ(110, constraints.layoutSize.height());
1443 EXPECT_NEAR(3.2f, constraints.initialScale, 0.01f);
1444 EXPECT_NEAR(3.2f, constraints.minimumScale, 0.01f);
1445 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1458 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1460 EXPECT_EQ(100, constraints.layoutSize.width());
1461 EXPECT_EQ(110, constraints.layoutSize.height());
1462 EXPECT_NEAR(3.2f, constraints.initialScale, 0.01f);
1463 EXPECT_NEAR(3.2f, constraints.minimumScale, 0.01f);
1464 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1477 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1479 EXPECT_EQ(320, constraints.layoutSize.width());
1480 EXPECT_EQ(352, constraints.layoutSize.height());
1481 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1482 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1483 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1496 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1498 EXPECT_EQ(100, constraints.layoutSize.width());
1499 EXPECT_EQ(110, constraints.layoutSize.height());
1500 EXPECT_NEAR(3.2f, constraints.initialScale, 0.01f);
1501 EXPECT_NEAR(3.2f, constraints.minimumScale, 0.01f);
1502 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1515 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1517 EXPECT_EQ(100, constraints.layoutSize.width());
1518 EXPECT_EQ(110, constraints.layoutSize.height());
1519 EXPECT_NEAR(3.2f, constraints.initialScale, 0.01f);
1520 EXPECT_NEAR(3.2f, constraints.minimumScale, 0.01f);
1521 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1534 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1536 EXPECT_EQ(100, constraints.layoutSize.width());
1537 EXPECT_EQ(110, constraints.layoutSize.height());
1538 EXPECT_NEAR(3.2f, constraints.initialScale, 0.01f);
1539 EXPECT_NEAR(3.2f, constraints.minimumScale, 0.01f);
1540 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1553 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1555 EXPECT_EQ(64, constraints.layoutSize.width());
1556 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
1557 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
1558 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
1559 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1572 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1574 EXPECT_EQ(32, constraints.layoutSize.width());
1575 EXPECT_NEAR(35.2, constraints.layoutSize.height(), 0.01);
1576 EXPECT_NEAR(10.0f, constraints.initialScale, 0.01f);
1577 EXPECT_NEAR(10.0f, constraints.minimumScale, 0.01f);
1578 EXPECT_NEAR(10.0f, constraints.maximumScale, 0.01f);
1591 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1593 EXPECT_EQ(1280, constraints.layoutSize.width());
1594 EXPECT_EQ(1408, constraints.layoutSize.height());
1595 EXPECT_NEAR(0.25f, constraints.initialScale, 0.01f);
1596 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
1597 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1610 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1612 EXPECT_EQ(100, constraints.layoutSize.width());
1613 EXPECT_EQ(110, constraints.layoutSize.height());
1614 EXPECT_NEAR(3.2f, constraints.initialScale, 0.01f);
1615 EXPECT_NEAR(3.2f, constraints.minimumScale, 0.01f);
1616 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1629 PageScaleConstraints constraints
1631 EXPECT_EQ(320, constraints.layoutSize.width());
1632 EXPECT_EQ(352, constraints.layoutSize.height());
1633 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1634 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1635 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1648 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1650 EXPECT_EQ(320, constraints.layoutSize.width());
1651 EXPECT_EQ(352, constraints.layoutSize.height());
1652 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
1653 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
1654 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1667 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1669 EXPECT_EQ(3000, constraints.layoutSize.width());
1670 EXPECT_EQ(3300, constraints.layoutSize.height());
1671 EXPECT_NEAR(0.25f, constraints.initialScale, 0.01f);
1672 EXPECT_NEAR(0.25f, constraints.minimumScale, 0.01f);
1673 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1686 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1688 EXPECT_EQ(400, constraints.layoutSize.width());
1689 EXPECT_EQ(440, constraints.layoutSize.height());
1690 EXPECT_NEAR(0.8f, constraints.initialScale, 0.01f);
1691 EXPECT_NEAR(0.8f, constraints.minimumScale, 0.01f);
1692 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1705 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1707 EXPECT_EQ(64, constraints.layoutSize.width());
1708 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
1709 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
1710 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
1711 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1724 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1726 EXPECT_EQ(64, constraints.layoutSize.width());
1727 EXPECT_EQ(480, constraints.layoutSize.height());
1728 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
1729 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
1730 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1743 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1745 EXPECT_EQ(540, constraints.layoutSize.width());
1746 EXPECT_EQ(594, constraints.layoutSize.height());
1747 EXPECT_NEAR(0.59f, constraints.initialScale, 0.01f);
1748 EXPECT_NEAR(0.59f, constraints.minimumScale, 0.01f);
1749 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1762 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1764 EXPECT_NEAR(457.14, constraints.layoutSize.width(), 0.01f);
1765 EXPECT_NEAR(502.86, constraints.layoutSize.height(), 0.01f);
1766 EXPECT_NEAR(0.7f, constraints.initialScale, 0.01f);
1767 EXPECT_NEAR(0.7f, constraints.minimumScale, 0.01f);
1768 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1781 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1783 EXPECT_EQ(64, constraints.layoutSize.width());
1784 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
1785 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
1786 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
1787 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1800 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1802 EXPECT_EQ(980, constraints.layoutSize.width());
1803 EXPECT_EQ(1078, constraints.layoutSize.height());
1804 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1805 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1806 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1819 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1821 EXPECT_EQ(700, constraints.layoutSize.width());
1822 EXPECT_EQ(770, constraints.layoutSize.height());
1823 EXPECT_NEAR(0.5f, constraints.initialScale, 0.01f);
1824 EXPECT_NEAR(0.46f, constraints.minimumScale, 0.01f);
1825 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1838 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1840 EXPECT_EQ(400, constraints.layoutSize.width());
1841 EXPECT_EQ(440, constraints.layoutSize.height());
1842 EXPECT_NEAR(0.8f, constraints.initialScale, 0.01f);
1843 EXPECT_NEAR(0.8f, constraints.minimumScale, 0.01f);
1844 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1857 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1859 EXPECT_EQ(400, constraints.layoutSize.width());
1860 EXPECT_EQ(440, constraints.layoutSize.height());
1861 EXPECT_NEAR(0.8f, constraints.initialScale, 0.01f);
1862 EXPECT_NEAR(0.8f, constraints.minimumScale, 0.01f);
1863 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1876 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1878 EXPECT_EQ(400, constraints.layoutSize.width());
1879 EXPECT_EQ(440, constraints.layoutSize.height());
1880 EXPECT_NEAR(0.8f, constraints.initialScale, 0.01f);
1881 EXPECT_NEAR(0.8f, constraints.minimumScale, 0.01f);
1882 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1895 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1897 EXPECT_EQ(400, constraints.layoutSize.width());
1898 EXPECT_EQ(440, constraints.layoutSize.height());
1899 EXPECT_NEAR(0.8f, constraints.initialScale, 0.01f);
1900 EXPECT_NEAR(0.8f, constraints.minimumScale, 0.01f);
1901 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1914 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1916 EXPECT_EQ(980, constraints.layoutSize.width());
1917 EXPECT_EQ(1078, constraints.layoutSize.height());
1918 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1919 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1920 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1933 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1935 EXPECT_EQ(980, constraints.layoutSize.width());
1936 EXPECT_EQ(1078, constraints.layoutSize.height());
1937 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1938 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1939 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1952 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1954 EXPECT_EQ(980, constraints.layoutSize.width());
1955 EXPECT_EQ(1078, constraints.layoutSize.height());
1956 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1957 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1958 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1971 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1973 EXPECT_EQ(980, constraints.layoutSize.width());
1974 EXPECT_EQ(1078, constraints.layoutSize.height());
1975 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1976 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1977 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
1990 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
1992 EXPECT_EQ(980, constraints.layoutSize.width());
1993 EXPECT_EQ(1078, constraints.layoutSize.height());
1994 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
1995 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
1996 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2009 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2011 EXPECT_EQ(980, constraints.layoutSize.width());
2012 EXPECT_EQ(1078, constraints.layoutSize.height());
2013 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
2014 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
2015 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2028 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2030 EXPECT_EQ(980, constraints.layoutSize.width());
2031 EXPECT_EQ(1078, constraints.layoutSize.height());
2032 constraints.initialScale, 0.01f);
2033 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
2034 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2047 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2049 EXPECT_EQ(980, constraints.layoutSize.width());
2050 EXPECT_EQ(1078, constraints.layoutSize.height());
2051 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
2052 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
2053 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2066 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2068 EXPECT_EQ(400, constraints.layoutSize.width());
2069 EXPECT_EQ(440, constraints.layoutSize.height());
2070 EXPECT_NEAR(0.8f, constraints.initialScale, 0.01f);
2071 EXPECT_NEAR(0.8f, constraints.minimumScale, 0.01f);
2072 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2085 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2087 EXPECT_EQ(980, constraints.layoutSize.width());
2088 EXPECT_EQ(1078, constraints.layoutSize.height());
2089 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
2090 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
2091 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2104 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2106 EXPECT_EQ(980, constraints.layoutSize.width());
2107 EXPECT_EQ(1078, constraints.layoutSize.height());
2108 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
2109 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
2110 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2123 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2125 EXPECT_EQ(400, constraints.layoutSize.width());
2126 EXPECT_EQ(440, constraints.layoutSize.height());
2127 EXPECT_NEAR(0.8f, constraints.initialScale, 0.01f);
2128 EXPECT_NEAR(0.8f, constraints.minimumScale, 0.01f);
2129 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2142 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2144 EXPECT_EQ(400, constraints.layoutSize.width());
2145 EXPECT_EQ(440, constraints.layoutSize.height());
2146 EXPECT_NEAR(0.8f, constraints.initialScale, 0.01f);
2147 EXPECT_NEAR(0.8f, constraints.minimumScale, 0.01f);
2148 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2161 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2163 EXPECT_EQ(980, constraints.layoutSize.width());
2164 EXPECT_EQ(400, constraints.layoutSize.height());
2165 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
2166 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
2167 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2180 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2182 EXPECT_EQ(320, constraints.layoutSize.width());
2183 EXPECT_EQ(352, constraints.layoutSize.height());
2184 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2185 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2186 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2199 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2201 EXPECT_EQ(320, constraints.layoutSize.width());
2202 EXPECT_EQ(352, constraints.layoutSize.height());
2203 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2204 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2205 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2218 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2220 EXPECT_EQ(320, constraints.layoutSize.width());
2221 EXPECT_EQ(352, constraints.layoutSize.height());
2222 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2223 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2224 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2237 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2239 EXPECT_EQ(64, constraints.layoutSize.width());
2240 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
2241 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
2242 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
2243 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2256 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2258 EXPECT_EQ(64, constraints.layoutSize.width());
2259 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
2260 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
2261 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
2262 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2275 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2277 EXPECT_EQ(320, constraints.layoutSize.width());
2278 EXPECT_EQ(352, constraints.layoutSize.height());
2279 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2280 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2281 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2294 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2296 EXPECT_EQ(320, constraints.layoutSize.width());
2297 EXPECT_EQ(352, constraints.layoutSize.height());
2298 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2299 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2300 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2313 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2315 EXPECT_EQ(64, constraints.layoutSize.width());
2316 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
2317 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
2318 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
2319 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2332 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2334 EXPECT_EQ(64, constraints.layoutSize.width());
2335 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
2336 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
2337 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
2338 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2351 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2353 EXPECT_EQ(64, constraints.layoutSize.width());
2354 EXPECT_NEAR(70.4, constraints.layoutSize.height(), 0.01f);
2355 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
2356 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
2357 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2370 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2372 EXPECT_EQ(123, constraints.layoutSize.width());
2373 EXPECT_NEAR(135.3, constraints.layoutSize.height(), 0.01f);
2374 EXPECT_NEAR(2.60f, constraints.initialScale, 0.01f);
2375 EXPECT_NEAR(2.60f, constraints.minimumScale, 0.01f);
2376 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2389 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2391 EXPECT_EQ(320, constraints.layoutSize.width());
2392 EXPECT_EQ(352, constraints.layoutSize.height());
2393 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2394 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2395 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2408 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2410 EXPECT_EQ(320, constraints.layoutSize.width());
2411 EXPECT_EQ(352, constraints.layoutSize.height());
2412 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2413 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2414 EXPECT_NEAR(1.0f, constraints.maximumScale, 0.01f);
2427 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2429 EXPECT_EQ(320, constraints.layoutSize.width());
2430 EXPECT_EQ(352, constraints.layoutSize.height());
2431 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2432 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2433 constraints.maximumScale, 0.01f);
2446 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2448 EXPECT_EQ(980, constraints.layoutSize.width());
2449 EXPECT_EQ(1078, constraints.layoutSize.height());
2450 EXPECT_NEAR(10.0f, constraints.initialScale, 0.01f);
2451 EXPECT_NEAR(10.0f, constraints.minimumScale, 0.01f);
2452 EXPECT_NEAR(10.0f, constraints.maximumScale, 0.01f);
2465 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2467 EXPECT_EQ(160, constraints.layoutSize.width());
2468 EXPECT_EQ(176, constraints.layoutSize.height());
2469 EXPECT_NEAR(2.0f, constraints.initialScale, 0.01f);
2470 EXPECT_NEAR(2.0f, constraints.minimumScale, 0.01f);
2471 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2484 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2486 EXPECT_EQ(980, constraints.layoutSize.width());
2487 EXPECT_EQ(1078, constraints.layoutSize.height());
2488 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
2489 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
2490 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2503 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2505 EXPECT_EQ(320, constraints.layoutSize.width());
2506 EXPECT_EQ(352, constraints.layoutSize.height());
2507 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2508 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2509 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2522 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2524 EXPECT_EQ(980, constraints.layoutSize.width());
2525 EXPECT_EQ(1078, constraints.layoutSize.height());
2526 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
2527 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
2528 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2540 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2542 EXPECT_NEAR(123.0f, constraints.layoutSize.width(), 0.01);
2543 EXPECT_NEAR(135.3f, constraints.layoutSize.height(), 0.01);
2544 EXPECT_NEAR(2.60f, constraints.initialScale, 0.01f);
2545 EXPECT_NEAR(2.60f, constraints.minimumScale, 0.01f);
2546 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2559 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2561 EXPECT_EQ(320, constraints.layoutSize.width());
2562 EXPECT_EQ(352, constraints.layoutSize.height());
2563 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2564 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2565 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2586 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2588 EXPECT_EQ(640, constraints.layoutSize.width());
2589 EXPECT_EQ(704, constraints.layoutSize.height());
2590 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2591 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2592 EXPECT_NEAR(1.0f, constraints.maximumScale, 0.01f);
2608 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2610 EXPECT_EQ(500, constraints.layoutSize.width());
2611 EXPECT_EQ(550, constraints.layoutSize.height());
2612 EXPECT_NEAR(2.0f, constraints.initialScale, 0.01f);
2613 EXPECT_NEAR(2.0f, constraints.minimumScale, 0.01f);
2614 EXPECT_NEAR(2.0f, constraints.maximumScale, 0.01f);
2628 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2630 EXPECT_EQ(320, constraints.layoutSize.width());
2631 EXPECT_EQ(352, constraints.layoutSize.height());
2632 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2633 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2634 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2648 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2650 EXPECT_EQ(320, constraints.layoutSize.width());
2651 EXPECT_EQ(352, constraints.layoutSize.height());
2652 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2653 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2654 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2668 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2670 EXPECT_EQ(320, constraints.layoutSize.width());
2671 EXPECT_EQ(352, constraints.layoutSize.height());
2672 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2673 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2674 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2688 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2690 EXPECT_EQ(300, constraints.layoutSize.width());
2691 EXPECT_EQ(330, constraints.layoutSize.height());
2692 EXPECT_NEAR(1.07f, constraints.initialScale, 0.01f);
2693 EXPECT_NEAR(1.07f, constraints.minimumScale, 0.01f);
2694 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2708 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2710 EXPECT_EQ(300, constraints.layoutSize.width());
2711 EXPECT_EQ(330, constraints.layoutSize.height());
2712 EXPECT_NEAR(1.07f, constraints.initialScale, 0.01f);
2713 EXPECT_NEAR(1.07f, constraints.minimumScale, 0.01f);
2714 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2728 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2730 EXPECT_EQ(300, constraints.layoutSize.width());
2731 EXPECT_EQ(330, constraints.layoutSize.height());
2732 EXPECT_NEAR(1.07f, constraints.initialScale, 0.01f);
2733 EXPECT_NEAR(1.07f, constraints.minimumScale, 0.01f);
2734 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2748 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2750 EXPECT_EQ(320, constraints.layoutSize.width());
2751 EXPECT_EQ(352, constraints.layoutSize.height());
2752 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2753 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2754 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2768 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2770 EXPECT_EQ(320, constraints.layoutSize.width());
2771 EXPECT_EQ(352, constraints.layoutSize.height());
2772 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2773 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2774 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2788 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2790 EXPECT_EQ(300, constraints.layoutSize.width());
2791 EXPECT_EQ(330, constraints.layoutSize.height());
2792 EXPECT_NEAR(1.07f, constraints.initialScale, 0.01f);
2793 EXPECT_NEAR(1.07f, constraints.minimumScale, 0.01f);
2794 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2808 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2810 EXPECT_EQ(300, constraints.layoutSize.width());
2811 EXPECT_EQ(330, constraints.layoutSize.height());
2812 EXPECT_NEAR(1.07f, constraints.initialScale, 0.01f);
2813 EXPECT_NEAR(1.07f, constraints.minimumScale, 0.01f);
2814 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2827 PageScaleConstraints constraints = runViewportTest(page, 800, 600);
2829 EXPECT_EQ(5000, constraints
2841 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2843 EXPECT_EQ(320, constraints.layoutSize.width());
2844 EXPECT_EQ(352, constraints.layoutSize.height());
2845 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2846 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2847 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2860 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2862 EXPECT_EQ(640, constraints.layoutSize.width());
2863 EXPECT_EQ(704, constraints.layoutSize.height());
2864 EXPECT_NEAR(0.5f, constraints.initialScale, 0.01f);
2865 EXPECT_NEAR(0.5f, constraints.minimumScale, 0.01f);
2866 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2879 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2881 EXPECT_EQ(640, constraints.layoutSize.width());
2882 EXPECT_EQ(704, constraints.layoutSize.height());
2883 EXPECT_NEAR(0.5f, constraints.initialScale, 0.01f);
2884 EXPECT_NEAR(0.5f, constraints.minimumScale, 0.01f);
2885 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2897 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
2899 EXPECT_EQ(320, constraints.layoutSize.width());
2900 EXPECT_EQ(352, constraints.layoutSize.height());
2901 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2902 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2903 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2910 constraints = runViewportTest(page, 320, 352);
2912 EXPECT_EQ(320, constraints.layoutSize.width());
2913 EXPECT_EQ(352, constraints.layoutSize.height());
2914 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2915 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2916 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
2922 constraints = runViewportTest(page, 320, 352);
2924 EXPECT_EQ(320, constraints.layoutSize.width());
2925 EXPECT_EQ(352, constraints.layoutSize.height());
2926 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
2927 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
2928 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
3056 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
3060 EXPECT_EQ(320, constraints.layoutSize.width());
3061 EXPECT_EQ(352, constraints.layoutSize.height());
3062 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
3063 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
3064 EXPECT_NEAR(2.0f, constraints.maximumScale, 0.01f);
3078 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
3084 EXPECT_EQ(980, constraints.layoutSize.width());
3085 EXPECT_EQ(1078, constraints.layoutSize.height());
3086 EXPECT_NEAR(0.33f, constraints.initialScale, 0.01f);
3087 EXPECT_NEAR(0.33f, constraints.minimumScale, 0.01f);
3088 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
3102 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
3109 EXPECT_NEAR(64.0f, constraints.layoutSize.width(), 0.01);
3110 EXPECT_NEAR(70.4f, constraints.layoutSize.height(), 0.01);
3111 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
3112 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
3113 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
3127 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
3134 EXPECT_NEAR(123.0f, constraints.layoutSize.width(), 0.01);
3135 EXPECT_NEAR(135.3f, constraints.layoutSize.height(), 0.01);
3136 EXPECT_NEAR(2.60f, constraints.initialScale, 0.01f);
3137 EXPECT_NEAR(2.60f, constraints.minimumScale, 0.01f);
3138 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
3152 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
3176 EXPECT_NEAR(320.0f, constraints.layoutSize.width(), 0.01);
3177 EXPECT_NEAR(352.0f, constraints.layoutSize.height(), 0.01);
3178 EXPECT_NEAR(1.0f, constraints.initialScale, 0.01f);
3179 EXPECT_NEAR(1.0f, constraints.minimumScale, 0.01f);
3180 EXPECT_NEAR(1.0f, constraints.maximumScale, 0.01f);
3194 PageScaleConstraints constraints = runViewportTest(page, 320, 352);
3201 EXPECT_NEAR(64.0f, constraints.layoutSize.width(), 0.01);
3202 EXPECT_NEAR(70.4f, constraints.layoutSize.height(), 0.01);
3203 EXPECT_NEAR(5.0f, constraints.initialScale, 0.01f);
3204 EXPECT_NEAR(5.0f, constraints.minimumScale, 0.01f);
3205 EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);