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

Side by Side Diff: docs/testing/test_browser_dialog.md

Issue 2695963002: Update web-platform-tests docs (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « docs/linux_sandboxing.md ('k') | docs/testing/web_platform_tests.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Testing Chrome browser dialogs with TestBrowserDialog 1 # Testing Chrome browser dialogs with TestBrowserDialog
2 2
3 \#include "[chrome/browser/ui/test/test_browser_dialog.h]" 3 \#include "[chrome/browser/ui/test/test_browser_dialog.h]"
4 4
5 `TestBrowserDialog` provides a way to register an `InProcessBrowserTest` testing 5 `TestBrowserDialog` provides a way to register an `InProcessBrowserTest` testing
6 harness with a framework that invokes Chrome browser dialogs in a consistent 6 harness with a framework that invokes Chrome browser dialogs in a consistent
7 way. It optionally provides a way to invoke dialogs "interactively". This allows 7 way. It optionally provides a way to invoke dialogs "interactively". This allows
8 screenshots to be generated easily, with the same test data, to assist with UI 8 screenshots to be generated easily, with the same test data, to assist with UI
9 review. It also provides a registry of dialogs so they can be systematically 9 review. It also provides a registry of dialogs so they can be systematically
10 checked for subtle changes and regressions. 10 checked for subtle changes and regressions.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 IN_PROC_BROWSER_TEST_F(FooDialogTest, InvokeDialog_default) { 42 IN_PROC_BROWSER_TEST_F(FooDialogTest, InvokeDialog_default) {
43 RunDialog(); 43 RunDialog();
44 } 44 }
45 ``` 45 ```
46 46
47 Notes: 47 Notes:
48 48
49 * The body of the test is always just "`RunDialog();`". 49 * The body of the test is always just "`RunDialog();`".
50 * "`default`" is the `std::string` passed to `ShowDialog()` and can be 50 * "`default`" is the `std::string` passed to `ShowDialog()` and can be
51 customized. See 51 customized. See
52 [Testing additional dialog "styles"](#Testing-additional-dialog-styles_). 52 [Testing additional dialog "styles"](#Testing-additional-dialog-styles).
53 * The text before `default` (in this case) must always be "`InvokeDialog_`". 53 * The text before `default` (in this case) must always be "`InvokeDialog_`".
54 54
55 ### Concrete examples 55 ### Concrete examples
56 56
57 * [chrome/browser/ui/ask_google_for_suggestions_dialog_browsertest.cc] 57 * [chrome/browser/ui/ask_google_for_suggestions_dialog_browsertest.cc]
58 * [chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc] 58 * [chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc]
59 * [chrome/browser/ui/collected_cookies_browsertest.cc] 59 * [chrome/browser/ui/collected_cookies_browsertest.cc]
60 * [chrome/browser/ui/update_chrome_dialog_browsertest.cc] 60 * [chrome/browser/ui/update_chrome_dialog_browsertest.cc]
61 61
62 ## Running the tests 62 ## Running the tests
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 * should remain open until the dialog is dismissed 270 * should remain open until the dialog is dismissed
271 */ 271 */
272 ``` 272 ```
273 273
274 [chrome/browser/ui/test/test_browser_dialog.h]: https://cs.chromium.org/chromium /src/chrome/browser/ui/test/test_browser_dialog.h 274 [chrome/browser/ui/test/test_browser_dialog.h]: https://cs.chromium.org/chromium /src/chrome/browser/ui/test/test_browser_dialog.h
275 [chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc]: https://cs. chromium.org/chromium/src/chrome/browser/ui/autofill/card_unmask_prompt_view_bro wsertest.cc?l=104&q=ShowDialog 275 [chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc]: https://cs. chromium.org/chromium/src/chrome/browser/ui/autofill/card_unmask_prompt_view_bro wsertest.cc?l=104&q=ShowDialog
276 [chrome/browser/ui/collected_cookies_browsertest.cc]: https://cs.chromium.org/ch romium/src/chrome/browser/ui/collected_cookies_browsertest.cc?l=26&q=ShowDialog 276 [chrome/browser/ui/collected_cookies_browsertest.cc]: https://cs.chromium.org/ch romium/src/chrome/browser/ui/collected_cookies_browsertest.cc?l=26&q=ShowDialog
277 [chrome/browser/ui/ask_google_for_suggestions_dialog_browsertest.cc]: https://cs .chromium.org/chromium/src/chrome/browser/ui/ask_google_for_suggestions_dialog_b rowsertest.cc?l=18&q=ShowDialog 277 [chrome/browser/ui/ask_google_for_suggestions_dialog_browsertest.cc]: https://cs .chromium.org/chromium/src/chrome/browser/ui/ask_google_for_suggestions_dialog_b rowsertest.cc?l=18&q=ShowDialog
278 [chrome/browser/ui/update_chrome_dialog_browsertest.cc]: https://cs.chromium.org /chromium/src/chrome/browser/ui/update_chrome_dialog_browsertest.cc?l=15&q=ShowD ialog 278 [chrome/browser/ui/update_chrome_dialog_browsertest.cc]: https://cs.chromium.org /chromium/src/chrome/browser/ui/update_chrome_dialog_browsertest.cc?l=15&q=ShowD ialog
279 [ExtensionBrowserTest]: https://cs.chromium.org/chromium/src/chrome/browser/exte nsions/extension_browsertest.h?q=extensionbrowsertest&l=40 279 [ExtensionBrowserTest]: https://cs.chromium.org/chromium/src/chrome/browser/exte nsions/extension_browsertest.h?q=extensionbrowsertest&l=40
OLDNEW
« no previous file with comments | « docs/linux_sandboxing.md ('k') | docs/testing/web_platform_tests.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698