DescriptionFix the tv.b.ui.createSelector() call in record_selection_dialog.html.
Previously, I use tv.b.ui.createSelector(this, this.tracingRecordMode,..) which
is non sense as the second parameter is supposed to be the targe property of |this|.
I only discover this bug when actually trying to build chromium with the previous
patch (https://codereview.appspot.com/221780043/). The error stack is:
TypeError: Cannot read property 'selectedValue' of undefined
at HTMLDivElement.tracingRecordMode (chrome://tracing/tracing.js:14006:41)
at HTMLDivElement.RecordSelectionDialog.decorate (chrome://tracing/tracing.js:13951:21)
at HTMLDivElement.f.decorate (chrome://tracing/tracing.js:13187:19)
at HTMLDivElement.f (chrome://tracing/tracing.js:13177:18)
at showTracingDialog (chrome://tracing/tracing.js:14476:22)
This is because when this.tracingRecordMode is evaluated,
this.tracingRecorModeSltr_ is not yet defined.
The reason that no unittest was able to catch the bug was because all existing
tests in record_selection_dialog_test have the non empty value of
record_selection_dialog_preset.
In this patch, I add a new test that tests RecordSelectionDialog's creation when
there is no record_selection_dialog_preset. With this test, the previous patch
fails, and pass after applying new changes in this test.
BUG=https://github.com/google/trace-viewer/issues/842
R=nduca@chromium.org
Committed: https://chromium.googlesource.com/external/trace-viewer/+/9a6f511c6724881f9055d662c1a473daa52f1b00
Patch Set 1 : #
MessagesTotal messages: 3
|