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

Issue 8586009: Allow WebUI Tests to use preLoad in HtmlDialogUI. (Closed)

Created:
9 years, 1 month ago by Sheridan Rawlins
Modified:
9 years ago
CC:
chromium-reviews, Paweł Hajdan Jr., David Tseng
Visibility:
Public.

Description

Allow WebUI Tests to use preLoad in HtmlDialogUI. - Refactor JsInjectionReadyObserver to its own header/impl files. - Call JsInjectionReadyObserver::OnJsInjectionReady when the dialog is shown. - Move preamble generation to after the AddLibrary calls & generate setting of preload_* variables rather than passing in browsePreload and browsePrintPreload. - Modify tests that show HtmlDialogUI to show the dialogs using preamble rather than SetUpOnMainThread so AddLibrary & set_preload_* calls precede showing the dialog (so preload is called against the appropriate fixture). R=flackr@chromium.org, jhawkins@chromium.org BUG=104371 TEST=browser_tests --gtest_filter=Hung*.* -AND- CertificateViewerUITest*.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112146

Patch Set 1 #

Patch Set 2 : Added comment to NOTIFICATION_HTML_DIALOG_SHOWN. #

Patch Set 3 : Add conditional set_preload_ info. #

Total comments: 7

Patch Set 4 : Rebase. #

Patch Set 5 : Moved some chrome/test/base files to content/test. #

Patch Set 6 : ifdefs for special header inclusion. #

Patch Set 7 : Revert to patch set 4. #

Total comments: 12

Patch Set 8 : Addressed James' comments. #

Patch Set 9 : Reduce GEN(' ') (indentations) by moving code to .cc and .h file(s). #

Total comments: 10

Patch Set 10 : Address more comments from James. #

Total comments: 8

Patch Set 11 : Address final nits. #

