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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/extensions/extensions-panel.html

Issue 2751173003: [DevTools] Turn ConsoleModel into a singleton (Closed)
Patch Set: rebased Created 3 years, 9 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
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="../../http/tests/inspector/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script src="../../http/tests/inspector/network-test.js"></script> 5 <script src="../../http/tests/inspector/network-test.js"></script>
6 <script src="../../http/tests/inspector/sources-test.js"></script> 6 <script src="../../http/tests/inspector/sources-test.js"></script>
7 <script src="../../http/tests/inspector/resources-test.js"></script> 7 <script src="../../http/tests/inspector/resources-test.js"></script>
8 <script src="../../http/tests/inspector/extensions-test.js"></script> 8 <script src="../../http/tests/inspector/extensions-test.js"></script>
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 function logMessage() 10 function logMessage()
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 InspectorTest.addResult("No button with index " + index); 58 InspectorTest.addResult("No button with index " + index);
59 items[index].click(); 59 items[index].click();
60 } 60 }
61 61
62 InspectorTest.logMessageAndClickOnURL = function() 62 InspectorTest.logMessageAndClickOnURL = function()
63 { 63 {
64 InspectorTest.disableConsoleViewport(); 64 InspectorTest.disableConsoleViewport();
65 InspectorTest.evaluateInPage("logMessage()"); 65 InspectorTest.evaluateInPage("logMessage()");
66 var wrappedConsoleMessageAdded = InspectorTest.safeWrap(consoleMessageAd ded); 66 var wrappedConsoleMessageAdded = InspectorTest.safeWrap(consoleMessageAd ded);
67 SDK.multitargetConsoleModel.addEventListener(SDK.ConsoleModel.Events.Mes sageAdded, wrappedConsoleMessageAdded); 67 SDK.consoleModel.addEventListener(SDK.ConsoleModel.Events.MessageAdded, wrappedConsoleMessageAdded);
68 68
69 function consoleMessageAdded() 69 function consoleMessageAdded()
70 { 70 {
71 SDK.multitargetConsoleModel.removeEventListener(SDK.ConsoleModel.Eve nts.MessageAdded, wrappedConsoleMessageAdded); 71 SDK.consoleModel.removeEventListener(SDK.ConsoleModel.Events.Message Added, wrappedConsoleMessageAdded);
72 Console.ConsoleView.instance()._viewportThrottler.flush(); 72 Console.ConsoleView.instance()._viewportThrottler.flush();
73 InspectorTest.deprecatedRunAfterPendingDispatches(clickOnMessage) 73 InspectorTest.deprecatedRunAfterPendingDispatches(clickOnMessage)
74 } 74 }
75 75
76 function clickOnMessage() 76 function clickOnMessage()
77 { 77 {
78 var xpathResult = document.evaluate("//span[@class='devtools-link' a nd starts-with(., 'extensions-panel.html')]", Console.ConsoleView.instance()._vi ewport.element, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null); 78 var xpathResult = document.evaluate("//span[@class='devtools-link' a nd starts-with(., 'extensions-panel.html')]", Console.ConsoleView.instance()._vi ewport.element, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null);
79 79
80 var click = document.createEvent("MouseEvent"); 80 var click = document.createEvent("MouseEvent");
81 click.initMouseEvent("click", true, true); 81 click.initMouseEvent("click", true, true);
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 var img = document.createElement("img"); 341 var img = document.createElement("img");
342 img.src = "resources/abe.png"; 342 img.src = "resources/abe.png";
343 document.body.appendChild(img); 343 document.body.appendChild(img);
344 } 344 }
345 </script> 345 </script>
346 </head> 346 </head>
347 <body onload="runTest()"> 347 <body onload="runTest()">
348 <p>Tests WebInspector extension API</p> 348 <p>Tests WebInspector extension API</p>
349 </body> 349 </body>
350 </html> 350 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698