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

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

Issue 7250009: Added guts to pull call signatures when assertions & expectations fail. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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
Index: chrome/test/data/webui/sample_fail.js
diff --git a/chrome/test/data/webui/sample_fail.js b/chrome/test/data/webui/sample_fail.js
new file mode 100644
index 0000000000000000000000000000000000000000..80bf1fef64ee620f3e4af4ab09393633474f1293
--- /dev/null
+++ b/chrome/test/data/webui/sample_fail.js
@@ -0,0 +1,30 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Sample tests that exercise the test JS library and show how this framework
+// could be used to test the downloads page.
+
+function testSeveralExpect() {
+ expectTrue(false);
+ expectTrue(false, 'false message');
+ expectTrue(5 < 2);
+ expectTrue(5 < 2, '5 < 2 message');
+ expectEquals(5, 2);
+ expectEquals(5, 2, 'equals message');
+}
+
+function testTwoExpect() {
+ console.info('testTwoExpect');
+ expectTrue(0);
+ expectTrue('');
+}
+
+function testDoubleInvocation() {
+ console.info('testDoubleInvocation');
+ testTwoExpect();
+ testTwoExpect();
+}
+
+var test_fixture = 'WebUIBrowserTestFail';
+var test_assert = 'ASSERT_FALSE';

Powered by Google App Engine
This is Rietveld 408576698