Patch Set 12 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -407 lines) Patch
M chrome/browser/errorpage_browsertest.cc View 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/html_dialog_ui.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/web_ui_browsertest.h View 1 2 3 4 5 6 7 5 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/web_ui_browsertest.cc View 1 2 3 4 5 6 7 3 chunks +12 lines, -15 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +7 lines, -3 lines 0 comments Download
M chrome/common/chrome_notification_types.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M chrome/test/base/js2gtest.js View 1 2 3 4 5 6 7 3 chunks +19 lines, -8 lines 0 comments Download
A chrome/test/base/js_injection_ready_observer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/test/base/test_html_dialog_observer.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -2 lines 0 comments Download
M chrome/test/base/test_html_dialog_observer.cc View 5 6 3 chunks +10 lines, -3 lines 0 comments Download
A + chrome/test/base/test_navigation_observer.h View 5 6 4 chunks +4 lines, -14 lines 0 comments Download
A + chrome/test/base/test_navigation_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +4 lines, -10 lines 0 comments Download
M chrome/test/base/test_tab_strip_model_observer.h View 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/base/test_tab_strip_model_observer.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/test/base/ui_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/webui/async_gen.h View 1 2 3 4 5 6 7 8 9 3 chunks +15 lines, -19 lines 0 comments Download
A chrome/test/data/webui/async_gen.cc View 1 2 3 4 5 6 7 8 9 1 chunk +35 lines, -0 lines 0 comments Download
M chrome/test/data/webui/async_gen.js View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -13 lines 0 comments Download
D chrome/test/data/webui/async_gen-inl.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -57 lines 0 comments Download
M chrome/test/data/webui/certificate_viewer_dialog_test.js View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/test/data/webui/certificate_viewer_ui_test-inl.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/test/data/webui/hung_renderer_dialog_test.js View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h View 2 chunks +5 lines, -6 lines 0 comments Download
A chrome/test/data/webui/print_preview.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/test/data/webui/print_preview.cc View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/test/data/webui/print_preview.js View 1 2 3 4 5 6 7 8 1 chunk +1 line, -15 lines 0 comments Download
M chrome/test/data/webui/test_api.js View 1 chunk +2 lines, -1 line 0 comments Download
D chrome/test/test_navigation_observer.h View 1 chunk +0 lines, -95 lines 0 comments Download
D chrome/test/test_navigation_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -125 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Sheridan Rawlins
The trick here was allowing the dialog to be shown after the AddLibrary and test ...
9 years, 1 month ago (2011-11-17 00:26:30 UTC) #1
Paweł Hajdan Jr.
Drive-by with a testing comment (by someone who has done chrome/test/base and content/test as you ...
9 years, 1 month ago (2011-11-17 09:47:10 UTC) #2
flackr
LGTM otherwise.
9 years, 1 month ago (2011-11-17 14:47:27 UTC) #3
Sheridan Rawlins
http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h File chrome/test/base/test_navigation_observer.h (right): http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h#newcode5 chrome/test/base/test_navigation_observer.h:5: #ifndef CHROME_TEST_BASE_TEST_NAVIGATION_OBSERVER_H_ I don't feel comfortable adding that to ...
9 years, 1 month ago (2011-11-17 16:46:25 UTC) #4
Paweł Hajdan Jr.
http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h File chrome/test/base/test_navigation_observer.h (right): http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h#newcode5 chrome/test/base/test_navigation_observer.h:5: #ifndef CHROME_TEST_BASE_TEST_NAVIGATION_OBSERVER_H_ On 2011/11/17 16:46:25, Sheridan Rawlins wrote: > ...
9 years, 1 month ago (2011-11-17 17:11:42 UTC) #5
Sheridan Rawlins
http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h File chrome/test/base/test_navigation_observer.h (right): http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h#newcode5 chrome/test/base/test_navigation_observer.h:5: #ifndef CHROME_TEST_BASE_TEST_NAVIGATION_OBSERVER_H_ On 2011/11/17 17:11:42, Paweł Hajdan Jr. wrote: ...
9 years, 1 month ago (2011-11-17 23:20:35 UTC) #6
Sheridan Rawlins
http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h File chrome/test/base/test_navigation_observer.h (right): http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h#newcode5 chrome/test/base/test_navigation_observer.h:5: #ifndef CHROME_TEST_BASE_TEST_NAVIGATION_OBSERVER_H_ Argh... Now I'm hitting check_deps because of ...
9 years, 1 month ago (2011-11-18 05:17:34 UTC) #7
Paweł Hajdan Jr.
http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h File chrome/test/base/test_navigation_observer.h (right): http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h#newcode5 chrome/test/base/test_navigation_observer.h:5: #ifndef CHROME_TEST_BASE_TEST_NAVIGATION_OBSERVER_H_ On 2011/11/18 05:17:34, Sheridan Rawlins wrote: > ...
9 years, 1 month ago (2011-11-21 08:57:25 UTC) #8
James Hawkins
http://codereview.chromium.org/8586009/diff/9001/chrome/browser/ui/webui/web_ui_browsertest.h File chrome/browser/ui/webui/web_ui_browsertest.h (right): http://codereview.chromium.org/8586009/diff/9001/chrome/browser/ui/webui/web_ui_browsertest.h#newcode121 chrome/browser/ui/webui/web_ui_browsertest.h:121: preload_test_fixture_ = preload_test_fixture; Move the implementation the .cc file. ...
9 years, 1 month ago (2011-11-22 23:03:29 UTC) #9
Sheridan Rawlins
http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h File chrome/test/base/test_navigation_observer.h (right): http://codereview.chromium.org/8586009/diff/3024/chrome/test/base/test_navigation_observer.h#newcode5 chrome/test/base/test_navigation_observer.h:5: #ifndef CHROME_TEST_BASE_TEST_NAVIGATION_OBSERVER_H_ FYI, filed http://crbug.com/105213 for followup. content can ...
9 years, 1 month ago (2011-11-23 20:10:06 UTC) #10
James Hawkins
http://codereview.chromium.org/8586009/diff/9001/chrome/test/data/webui/certificate_viewer_dialog_test.js File chrome/test/data/webui/certificate_viewer_dialog_test.js (right): http://codereview.chromium.org/8586009/diff/9001/chrome/test/data/webui/certificate_viewer_dialog_test.js#newcode25 chrome/test/data/webui/certificate_viewer_dialog_test.js:25: GEN(' ShowCertificateViewer();'); On 2011/11/23 20:10:07, Sheridan Rawlins wrote: > ...
9 years, 1 month ago (2011-11-23 20:29:22 UTC) #11
Sheridan Rawlins
http://codereview.chromium.org/8586009/diff/9001/chrome/test/data/webui/certificate_viewer_dialog_test.js File chrome/test/data/webui/certificate_viewer_dialog_test.js (right): http://codereview.chromium.org/8586009/diff/9001/chrome/test/data/webui/certificate_viewer_dialog_test.js#newcode25 chrome/test/data/webui/certificate_viewer_dialog_test.js:25: GEN(' ShowCertificateViewer();'); On 2011/11/23 20:29:22, James Hawkins wrote: > ...
9 years, 1 month ago (2011-11-24 01:17:46 UTC) #12
James Hawkins
http://codereview.chromium.org/8586009/diff/23001/chrome/test/base/js_injection_ready_observer.h File chrome/test/base/js_injection_ready_observer.h (right): http://codereview.chromium.org/8586009/diff/23001/chrome/test/base/js_injection_ready_observer.h#newcode15 chrome/test/base/js_injection_ready_observer.h:15: virtual ~JsInjectionReadyObserver(); Move destructor to protected. http://codereview.chromium.org/8586009/diff/23001/chrome/test/data/webui/async_gen.cc File chrome/test/data/webui/async_gen.cc ...
9 years ago (2011-11-27 19:28:26 UTC) #13
Sheridan Rawlins
http://codereview.chromium.org/8586009/diff/23001/chrome/test/base/js_injection_ready_observer.h File chrome/test/base/js_injection_ready_observer.h (right): http://codereview.chromium.org/8586009/diff/23001/chrome/test/base/js_injection_ready_observer.h#newcode15 chrome/test/base/js_injection_ready_observer.h:15: virtual ~JsInjectionReadyObserver(); Also moved constructor to adhere to interface ...
9 years ago (2011-11-29 06:57:16 UTC) #14
James Hawkins
LGTM with nits. http://codereview.chromium.org/8586009/diff/30001/chrome/test/base/js_injection_ready_observer.cc File chrome/test/base/js_injection_ready_observer.cc (right): http://codereview.chromium.org/8586009/diff/30001/chrome/test/base/js_injection_ready_observer.cc#newcode10 chrome/test/base/js_injection_ready_observer.cc:10: JsInjectionReadyObserver::~JsInjectionReadyObserver() { Inline the destructor and ...
9 years ago (2011-11-29 18:20:54 UTC) #15
Sheridan Rawlins
http://codereview.chromium.org/8586009/diff/30001/chrome/test/base/js_injection_ready_observer.cc File chrome/test/base/js_injection_ready_observer.cc (right): http://codereview.chromium.org/8586009/diff/30001/chrome/test/base/js_injection_ready_observer.cc#newcode10 chrome/test/base/js_injection_ready_observer.cc:10: JsInjectionReadyObserver::~JsInjectionReadyObserver() { On 2011/11/29 18:20:54, James Hawkins wrote: > ...
9 years ago (2011-11-29 23:56:49 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scr@chromium.org/8586009/35001
9 years ago (2011-11-30 02:02:42 UTC) #17
commit-bot: I haz the power
9 years ago (2011-11-30 06:28:53 UTC) #18
Change committed as 112146

Powered by Google App Engine
This is Rietveld 408576698