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

Side by Side Diff: LayoutTests/inspector/sources/debugger/breakpoint-manager.html

Issue 332173002: DevTools: Add test multi-target-breakpoint-manager.html (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address vsevik's comments Created 6 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
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/breakpoint-manager.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="breakpoint-manager.js"></script> 4 <script src="breakpoint-manager.js"></script>
5 5
6 <script> 6 <script>
7 7
8 function test() 8 function test()
9 { 9 {
10 function resetWorkspace(breakpointManager) 10 function resetWorkspace(breakpointManager)
(...skipping 18 matching lines...) Expand all
29 function createBreakpoint(uiSourceCodeId, lineNumber, condition, enabled) 29 function createBreakpoint(uiSourceCodeId, lineNumber, condition, enabled)
30 { 30 {
31 return { sourceFileId: uiSourceCodeId, lineNumber: lineNumber, condition : condition, enabled: enabled }; 31 return { sourceFileId: uiSourceCodeId, lineNumber: lineNumber, condition : condition, enabled: enabled };
32 } 32 }
33 33
34 var serializedBreakpoints = []; 34 var serializedBreakpoints = [];
35 serializedBreakpoints.push(createBreakpoint("a.js", 10, "foo == bar", true)) ; 35 serializedBreakpoints.push(createBreakpoint("a.js", 10, "foo == bar", true)) ;
36 serializedBreakpoints.push(createBreakpoint("a.js", 20, "", false)); 36 serializedBreakpoints.push(createBreakpoint("a.js", 20, "", false));
37 serializedBreakpoints.push(createBreakpoint("b.js", 3, "", true)); 37 serializedBreakpoints.push(createBreakpoint("b.js", 3, "", true));
38 38
39 var mockTarget = {
40
41 id: function()
42 {
43 return 1;
44 }
45 };
46 var targetManager = new WebInspector.TargetManager(); 39 var targetManager = new WebInspector.TargetManager();
40 var mockTarget = InspectorTest.createMockTarget(targetManager, 1);
47 targetManager._targets.push(mockTarget); 41 targetManager._targets.push(mockTarget);
48
49 InspectorTest.setupLiveLocationSniffers(); 42 InspectorTest.setupLiveLocationSniffers();
50 InspectorTest.initializeDefaultMappingOnTarget(mockTarget);
51 43
52 var addUISourceCode = InspectorTest.addUISourceCode.bind(null, mockTarget); 44 var addUISourceCode = InspectorTest.addUISourceCode.bind(null, mockTarget);
53 var createBreakpointManager = InspectorTest.createBreakpointManager.bind(nul l, targetManager); 45 var createBreakpointManager = InspectorTest.createBreakpointManager.bind(nul l, targetManager);
54 46
55 InspectorTest.runTestSuite([ 47 InspectorTest.runTestSuite([
56 function testSetBreakpoint(next) 48 function testSetBreakpoint(next)
57 { 49 {
58 var breakpointManager = createBreakpointManager(); 50 var breakpointManager = createBreakpointManager();
59 var uiSourceCode = addUISourceCode(breakpointManager, "a.js"); 51 var uiSourceCode = addUISourceCode(breakpointManager, "a.js");
60 InspectorTest.setBreakpoint(breakpointManager, uiSourceCode, 30, 0, "", true, InspectorTest.finishBreakpointTest.bind(this, breakpointManager, next) ); 52 InspectorTest.setBreakpoint(breakpointManager, uiSourceCode, 30, 0, "", true, InspectorTest.finishBreakpointTest.bind(this, breakpointManager, next) );
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 347
356 </script> 348 </script>
357 349
358 </head> 350 </head>
359 351
360 <body onload="runTest()"> 352 <body onload="runTest()">
361 <p>Tests BreakpointManager class.</p> 353 <p>Tests BreakpointManager class.</p>
362 354
363 </body> 355 </body>
364 </html> 356 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/breakpoint-manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698