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

Unified Diff: Source/web/tests/WebFrameTest.cpp

Issue 476463002: Fix for plugin printing regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Wed 08/13/2014 15:15:15.97 Created 6 years, 4 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
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 3abbb4a22f3d29d0fea37708f7660afa936d7304..c9ad06be9c35c6ccb2b4e31eb565864b3fc21515 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -82,6 +82,7 @@
#include "public/web/WebFormElement.h"
#include "public/web/WebFrameClient.h"
#include "public/web/WebHistoryItem.h"
+#include "public/web/WebPrintParams.h"
#include "public/web/WebRange.h"
#include "public/web/WebRemoteFrame.h"
#include "public/web/WebScriptSource.h"
@@ -5801,6 +5802,22 @@ TEST_F(WebFrameTest, NodeImageTestFloatLeft)
nodeImageTestValidation(blink::IntSize(40, 40), dragImage.get());
}
+TEST_F(WebFrameTest, PrintingBasic)
+{
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ webViewHelper.initializeAndLoad("data:text/html,Hello, world.");
+
+ WebFrame* frame = webViewHelper.webView()->mainFrame();
+
+ WebPrintParams printParams;
+ printParams.printContentArea.width = 500;
+ printParams.printContentArea.height = 500;
+
+ int pageCount = frame->printBegin(printParams);
+ EXPECT_EQ(1, pageCount);
+ frame->printEnd();
+}
+
class ThemeColorTestWebFrameClient : public FrameTestHelpers::TestWebFrameClient {
public:
ThemeColorTestWebFrameClient()
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698