Stop printer edit dialog from saving details when cancelled
- Add new Object property, pendingPrinter_, to cups_edit_printer_dialog. This object serves as a copy of activePrinter and is used as the main property for changes in edit printers dialog. - Previously, activePrinter was being directly edited in the edit printer dialog. This resulted in activePrinter's property values to change even if the user clicks on the cancel button. The new pendingPrinter_ object fixes this by making a copy of activePrinter and only modifying activePrinter when the user clicks on the save button. - Edit BrowserTests to reflect this change. Bug: 893986 Test: End to End, BrowserTest/gtest_filter=CrSettingsPrinting* Change-Id: Ia015fcda1e53dc8848556365d49c215492418d40 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1490378 Commit-Queue: Bailey Berro <baileyberro@chromium.org> Reviewed-by:Bailey Berro <baileyberro@chromium.org> Reviewed-by:
Steven Bennetts <stevenjb@chromium.org> Cr-Commit-Position: refs/heads/master@{#649146}
Showing
Please register or sign in to comment