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

Issue 23054002: Added basic browser test for window.print() from Chrome apps. (Closed)

Created:
7 years, 4 months ago by dharcourt
Modified:
7 years, 3 months ago
CC:
miket_OOO, chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Added basic browser test for window.print() from Chrome apps. This just tests the success of the call to window.print(). It does not test whether the call leads to a print preview window and ultimately to a printout. It will be extended over time to provide additional coverage of the print functionality. BUG=NONE Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220467 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220542

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : Rebase #

Patch Set 4 : Copyright #

Patch Set 5 : Rebase #

Patch Set 6 : Added print preview auto-cancel to avoid test timeouts #

Total comments: 10

Patch Set 7 : Implemented review suggestions #

Patch Set 8 : Implemented review suggestion to avoid print preview JavaScript changes #

Patch Set 9 : Reverted to public *ForTesting methods #

Patch Set 10 : Trying for Mac also #

Patch Set 11 : Removed unnecessary code that was breaking builds #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -2 lines) Patch
M chrome/browser/apps/app_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_ui.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_ui.cc View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -2 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/print_api/manifest.json View 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/print_api/test.html View 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/print_api/test.js View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
dharcourt
Vitaly, could you review this initial window.print()-for-Chrome-apps browser test when you get a chance? Antony, ...
7 years, 4 months ago (2013-08-13 12:30:09 UTC) #1
asargent_no_longer_on_chrome
lgtm https://codereview.chromium.org/23054002/diff/1/chrome/test/data/extensions/platform_apps/print_api/test.js File chrome/test/data/extensions/platform_apps/print_api/test.js (right): https://codereview.chromium.org/23054002/diff/1/chrome/test/data/extensions/platform_apps/print_api/test.js#newcode9 chrome/test/data/extensions/platform_apps/print_api/test.js:9: chrome.test.notifyPass(); nit: I don't think you need this ...
7 years, 4 months ago (2013-08-13 22:38:54 UTC) #2
dharcourt
https://codereview.chromium.org/23054002/diff/1/chrome/test/data/extensions/platform_apps/print_api/test.js File chrome/test/data/extensions/platform_apps/print_api/test.js (right): https://codereview.chromium.org/23054002/diff/1/chrome/test/data/extensions/platform_apps/print_api/test.js#newcode9 chrome/test/data/extensions/platform_apps/print_api/test.js:9: chrome.test.notifyPass(); Fixed, thanks! I thought I had tried that ...
7 years, 4 months ago (2013-08-13 23:06:30 UTC) #3
Vitaly Buka (NO REVIEWS)
lgtm
7 years, 4 months ago (2013-08-15 03:18:18 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dharcourt@chromium.org/23054002/19001
7 years, 4 months ago (2013-08-19 17:13:16 UTC) #5
commit-bot: I haz the power
Failed to apply patch for chrome/browser/extensions/platform_app_browsertest.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; can't find ...
7 years, 4 months ago (2013-08-19 17:13:22 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dharcourt@chromium.org/23054002/26001
7 years, 4 months ago (2013-08-19 18:22:59 UTC) #7
commit-bot: I haz the power
Failed to apply patch for chrome/browser/extensions/platform_app_browsertest.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; can't find ...
7 years, 4 months ago (2013-08-19 18:23:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dharcourt@chromium.org/23054002/34001
7 years, 4 months ago (2013-08-19 21:51:06 UTC) #9
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=21337
7 years, 4 months ago (2013-08-19 22:00:08 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dharcourt@chromium.org/23054002/50001
7 years, 4 months ago (2013-08-19 22:21:30 UTC) #11
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=161430
7 years, 4 months ago (2013-08-20 01:03:47 UTC) #12
dharcourt
Hi Vitaly, This is a proposal for how to implement these tests with the print ...
7 years, 3 months ago (2013-08-28 00:59:56 UTC) #13
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/23054002/diff/109001/chrome/browser/apps/app_browsertest.cc File chrome/browser/apps/app_browsertest.cc (right): https://codereview.chromium.org/23054002/diff/109001/chrome/browser/apps/app_browsertest.cc#newcode1033 chrome/browser/apps/app_browsertest.cc:1033: #if !defined(GOOGLE_CHROME_BUILD) ifdef could be removed https://codereview.chromium.org/23054002/diff/109001/chrome/browser/apps/app_browsertest.cc#newcode1056 chrome/browser/apps/app_browsertest.cc:1056: ASSERT_TRUE(RunPlatformAppTest("platform_apps/print_api")) ...
7 years, 3 months ago (2013-08-28 01:20:26 UTC) #14
dharcourt
Here's a slightly different alternative that avoid public test methods at the expense of moving ...
7 years, 3 months ago (2013-08-28 23:23:57 UTC) #15
Vitaly Buka (NO REVIEWS)
https://chromiumcodereview.appspot.com/23054002/diff/109001/chrome/browser/ui/webui/print_preview/print_preview_ui.cc File chrome/browser/ui/webui/print_preview/print_preview_ui.cc (right): https://chromiumcodereview.appspot.com/23054002/diff/109001/chrome/browser/ui/webui/print_preview/print_preview_ui.cc#newcode523 chrome/browser/ui/webui/print_preview/print_preview_ui.cc:523: if (AutoCancelForTesting()) { Is possible to avoid js chages ...
7 years, 3 months ago (2013-08-29 00:10:24 UTC) #16
dharcourt
I removed the changes to the print preview JavaScript code, simplifying things. The only remaining ...
7 years, 3 months ago (2013-08-29 04:02:02 UTC) #17
Vitaly Buka (NO REVIEWS)
lgtm Thanks. Regarding FRIEND, i am OK with either approach.
7 years, 3 months ago (2013-08-29 04:41:16 UTC) #18
dharcourt
On 2013/08/29 04:41:16, Vitaly Buka wrote: > lgtm > > Thanks. Regarding FRIEND, i am ...
7 years, 3 months ago (2013-08-29 20:47:33 UTC) #19
Vitaly Buka (NO REVIEWS)
lgtm
7 years, 3 months ago (2013-08-29 20:49:11 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dharcourt@chromium.org/23054002/90009
7 years, 3 months ago (2013-08-29 20:51:28 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dharcourt@chromium.org/23054002/140001
7 years, 3 months ago (2013-08-29 22:01:38 UTC) #22
commit-bot: I haz the power
Change committed as 220467
7 years, 3 months ago (2013-08-30 01:19:37 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dharcourt@chromium.org/23054002/104001
7 years, 3 months ago (2013-08-30 03:29:11 UTC) #24
commit-bot: I haz the power
7 years, 3 months ago (2013-08-30 09:10:34 UTC) #25
Message was sent while issue was closed.
Change committed as 220542

Powered by Google App Engine
This is Rietveld 408576698