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

Side by Side Diff: chrome/test/data/webui/assertions.js

Issue 7645007: WebUI Testing: async support - global mocking, deferred runs, continued run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor comment fix. Created 9 years, 4 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/webui/assertions-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function WebUIAssertionsTest() {} 5 function WebUIAssertionsTest() {}
6 6
7 WebUIAssertionsTest.prototype = { 7 WebUIAssertionsTest.prototype = {
8 __proto__: testing.Test.prototype, 8 __proto__: testing.Test.prototype,
9 browsePreload: 'chrome://DummyURL', 9 browsePreload: DUMMY_URL,
10 typedefCppFixture: null,
11 }; 10 };
12 11
13 GEN('#include "chrome/test/data//webui/assertions-inl.h"');
14 GEN('');
15 GEN('WebUIAssertionsTest::WebUIAssertionsTest() {}');
16 GEN('WebUIAssertionsTest::~WebUIAssertionsTest() {}');
17 GEN('MockWebUIProvider::MockWebUIProvider() {}');
18 GEN('MockWebUIProvider::~MockWebUIProvider() {}');
19
20 function testTwoExpects() { 12 function testTwoExpects() {
21 expectTrue(false); 13 expectTrue(false);
22 expectTrue(0); 14 expectTrue(0);
23 } 15 }
24 16
25 TEST_F('WebUIAssertionsTest', 'testTwoExpects', function() { 17 TEST_F('WebUIAssertionsTest', 'testTwoExpects', function() {
26 var result = runTestFunction('testTwoExpects', testTwoExpects, []); 18 var result = runTestFunction('testTwoExpects', testTwoExpects, []);
27 resetTestState(); 19 resetTestState();
28 20
29 expectFalse(result[0]); 21 expectFalse(result[0]);
(...skipping 28 matching lines...) Expand all
58 } 50 }
59 51
60 TEST_F('WebUIAssertionsTest', 'testConstructedMessage', function() { 52 TEST_F('WebUIAssertionsTest', 'testConstructedMessage', function() {
61 var result = runTestFunction( 53 var result = runTestFunction(
62 'testConstructMessage', testConstructMessage, []); 54 'testConstructMessage', testConstructMessage, []);
63 resetTestState(); 55 resetTestState();
64 56
65 expectEquals( 57 expectEquals(
66 1, result[1].match(/assertTrue\(false, message\): 1 2: false/g).length); 58 1, result[1].match(/assertTrue\(false, message\): 1 2: false/g).length);
67 }); 59 });
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/webui/assertions-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698