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

Issue 7861024: Adds testing infrastructure to web_ui_browsertest to support testing HtmlDialogs. (Closed)

Created:
9 years, 3 months ago by flackr
Modified:
9 years, 3 months ago
CC:
chromium-reviews, Rick Byers
Visibility:
Public.

Description

Adds testing infrastructure to web_ui_browsertest to support testing HtmlDialogs. Dialogs shown using ShowHtmlDialog are not added to any tab strip or as a browser window. This CL adds to web_ui_browsertest functions to grab the newly created WebUI instance and run tests on it. This also adds WebUI certificate viewer tests. BUG=None TEST=Adds tests CertificateViewerUITest.testDialogURL, CertificateViewerUITest.testCN, CertificateViewerUITest.testDetails. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102310

Patch Set 1 #

Total comments: 16

Patch Set 2 : Move observing html dialog to separate class and test declarations to JS. #

Total comments: 16

Patch Set 3 : Run testDetails asserts in function that catches assertion failures as well. #

Total comments: 2

Patch Set 4 : Move class implementation to test/data dir and use continueTest for async tests. #

Total comments: 6

Patch Set 5 : Moved TestHtmlDialogObserver under test/base. #

Patch Set 6 : Add description of what triggers notifications and why it's not a race condition. #

Total comments: 14

Patch Set 7 : Applied scr's review suggestions. #

Total comments: 4

Patch Set 8 : Move TODO to correct runTest function. #

Patch Set 9 : Merge with trunk. #

Patch Set 10 : Enable more WebUI for Certificate Viewer WebUI test. #

Patch Set 11 : Merge with trunk. #

Patch Set 12 : Disable certificate viewer UI tests on platforms with native certificate viewers. #

