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

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

Issue 7576024: Provide ability for WebUIBrowserTests to run asynchronous tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments, fixed chrome.send passthrough, fixed assertion tests to use runTestFunction. Created 9 years, 4 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 | « chrome/browser/ui/webui/web_ui_test_handler.cc ('k') | chrome/test/data/webui/async.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 b7f62f5976b961dffc1794295bf8956cc40e398c..daf18735bcd909b7c3f4d4d1aa92395ae06d242e 100644
--- a/chrome/test/data/webui/assertions.js
+++ b/chrome/test/data/webui/assertions.js
@@ -23,7 +23,8 @@ function testTwoExpects() {
}
TEST_F('WebUIAssertionsTest', 'testTwoExpects', function() {
- var result = runTest(testTwoExpects, []);
+ var result = runTestFunction('testTwoExpects', testTwoExpects, []);
+ resetTestState();
expectFalse(result[0]);
expectTrue(!!result[1].match(/expectTrue\(false\): false/));
@@ -41,7 +42,9 @@ function testCallTestTwice() {
}
TEST_F('WebUIAssertionsTest', 'testCallTestTwice', function() {
- var result = runTest(testCallTestTwice, []);
+ var result = runTestFunction('testCallTestTwice', testCallTestTwice, []);
+ resetTestState();
+
expectFalse(result[0]);
expectEquals(2, result[1].match(
/expectTrue\(false, 'message1'\): message1: false/g).length);
@@ -55,7 +58,10 @@ function testConstructMessage() {
}
TEST_F('WebUIAssertionsTest', 'testConstructedMessage', function() {
- var result = runTest(testConstructMessage, []);
+ var result = runTestFunction(
+ 'testConstructMessage', testConstructMessage, []);
+ resetTestState();
+
expectEquals(
1, result[1].match(/assertTrue\(false, message\): 1 2: false/g).length);
});
« no previous file with comments | « chrome/browser/ui/webui/web_ui_test_handler.cc ('k') | chrome/test/data/webui/async.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698