OLD | NEW |
(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 // Sample tests that exercise the test JS library and show how this framework |
| 6 // could be used to test the downloads page. |
| 7 |
| 8 function testSeveralExpect() { |
| 9 expectTrue(false); |
| 10 expectTrue(false, 'false message'); |
| 11 expectTrue(5 < 2); |
| 12 expectTrue(5 < 2, '5 < 2 message'); |
| 13 expectEquals(5, 2); |
| 14 expectEquals(5, 2, 'equals message'); |
| 15 } |
| 16 |
| 17 function testTwoExpect() { |
| 18 console.info('testTwoExpect'); |
| 19 expectTrue(0); |
| 20 expectTrue(''); |
| 21 } |
| 22 |
| 23 function testDoubleInvocation() { |
| 24 console.info('testDoubleInvocation'); |
| 25 testTwoExpect(); |
| 26 testTwoExpect(); |
| 27 } |
| 28 |
| 29 var test_fixture = 'WebUIBrowserTestFail'; |
| 30 var test_assert = 'ASSERT_FALSE'; |
OLD | NEW |