Chromium Code Reviews| Index: chrome/test/data/webui/mocha_adapter.js |
| diff --git a/chrome/test/data/webui/mocha_adapter.js b/chrome/test/data/webui/mocha_adapter.js |
| index 6d05f781f84fb31928f346007e5a5c5abf5fcbf3..b09a6189f61b7eac09657a0ceb5484c5a0f3c6d7 100644 |
| --- a/chrome/test/data/webui/mocha_adapter.js |
| +++ b/chrome/test/data/webui/mocha_adapter.js |
| @@ -7,6 +7,11 @@ |
| * mocha_adapter.js in a WebUIBrowserTest's extraLibraries array. |
| */ |
| +// NOTE: When defining TEST_F() functions that use Mocha, use 'var self = this' |
| +// for referencing the Test object within suite() and test() function objects |
| +// (instead of binding |this|), since |this| within those objects will reference |
| +// the Mocha Suite or Test instance. |
|
Dan Beam
2015/12/28 20:01:39
this is probably more a general understanding of |
michaelpg
2015/12/28 20:39:35
Yes, the test cases are call'd or apply'd on a par
stevenjb
2015/12/28 20:49:16
There has been some confusion and discussion about
|
| + |
| /** |
| * Initializes a mocha reporter for the BrowserTest framework, which registers |
| * event listeners on the given Runner. |