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

Issue 2496203003: Add printing tests to ensure window.print() works for subframes.

Created:
4 years, 1 month ago by Lei Zhang
Modified:
4 years, 1 month ago
Reviewers:
nasko
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add printing tests to ensure window.print() works for subframes. BUG=631513 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Patch Set 1 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -13 lines) Patch
M chrome/browser/printing/print_view_manager.h View 4 chunks +20 lines, -3 lines 0 comments Download
M chrome/browser/printing/print_view_manager.cc View 4 chunks +15 lines, -5 lines 0 comments Download
A chrome/browser/printing/print_view_manager_browsertest.cc View 1 chunk +130 lines, -0 lines 4 comments Download
M chrome/test/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/iframe_cross_site_print.html View 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/printing/window_print.html View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 3 chunks +5 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/render_frame_host.h View 2 chunks +2 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 10 (7 generated)
Lei Zhang
Follow up to https://codereview.chromium.org/2426503002 to add a full browser test. The content/ changes can be ...
4 years, 1 month ago (2016-11-15 03:12:57 UTC) #5
Lei Zhang
Don't forget the test.
4 years, 1 month ago (2016-11-18 07:30:32 UTC) #9
nasko
4 years, 1 month ago (2016-11-18 19:19:42 UTC) #10
https://codereview.chromium.org/2496203003/diff/20001/chrome/browser/printing...
File chrome/browser/printing/print_view_manager_browsertest.cc (right):

https://codereview.chromium.org/2496203003/diff/20001/chrome/browser/printing...
chrome/browser/printing/print_view_manager_browsertest.cc:109:
IN_PROC_BROWSER_TEST_F(PrintViewManagerTest, SubframeWindowDotPrint) {
Put a small comment describing what this test is aiming to verify. If I get it
correctly, it only verifies that the scripted print was received through the
RenderFrameHost IPC, right?

https://codereview.chromium.org/2496203003/diff/20001/chrome/browser/printing...
chrome/browser/printing/print_view_manager_browsertest.cc:110: {
Why have this nested scope when it includes all the code?

https://codereview.chromium.org/2496203003/diff/20001/chrome/browser/printing...
chrome/browser/printing/print_view_manager_browsertest.cc:123:
embedded_test_server()->port());
You can just call embedded_test_server()->GetURL("c.com",
"/printing/window_print.html"); I've added it to embedded_test_server to avoid
this specific code pattern, as it is less readable.

https://codereview.chromium.org/2496203003/diff/20001/chrome/browser/printing...
chrome/browser/printing/print_view_manager_browsertest.cc:126:
requests[0].render_frame_host));
Why not check that the specific RenderFrameHost is the expected one? You could
get all frames from WebContents and pick the one with the name you've given in
the HTML file.

Powered by Google App Engine
This is Rietveld 408576698