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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 2465743002: Trybot test for losing style (Closed)
Patch Set: 12.9 14:25 Created 4 years 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 | « third_party/WebKit/Source/core/events/TextEventInputType.h ('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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 m_webViewHelper.initializeAndLoad(m_baseURL + "form_with_input.html"); 1275 m_webViewHelper.initializeAndLoad(m_baseURL + "form_with_input.html");
1276 webView->resize(WebSize(800, 600)); 1276 webView->resize(WebSize(800, 600));
1277 webView->setInitialFocus(false); 1277 webView->setInitialFocus(false);
1278 EXPECT_EQ(0, webView->mainFrame()->getScrollOffset().width); 1278 EXPECT_EQ(0, webView->mainFrame()->getScrollOffset().width);
1279 EXPECT_EQ(0, webView->mainFrame()->getScrollOffset().height); 1279 EXPECT_EQ(0, webView->mainFrame()->getScrollOffset().height);
1280 1280
1281 // Set up a composition from existing text that needs to be committed. 1281 // Set up a composition from existing text that needs to be committed.
1282 Vector<CompositionUnderline> emptyUnderlines; 1282 Vector<CompositionUnderline> emptyUnderlines;
1283 WebLocalFrameImpl* frame = webView->mainFrameImpl(); 1283 WebLocalFrameImpl* frame = webView->mainFrameImpl();
1284 frame->frame()->inputMethodController().setCompositionFromExistingText( 1284 frame->frame()->inputMethodController().setCompositionFromExistingText(
1285 emptyUnderlines, 3, 3); 1285 emptyUnderlines, 0, 3);
1286 1286
1287 // Scroll the input field out of the viewport. 1287 // Scroll the input field out of the viewport.
1288 Element* element = static_cast<Element*>( 1288 Element* element = static_cast<Element*>(
1289 webView->mainFrame()->document().getElementById("btn")); 1289 webView->mainFrame()->document().getElementById("btn"));
1290 element->scrollIntoView(); 1290 element->scrollIntoView();
1291 float offsetHeight = webView->mainFrame()->getScrollOffset().height; 1291 float offsetHeight = webView->mainFrame()->getScrollOffset().height;
1292 EXPECT_EQ(0, webView->mainFrame()->getScrollOffset().width); 1292 EXPECT_EQ(0, webView->mainFrame()->getScrollOffset().width);
1293 EXPECT_LT(0, offsetHeight); 1293 EXPECT_LT(0, offsetHeight);
1294 1294
1295 WebTextInputInfo info = webView->textInputInfo(); 1295 WebTextInputInfo info = webView->textInputInfo();
(...skipping 3064 matching lines...) Expand 10 before | Expand all | Expand 10 after
4360 .translate(50, 55) 4360 .translate(50, 55)
4361 .scale(1. / 2.f); 4361 .scale(1. / 2.f);
4362 EXPECT_EQ(expectedMatrix, 4362 EXPECT_EQ(expectedMatrix,
4363 webViewImpl->getDeviceEmulationTransformForTesting()); 4363 webViewImpl->getDeviceEmulationTransformForTesting());
4364 // visibleContentRect doesn't change. 4364 // visibleContentRect doesn't change.
4365 EXPECT_EQ(IntRect(50, 55, 50, 75), 4365 EXPECT_EQ(IntRect(50, 55, 50, 75),
4366 *devToolsEmulator->visibleContentRectForPainting()); 4366 *devToolsEmulator->visibleContentRectForPainting());
4367 } 4367 }
4368 4368
4369 } // namespace blink 4369 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/TextEventInputType.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698