Patch Set 13 : Remove inline override function declaration for clang. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+332 lines, -4 lines) Patch
M chrome/browser/ui/webui/chrome_web_ui.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/chrome_web_ui.cc View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/html_dialog_ui.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/web_ui_browsertest.h View 1 2 3 4 5 6 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/web_ui_browsertest.cc View 1 2 3 4 5 6 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/common/chrome_notification_types.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/base/test_html_dialog_observer.h View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/test/base/test_html_dialog_observer.cc View 1 2 3 4 5 1 chunk +69 lines, -0 lines 0 comments Download
A chrome/test/data/webui/certificate_viewer_dialog_test.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +127 lines, -0 lines 0 comments Download
A chrome/test/data/webui/certificate_viewer_ui_test-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +47 lines, -0 lines 0 comments Download
M chrome/test/data/webui/test_api.js View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
flackr
I am waiting on http://codereview.chromium.org/7670041/ to be able to enable WebUI dialogs at runtime and ...
9 years, 3 months ago (2011-09-09 15:11:03 UTC) #1
Sheridan Rawlins
First pass at comments before heading in to the office. We can chat later if ...
9 years, 3 months ago (2011-09-09 15:47:49 UTC) #2
Paweł Hajdan Jr.
Drive-by with testing comments. http://codereview.chromium.org/7861024/diff/1/chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc File chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc (right): http://codereview.chromium.org/7861024/diff/1/chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc#newcode16 chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc:16: #include <iostream> Do not #include ...
9 years, 3 months ago (2011-09-09 22:13:55 UTC) #3
flackr
http://codereview.chromium.org/7861024/diff/1/chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc File chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc (right): http://codereview.chromium.org/7861024/diff/1/chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc#newcode16 chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc:16: #include <iostream> On 2011/09/09 22:13:55, Paweł Hajdan Jr. wrote: ...
9 years, 3 months ago (2011-09-15 18:41:52 UTC) #4
Sheridan Rawlins
http://codereview.chromium.org/7861024/diff/5001/chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc File chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc (right): http://codereview.chromium.org/7861024/diff/5001/chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc#newcode32 chrome/browser/ui/webui/certificate_viewer_ui_browsertest.cc:32: DCHECK(browser()); If these are tests, they should be ASSERT_TRUE; ...
9 years, 3 months ago (2011-09-15 19:11:41 UTC) #5
flackr
Thanks for all the help! The only thing that's a bit awkward is that the ...
9 years, 3 months ago (2011-09-15 21:02:36 UTC) #6
Paweł Hajdan Jr.
http://codereview.chromium.org/7861024/diff/5004/chrome/test/test_html_dialog_observer.cc File chrome/test/test_html_dialog_observer.cc (right): http://codereview.chromium.org/7861024/diff/5004/chrome/test/test_html_dialog_observer.cc#newcode34 chrome/test/test_html_dialog_observer.cc:34: // Wait for navigation on the new WebUI instance ...
9 years, 3 months ago (2011-09-15 22:11:31 UTC) #7
flackr
http://codereview.chromium.org/7861024/diff/5004/chrome/test/test_html_dialog_observer.cc File chrome/test/test_html_dialog_observer.cc (right): http://codereview.chromium.org/7861024/diff/5004/chrome/test/test_html_dialog_observer.cc#newcode34 chrome/test/test_html_dialog_observer.cc:34: // Wait for navigation on the new WebUI instance ...
9 years, 3 months ago (2011-09-16 15:44:00 UTC) #8
Paweł Hajdan Jr.
http://codereview.chromium.org/7861024/diff/5004/chrome/test/test_html_dialog_observer.cc File chrome/test/test_html_dialog_observer.cc (right): http://codereview.chromium.org/7861024/diff/5004/chrome/test/test_html_dialog_observer.cc#newcode34 chrome/test/test_html_dialog_observer.cc:34: // Wait for navigation on the new WebUI instance ...
9 years, 3 months ago (2011-09-19 17:48:12 UTC) #9
flackr
Just added the comment to test_html_dialog_observer, other changes resulted from merging. http://codereview.chromium.org/7861024/diff/5004/chrome/test/test_html_dialog_observer.cc File chrome/test/test_html_dialog_observer.cc (right): ...
9 years, 3 months ago (2011-09-20 14:16:17 UTC) #10
Sheridan Rawlins
http://codereview.chromium.org/7861024/diff/23001/chrome/browser/ui/webui/web_ui_browsertest.h File chrome/browser/ui/webui/web_ui_browsertest.h (right): http://codereview.chromium.org/7861024/diff/23001/chrome/browser/ui/webui/web_ui_browsertest.h#newcode186 chrome/browser/ui/webui/web_ui_browsertest.h:186: WebUI* web_ui_instance_; The comment should indicate that when it ...
9 years, 3 months ago (2011-09-20 16:04:19 UTC) #11
Paweł Hajdan Jr.
Code I commented in the drive-by LGTM, thanks.
9 years, 3 months ago (2011-09-20 17:41:16 UTC) #12
flackr
http://codereview.chromium.org/7861024/diff/23001/chrome/browser/ui/webui/web_ui_browsertest.h File chrome/browser/ui/webui/web_ui_browsertest.h (right): http://codereview.chromium.org/7861024/diff/23001/chrome/browser/ui/webui/web_ui_browsertest.h#newcode186 chrome/browser/ui/webui/web_ui_browsertest.h:186: WebUI* web_ui_instance_; On 2011/09/20 16:04:19, Sheridan Rawlins wrote: > ...
9 years, 3 months ago (2011-09-20 18:24:51 UTC) #13
Sheridan Rawlins
http://codereview.chromium.org/7861024/diff/29001/chrome/test/data/webui/test_api.js File chrome/test/data/webui/test_api.js (right): http://codereview.chromium.org/7861024/diff/29001/chrome/test/data/webui/test_api.js#newcode133 chrome/test/data/webui/test_api.js:133: * mode. Please move comment below. http://codereview.chromium.org/7861024/diff/29001/chrome/test/data/webui/test_api.js#newcode749 chrome/test/data/webui/test_api.js:749: function ...
9 years, 3 months ago (2011-09-20 19:23:18 UTC) #14
flackr
I have to disable the certificate viewer tests for not posix or mac (these platforms ...
9 years, 3 months ago (2011-09-21 23:12:10 UTC) #15
Sheridan Rawlins
I can't think of a better way without pulling macro values into javascript, which would ...
9 years, 3 months ago (2011-09-22 01:27:42 UTC) #16
commit-bot: I haz the power
CQ is trying tha patch. Follow status at https://chromium-status.appspot.com/cq/flackr%40chromium.org/7861024/29038
9 years, 3 months ago (2011-09-22 16:39:45 UTC) #17
commit-bot: I haz the power
9 years, 3 months ago (2011-09-22 18:06:32 UTC) #18
Change committed as 102310

Powered by Google App Engine
This is Rietveld 408576698