Change text_box() function name to GetVisiblePromptField() so
the name make it explicit that the field will only be returned when
it is visible. Also the name will be consistent with the setter's name.
The other two APIs GetInputText() and IsCheckBoxSelected() are ok given
the default value of those invisible fields. This CL adds visibility
checking and tests to make these APIs clearer.
Bug: 1126997
Change-Id: I5d26b5daba0e8955c6491f980ca8ad57d0566176
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2412508
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807265}