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

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

Issue 7087014: Support automatic javascript test registry in gtest when creating WebUI tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added example of helper functions which aren't included as tests. Created 9 years, 7 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_passing.js
diff --git a/chrome/test/data/webui/sample_passing.js b/chrome/test/data/webui/sample_passing.js
new file mode 100644
index 0000000000000000000000000000000000000000..966d4dda01fc0772af508793ae882601162925be
--- /dev/null
+++ b/chrome/test/data/webui/sample_passing.js
@@ -0,0 +1,27 @@
+// 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.
+
+var helpers = {
+ helpAssertTrue: function(test) {
+ assertTrue(test);
+ },
+ helpAssertFalse: function(test) {
+ assertFalse(test);
+ }
+};
+
+// Sample tests that exercise the test JS library and show how this framework
+// could be used to test the downloads page.
+function testAssertFalse() {
+ assertFalse(false);
+}
+
+function testInitialFocus() {
+ assertTrue(document.activeElement.id == 'term', '');
+}
+
+function testHelpers() {
+ helpers.helpAssertTrue(true);
+ helpers.helpAssertFalse(false);
+}
« chrome/browser/ui/webui/web_ui_browsertest.cc ('K') | « chrome/test/data/webui/sample_failing.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698