| Index: chrome/test/data/webui/sample_fail.js
|
| diff --git a/chrome/test/data/webui/sample_fail.js b/chrome/test/data/webui/sample_fail.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..80bf1fef64ee620f3e4af4ab09393633474f1293
|
| --- /dev/null
|
| +++ b/chrome/test/data/webui/sample_fail.js
|
| @@ -0,0 +1,30 @@
|
| +// 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.
|
| +
|
| +// Sample tests that exercise the test JS library and show how this framework
|
| +// could be used to test the downloads page.
|
| +
|
| +function testSeveralExpect() {
|
| + expectTrue(false);
|
| + expectTrue(false, 'false message');
|
| + expectTrue(5 < 2);
|
| + expectTrue(5 < 2, '5 < 2 message');
|
| + expectEquals(5, 2);
|
| + expectEquals(5, 2, 'equals message');
|
| +}
|
| +
|
| +function testTwoExpect() {
|
| + console.info('testTwoExpect');
|
| + expectTrue(0);
|
| + expectTrue('');
|
| +}
|
| +
|
| +function testDoubleInvocation() {
|
| + console.info('testDoubleInvocation');
|
| + testTwoExpect();
|
| + testTwoExpect();
|
| +}
|
| +
|
| +var test_fixture = 'WebUIBrowserTestFail';
|
| +var test_assert = 'ASSERT_FALSE';
|
|
|