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

Unified Diff: chrome/test/data/unit/framework_unittest.gtestjs

Issue 8438063: Make it possible to include another file and port print_preview unit test to unit_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made cp.py script since it's fairly general. Created 9 years, 1 month 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/unit/framework_unittest.gtestjs
diff --git a/chrome/test/data/unit/framework_unittest.gtestjs b/chrome/test/data/unit/framework_unittest.gtestjs
new file mode 100644
index 0000000000000000000000000000000000000000..874e7303d781bee2c5a1134f2972c55b840ae3f4
--- /dev/null
+++ b/chrome/test/data/unit/framework_unittest.gtestjs
@@ -0,0 +1,44 @@
+// 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
+ * @extends {testing.Test}
+ */
+function FrameworkUnitTest() {}
+
+FrameworkUnitTest.prototype = {
+ __proto__: testing.Test.prototype,
+};
+
+TEST_F('FrameworkUnitTest', 'ExpectTrueOk', function() {
+ expectTrue(true);
+});
+
+TEST_F('FrameworkUnitTest', 'AssertTrueOk', function() {
+ assertTrue(true);
+});
+
+/**
+ * Failing version of FrameworkUnitTest.
+ * @constructor
+ * @extends {FrameworkUnitTest}
+ */
+function FrameworkUnitTestFail() {}
+
+FrameworkUnitTestFail.prototype = {
+ __proto__: FrameworkUnitTest.prototype,
+
+ /** inheritDoc */
+ testShouldFail: true,
+};
+
+TEST_F('FrameworkUnitTestFail', 'ExpectFailFails', function() {
+ expectNotReached();
+});
+
+TEST_F('FrameworkUnitTestFail', 'AssertFailFails', function() {
+ assertNotReached();
+});

Powered by Google App Engine
This is Rietveld 408576698