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

Side by Side 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: Adjusted comments and PathService replacement. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Show an example of helper functions which are not, themselves, included as
6 // tests, but are available to help write tests.
7 var helpers = {
8 helpAssertTrue: function(test) {
9 assertTrue(test);
10 },
11 helpAssertFalse: function(test) {
12 assertFalse(test);
13 }
14 };
15
16 // Sample tests that exercise the test JS library and show how this framework
17 // could be used to test the downloads page.
18 function testAssertFalse() {
19 assertFalse(false);
20 }
21
22 function testInitialFocus() {
23 assertTrue(document.activeElement.id == 'term', '');
24 }
25
26 function testHelpers() {
27 helpers.helpAssertTrue(true);
28 helpers.helpAssertFalse(false);
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698