summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/unit/framework_unittest.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/data/unit/framework_unittest.js')
-rw-r--r--chrome/test/data/unit/framework_unittest.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/chrome/test/data/unit/framework_unittest.js b/chrome/test/data/unit/framework_unittest.js
new file mode 100644
index 0000000..3eee034
--- /dev/null
+++ b/chrome/test/data/unit/framework_unittest.js
@@ -0,0 +1,42 @@
+// 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.
+
+/**
+ * Class for testing the unit_test framework.
+ * @constructor
+ */
+function FrameworkUnitTest() {}
+
+FrameworkUnitTest.prototype = {
+ __proto__: testing.Test.prototype,
+};
+
+TEST_F('FrameworkUnitTest', 'testExpectTrueOk', function() {
+ expectTrue(true);
+});
+
+TEST_F('FrameworkUnitTest', 'testAssertTrueOk', function() {
+ assertTrue(true);
+});
+
+/**
+ * Failing version of FrameworkUnitTest.
+ * @constructor
+ */
+function FrameworkUnitTestFail() {}
+
+FrameworkUnitTestFail.prototype = {
+ __proto__: FrameworkUnitTest.prototype,
+
+ /** inheritDoc */
+ testShouldFail: true,
+};
+
+TEST_F('FrameworkUnitTestFail', 'testExpectFailFails', function() {
+ expectNotReached();
+});
+
+TEST_F('FrameworkUnitTestFail', 'testAssertFailFails', function() {
+ assertNotReached();
+}); \ No newline at end of file