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

Unified Diff: third_party/WebKit/Source/core/html/ImageDocumentTest.cpp

Issue 2646663002: [Blink] Don't center images in Android WebViews (Closed)
Patch Set: [Blink] Don't center images in Android WebViews Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/ImageDocumentTest.cpp
diff --git a/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp b/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp
index 28b344e0616a10e82a6a15261ac6fd75f78d441b..82e46a0a0e7e74549d8c6d4c618ed998c59d783d 100644
--- a/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp
+++ b/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp
@@ -182,4 +182,16 @@ TEST_F(ImageDocumentTest, ImageScalesDownWithDsf) {
EXPECT_EQ(10, imageHeight());
}
+TEST_F(ImageDocumentTest, ImagePositionedCorrectly) {
+ createDocument(80, 70);
+
+ if (document().shouldShrinkToFit()) {
aelias_OOO_until_Jul13 2017/01/19 04:08:22 This test can never go red, even without your chan
gone 2017/01/19 18:56:29 Yeah, I was conking out last night before I could
+ EXPECT_EQ(15, document().imageElement()->offsetLeft());
+ EXPECT_EQ(10, document().imageElement()->offsetTop());
+ } else {
+ EXPECT_EQ(0, document().imageElement()->offsetLeft());
+ EXPECT_EQ(0, document().imageElement()->offsetTop());
+ }
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698