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

Unified Diff: webkit/glue/devtools/js/tests.js

Issue 341057: DevTools: add all scripts from afterCompile events when scripts panel is show... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/devtools/js/debugger_agent.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/tests.js
===================================================================
--- webkit/glue/devtools/js/tests.js (revision 30578)
+++ webkit/glue/devtools/js/tests.js (working copy)
@@ -395,6 +395,53 @@
/**
+ * Tests that scripts tab is populated with inspected scripts even if it
+ * hadn't been shown by the moment inspected paged refreshed.
+ * @see http://crbug.com/26312
+ */
+TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh =
+ function() {
+ var test = this;
+ this.assertEquals(WebInspector.panels.elements,
+ WebInspector.currentPanel, 'Elements panel should be current one.');
+
+ this.addSniffer(devtools.DebuggerAgent.prototype, 'reset',
+ waitUntilScriptIsParsed);
+
+ // Reload inspected page. It will reset the debugger agent.
+ test.evaluateInConsole_(
+ 'window.location.reload(true);',
+ function(resultText) {
+ test.assertEquals('undefined', resultText,
+ 'Unexpected result of reload().');
+ });
+
+ function waitUntilScriptIsParsed() {
+ var parsed = devtools.tools.getDebuggerAgent().parsedScripts_;
+ for (var id in parsed) {
+ var url = parsed[id].getUrl();
+ if (url && url.search('debugger_test_page.html$') != -1) {
+ checkScriptsPanel();
+ return;
+ }
+ }
+ test.addSniffer(devtools.DebuggerAgent.prototype, 'addScriptInfo_',
+ waitUntilScriptIsParsed);
+ }
+
+ function checkScriptsPanel() {
+ test.showPanel('scripts');
+ test.assertTrue(test._scriptsAreParsed(['debugger_test_page.html$']),
+ 'Inspected script not found in the scripts list');
+ test.releaseControl();
+ }
+
+ // Wait until all scripts are added to the debugger.
+ this.takeControl();
+};
+
+
+/**
* Tests that scripts list contains content scripts.
*/
TestSuite.prototype.testContentScriptIsPresent = function() {
« no previous file with comments | « webkit/glue/devtools/js/debugger_agent.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698