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

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

Issue 201014: DevTools: enable scripts panel sanity test (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_unittest.cc ('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 25434)
+++ webkit/glue/devtools/js/tests.js (working copy)
@@ -344,9 +344,16 @@
// Intercept parsedScriptSource calls to check that all expected scripts are
// added to the debugger.
var test = this;
+ var receivedConsoleApiSource = false;
this.addSniffer(WebInspector, 'parsedScriptSource',
function(sourceID, sourceURL, source, startingLine) {
- if (sourceURL.search(/debugger_test_page.html$/) != -1) {
+ if (sourceURL == undefined) {
+ if (receivedConsoleApiSource) {
+ test.fail('Unexpected script without URL');
+ } else {
+ receivedConsoleApiSource = true;
+ }
+ } else if (sourceURL.search(/debugger_test_page.html$/) != -1) {
if (parsedDebuggerTestPageHtml) {
test.fail('Unexpected parse event: ' + sourceURL);
}
@@ -359,7 +366,10 @@
test.fail('No visible script view: ' + sourceURL);
}
- if (parsedDebuggerTestPageHtml) {
+ // There should be two scripts: one for the main page and another
+ // one which is source of console API(see
+ // InjectedScript._ensureCommandLineAPIInstalled).
+ if (parsedDebuggerTestPageHtml && receivedConsoleApiSource) {
test.releaseControl();
}
}, true /* sticky */);
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698