Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(603)

Side by Side Diff: Source/web/tests/WebFrameTest.cpp

Issue 175253002: Switch to HarfBuzz on Mac and remove CoreText shaper (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fighting trunk TestExpectation changes Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/tests/PinchViewportTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2858 matching lines...) Expand 10 before | Expand all | Expand 10 after
2869 WebRect rect, caret; 2869 WebRect rect, caret;
2870 webViewHelper.webViewImpl()->selectionBounds(caret, rect); 2870 webViewHelper.webViewImpl()->selectionBounds(caret, rect);
2871 2871
2872 float scale; 2872 float scale;
2873 IntPoint scroll; 2873 IntPoint scroll;
2874 bool needAnimation; 2874 bool needAnimation;
2875 webViewHelper.webViewImpl()->computeScaleAndScrollForFocusedNode(webViewHelp er.webViewImpl()->focusedElement(), scale, scroll, needAnimation); 2875 webViewHelper.webViewImpl()->computeScaleAndScrollForFocusedNode(webViewHelp er.webViewImpl()->focusedElement(), scale, scroll, needAnimation);
2876 EXPECT_TRUE(needAnimation); 2876 EXPECT_TRUE(needAnimation);
2877 // The edit box should be left aligned with a margin for possible label. 2877 // The edit box should be left aligned with a margin for possible label.
2878 int hScroll = editBoxWithText.x - leftBoxRatio * viewportWidth / scale; 2878 int hScroll = editBoxWithText.x - leftBoxRatio * viewportWidth / scale;
2879 EXPECT_NEAR(hScroll, scroll.x(), 1); 2879 EXPECT_NEAR(hScroll, scroll.x(), 5);
2880 int vScroll = editBoxWithText.y - (viewportHeight / scale - editBoxWithText. height) / 2; 2880 int vScroll = editBoxWithText.y - (viewportHeight / scale - editBoxWithText. height) / 2;
2881 EXPECT_NEAR(vScroll, scroll.y(), 1); 2881 EXPECT_NEAR(vScroll, scroll.y(), 1);
2882 EXPECT_NEAR(minReadableCaretHeight / caret.height, scale, 0.1); 2882 EXPECT_NEAR(minReadableCaretHeight / caret.height, scale, 0.1);
2883 2883
2884 // The edit box is wider than the viewport when legible. 2884 // The edit box is wider than the viewport when legible.
2885 viewportWidth = 200; 2885 viewportWidth = 200;
2886 viewportHeight = 150; 2886 viewportHeight = 150;
2887 webViewHelper.webView()->resize(WebSize(viewportWidth, viewportHeight)); 2887 webViewHelper.webView()->resize(WebSize(viewportWidth, viewportHeight));
2888 setScaleAndScrollAndLayout(webViewHelper.webView(), WebPoint(0, 0), 1); 2888 setScaleAndScrollAndLayout(webViewHelper.webView(), WebPoint(0, 0), 1);
2889 webViewHelper.webViewImpl()->selectionBounds(caret, rect); 2889 webViewHelper.webViewImpl()->selectionBounds(caret, rect);
(...skipping 3739 matching lines...) Expand 10 before | Expand all | Expand 10 after
6629 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6629 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6630 6630
6631 // Neither should a page reload. 6631 // Neither should a page reload.
6632 localFrame->reload(); 6632 localFrame->reload();
6633 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6633 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6634 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6634 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6635 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6635 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6636 } 6636 }
6637 6637
6638 } // namespace 6638 } // namespace
OLDNEW
« no previous file with comments | « Source/web/tests/PinchViewportTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698