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

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

Issue 23751004: Unit tests for attempt manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: skare@ comments Created 7 years, 3 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /** 5 /**
6 * @fileoverview Library providing basic test framework functionality. 6 * @fileoverview Library providing basic test framework functionality.
7 */ 7 */
8 8
9 /** 9 /**
10 * Namespace for |Test|. 10 * Namespace for |Test|.
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 var namespace = this; 565 var namespace = this;
566 for(var i = 0; i < path.length - 1; i++) { 566 for(var i = 0; i < path.length - 1; i++) {
567 var fieldName = path[i]; 567 var fieldName = path[i];
568 if(!namespace[fieldName]) 568 if(!namespace[fieldName])
569 namespace[fieldName] = {}; 569 namespace[fieldName] = {};
570 570
571 namespace = namespace[fieldName]; 571 namespace = namespace[fieldName];
572 } 572 }
573 573
574 var fieldName = path[path.length-1]; 574 var fieldName = path[path.length-1];
575 assertEquals(undefined, namespace[fieldName]);
576 namespace[fieldName] = theFunction; 575 namespace[fieldName] = theFunction;
577 } 576 }
578 577
579 /** 578 /**
580 * Empty function for use in making mocks. 579 * Empty function for use in making mocks.
581 * @const 580 * @const
582 */ 581 */
583 function emptyFunction() {} 582 function emptyFunction() {}
584 583
585 /** 584 /**
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 exports.TEST = TEST; 1750 exports.TEST = TEST;
1752 exports.TEST_F = TEST_F; 1751 exports.TEST_F = TEST_F;
1753 exports.RUNTIME_TEST_F = TEST_F; 1752 exports.RUNTIME_TEST_F = TEST_F;
1754 exports.GEN = GEN; 1753 exports.GEN = GEN;
1755 exports.GEN_INCLUDE = GEN_INCLUDE; 1754 exports.GEN_INCLUDE = GEN_INCLUDE;
1756 exports.WhenTestDone = WhenTestDone; 1755 exports.WhenTestDone = WhenTestDone;
1757 1756
1758 // Import the Mock4JS helpers. 1757 // Import the Mock4JS helpers.
1759 Mock4JS.addMockSupport(exports); 1758 Mock4JS.addMockSupport(exports);
1760 })(this); 1759 })(this);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698