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

Unified Diff: chrome/test/data/webui/assertions.js

Issue 8416049: Expect should still fail for non-asynchronous tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/webui/test_api.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/assertions.js
diff --git a/chrome/test/data/webui/assertions.js b/chrome/test/data/webui/assertions.js
index f3e13f467772407c8366439bc15260a779b077e4..f8d7f19f88b192991ece2a62dac2c00b6068c95e 100644
--- a/chrome/test/data/webui/assertions.js
+++ b/chrome/test/data/webui/assertions.js
@@ -59,20 +59,41 @@ TEST_F('WebUIAssertionsTest', 'testConstructedMessage', function() {
});
/**
- * Async version of WebUIAssertionsTest.
+ * Failing version of WebUIAssertionsTest.
* @extends WebUIAssertionsTest
* @constructor
*/
-function WebUIAssertionsTestAsyncFail() {}
+function WebUIAssertionsTestFail() {}
-WebUIAssertionsTestAsyncFail.prototype = {
+WebUIAssertionsTestFail.prototype = {
__proto__: WebUIAssertionsTest.prototype,
/** @inheritDoc */
- isAsync: true,
+ testShouldFail: true,
+};
+
+// Test that an assertion failure fails test.
+TEST_F('WebUIAssertionsTestFail', 'testAssertFailFails', function() {
+ assertNotReached();
+});
+
+// Test that an expect failure fails test.
Sheridan Rawlins 2011/10/28 20:51:20 FYI, this is the <new> test, which failed before t
+TEST_F('WebUIAssertionsTestFail', 'testExpectFailFails', function() {
+ expectNotReached();
+});
+
+/**
+ * Async version of WebUIAssertionsTestFail.
+ * @extends WebUIAssertionsTest
+ * @constructor
+ */
+function WebUIAssertionsTestAsyncFail() {}
+
+WebUIAssertionsTestAsyncFail.prototype = {
+ __proto__: WebUIAssertionsTestFail.prototype,
/** @inheritDoc */
- testShouldFail: true,
+ isAsync: true,
};
// Test that an assertion failure doesn't hang forever.
« no previous file with comments | « no previous file | chrome/test/data/webui/test_api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698