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

Issue 2881213003: Print Preview: Use cr.sendWithPromise for getInitialSettings (Closed)

Created:
3 years, 7 months ago by rbpotter
Modified:
3 years, 7 months ago
Reviewers:
skau, dpapad
CC:
arv+watch_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Print Preview: Use cr.sendWithPromise for getInitialSettings Start replacing some chrome.send calls with cr.sendWithPromise in print preview by using cr.sendWithPromise for the getInitialSettings message. To avoid breaking tests during transition, also: - Change NativeLayerStub in PrintPreviewWebUITests to inherit from settings.TestBrowserProxy. - Change NativeLayer so that it no longer inherits from cr.EventTarget. - Add an EventTarget member to NativeLayer for dispatching and receiving the print preview messages that have not yet been migrated to use cr.sendWithPromise (will be removed when all messages have been changed). BUG=717296 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2881213003 Cr-Commit-Position: refs/heads/master@{#473731} Committed: https://chromium.googlesource.com/chromium/src/+/4adaebf29293acf54c54ac2910f0a3bb2f32683f

Patch Set 1 #

Patch Set 2 : Fix one test using setTimeout #

Patch Set 3 : Fix tests, add event listener in native layer #

Patch Set 4 : Revert extra changes #

Patch Set 5 : Move includes to javascript #

Patch Set 6 : Fix destination tests #

Patch Set 7 : Remove extra code copied from print preview tests #

Total comments: 10

Patch Set 8 : Actually fix destination tests #

Total comments: 12

Patch Set 9 : Address comments #

Patch Set 10 : Fix ChromeOS PrintPreviewWebUI test #

Patch Set 11 : Restore previous response ordering #

Total comments: 10

Patch Set 12 : Address comments #

Total comments: 8

Patch Set 13 : Address comments #

Patch Set 14 : Rebase #

Patch Set 15 : Rebase #

Patch Set 16 : Revert extra change from rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1130 lines, -879 lines) Patch
M chrome/browser/resources/print_preview/cloud_print_interface.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/print_preview/data/destination_store.js View 1 2 1 chunk +10 lines, -9 lines 0 comments Download
M chrome/browser/resources/print_preview/native_layer.js View 1 2 3 4 5 6 7 31 chunks +68 lines, -67 lines 0 comments Download
M chrome/browser/resources/print_preview/preview_generator.js View 1 2 1 chunk +6 lines, -5 lines 0 comments Download
M chrome/browser/resources/print_preview/print_preview.js View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +20 lines, -25 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.cc View 1 2 3 4 5 6 7 3 chunks +12 lines, -5 lines 0 comments Download
M chrome/test/data/webui/print_preview.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 25 chunks +899 lines, -718 lines 0 comments Download
M chrome/test/data/webui/print_preview_destination_search_test.js View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +112 lines, -48 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 70 (53 generated)
dpapad
https://codereview.chromium.org/2881213003/diff/120001/chrome/browser/resources/print_preview/native_layer.js File chrome/browser/resources/print_preview/native_layer.js (right): https://codereview.chromium.org/2881213003/diff/120001/chrome/browser/resources/print_preview/native_layer.js#newcode79 chrome/browser/resources/print_preview/native_layer.js:79: this.eventTarget_ = new cr.EventTarget(); @private {!cr.EventTarget} https://codereview.chromium.org/2881213003/diff/120001/chrome/browser/resources/print_preview/native_layer.js#newcode153 chrome/browser/resources/print_preview/native_layer.js:153: * ...
3 years, 7 months ago (2017-05-17 23:59:13 UTC) #16
rbpotter
https://codereview.chromium.org/2881213003/diff/120001/chrome/browser/resources/print_preview/native_layer.js File chrome/browser/resources/print_preview/native_layer.js (right): https://codereview.chromium.org/2881213003/diff/120001/chrome/browser/resources/print_preview/native_layer.js#newcode79 chrome/browser/resources/print_preview/native_layer.js:79: this.eventTarget_ = new cr.EventTarget(); On 2017/05/17 23:59:12, dpapad wrote: ...
3 years, 7 months ago (2017-05-18 17:56:30 UTC) #19
dpapad
https://codereview.chromium.org/2881213003/diff/140001/chrome/test/data/webui/print_preview.js File chrome/test/data/webui/print_preview.js (right): https://codereview.chromium.org/2881213003/diff/140001/chrome/test/data/webui/print_preview.js#newcode13 chrome/test/data/webui/print_preview.js:13: var printPreview = null; Can this be defined inside ...
3 years, 7 months ago (2017-05-18 19:11:26 UTC) #22
rbpotter
https://codereview.chromium.org/2881213003/diff/140001/chrome/test/data/webui/print_preview.js File chrome/test/data/webui/print_preview.js (right): https://codereview.chromium.org/2881213003/diff/140001/chrome/test/data/webui/print_preview.js#newcode13 chrome/test/data/webui/print_preview.js:13: var printPreview = null; On 2017/05/18 19:11:26, dpapad wrote: ...
3 years, 7 months ago (2017-05-18 23:40:57 UTC) #26
dpapad
https://codereview.chromium.org/2881213003/diff/140001/chrome/test/data/webui/print_preview.js File chrome/test/data/webui/print_preview.js (right): https://codereview.chromium.org/2881213003/diff/140001/chrome/test/data/webui/print_preview.js#newcode161 chrome/test/data/webui/print_preview.js:161: printPreview = new print_preview.PrintPreview(); > Will do this in ...
3 years, 7 months ago (2017-05-19 00:10:19 UTC) #30
rbpotter
+skau@: Please take a look at the changes to print_preview_destination_search_test.js. Since this CL changes NativeLayer ...
3 years, 7 months ago (2017-05-19 01:27:01 UTC) #38
dpapad
Mostly nit comments. Also in the CL description it is implied that all chrome.send() messages ...
3 years, 7 months ago (2017-05-19 02:07:06 UTC) #39
rbpotter
https://codereview.chromium.org/2881213003/diff/280001/chrome/browser/resources/print_preview/print_preview.js File chrome/browser/resources/print_preview/print_preview.js (right): https://codereview.chromium.org/2881213003/diff/280001/chrome/browser/resources/print_preview/print_preview.js#newcode646 chrome/browser/resources/print_preview/print_preview.js:646: 'state: ' + this.uiState_); On 2017/05/19 02:07:06, dpapad wrote: ...
3 years, 7 months ago (2017-05-19 02:25:39 UTC) #43
dpapad
LGTM
3 years, 7 months ago (2017-05-19 17:22:50 UTC) #47
skau
lgtm
3 years, 7 months ago (2017-05-22 17:10:42 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2881213003/320001
3 years, 7 months ago (2017-05-22 17:22:10 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2881213003/320001
3 years, 7 months ago (2017-05-22 18:43:54 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/443991)
3 years, 7 months ago (2017-05-22 18:52:39 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2881213003/360001
3 years, 7 months ago (2017-05-22 19:30:15 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/433346)
3 years, 7 months ago (2017-05-22 21:51:26 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2881213003/360001
3 years, 7 months ago (2017-05-22 22:54:29 UTC) #67
commit-bot: I haz the power
3 years, 7 months ago (2017-05-22 23:00:05 UTC) #70
Message was sent while issue was closed.
Committed patchset #16 (id:360001) as
https://chromium.googlesource.com/chromium/src/+/4adaebf29293acf54c54ac2910f0...

Powered by Google App Engine
This is Rietveld 408576698