|
|
Chromium Code Reviews|
Created:
3 years, 9 months ago by tommycli Modified:
3 years, 9 months ago Reviewers:
dpapad CC:
arv+watch_chromium.org, chromium-reviews, dbeam+watch-settings_chromium.org, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, stevenjb+watch-md-settings_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionMD Settings: Fix About page exception with Advanced lazy loading
There was an Advanced-specific MainPageBehavior update in MD Settings
to support Advanced lazy loading. However, this causes an exception
when applied to the About page. This CL fixes that.
BUG=703041
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2773813004
Cr-Commit-Position: refs/heads/master@{#459552}
Committed: https://chromium.googlesource.com/chromium/src/+/9b6d55f0ed8c8b75dbbad2204fef299f4ffa2e21
Patch Set 1 #
Total comments: 2
Patch Set 2 : reorder #
Dependent Patchsets: Messages
Total messages: 18 (12 generated)
Description was changed from ========== MD Settings: Fix About page exception with Advanced lazy loading There was an Advanced-specific MainPageBehavior update in MD Settings to support Advanced lazy loading. However, this causes an exception when applied to the About page. This CL fixes that. BUG=703041 ========== to ========== MD Settings: Fix About page exception with Advanced lazy loading There was an Advanced-specific MainPageBehavior update in MD Settings to support Advanced lazy loading. However, this causes an exception when applied to the About page. This CL fixes that. BUG=703041 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
The CQ bit was checked by tommycli@chromium.org to run a CQ dry run
tommycli@chromium.org changed reviewers: + dpapad@chromium.org
dpapad: PTAL, thanks!
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2773813004/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/settings_page/main_page_behavior.js (right): https://codereview.chromium.org/2773813004/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/settings_page/main_page_behavior.js:153: // The About page also uses this behavior, and doesn't expand Advanced. Ah, I understand now the problem. The code assumes that the only usage of MainPageBehavior is from <settings-basic-page>, but <settings-about-page> also uses it. Can we make the code more explicit as follows (or do you think it is gross)? if (this.tagName == 'SETTINGS-BASIC-PAGE') { // Force the advanced page to be loaded and rendered. promise = this.$$('#advancedPageTemplate').get(); } The advantage of this is that it will NOT silently fail, if for some reason |this| is <settings-basic-page> but the advancedPageTemplate is not found.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by tommycli@chromium.org to run a CQ dry run
dpapad: Thanks! https://codereview.chromium.org/2773813004/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/settings_page/main_page_behavior.js (right): https://codereview.chromium.org/2773813004/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/settings_page/main_page_behavior.js:153: // The About page also uses this behavior, and doesn't expand Advanced. On 2017/03/23 23:09:58, dpapad wrote: > Ah, I understand now the problem. The code assumes that the only usage of > MainPageBehavior is from <settings-basic-page>, but <settings-about-page> also > uses it. Can we make the code more explicit as follows (or do you think it is > gross)? > > if (this.tagName == 'SETTINGS-BASIC-PAGE') { > // Force the advanced page to be loaded and rendered. > promise = this.$$('#advancedPageTemplate').get(); > } > > The advantage of this is that it will NOT silently fail, if for some reason > |this| is <settings-basic-page> but the advancedPageTemplate is not found. Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
The CQ bit was unchecked by tommycli@chromium.org
The CQ bit was checked by tommycli@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 20001, "attempt_start_ts": 1490382884216840,
"parent_rev": "f09c3132dafcb61d0ad6b682468c178dace960eb", "commit_rev":
"9b6d55f0ed8c8b75dbbad2204fef299f4ffa2e21"}
Message was sent while issue was closed.
Description was changed from ========== MD Settings: Fix About page exception with Advanced lazy loading There was an Advanced-specific MainPageBehavior update in MD Settings to support Advanced lazy loading. However, this causes an exception when applied to the About page. This CL fixes that. BUG=703041 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== MD Settings: Fix About page exception with Advanced lazy loading There was an Advanced-specific MainPageBehavior update in MD Settings to support Advanced lazy loading. However, this causes an exception when applied to the About page. This CL fixes that. BUG=703041 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2773813004 Cr-Commit-Position: refs/heads/master@{#459552} Committed: https://chromium.googlesource.com/chromium/src/+/9b6d55f0ed8c8b75dbbad2204fef... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/9b6d55f0ed8c8b75dbbad2204fef... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
