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

Unified Diff: chrome/test/data/extensions/api_test/debugger/background.js

Issue 12304021: Allow chrome.debugger API to attach to extension background pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a command line switch enabling attach to extension Created 7 years, 10 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
Index: chrome/test/data/extensions/api_test/debugger/background.js
diff --git a/chrome/test/data/extensions/api_test/debugger/background.js b/chrome/test/data/extensions/api_test/debugger/background.js
index 0ca46c96a3bb130dba39384b31f4233213b97be4..78c2d33507f045aba14947bf41c986b4f0761c07 100644
--- a/chrome/test/data/extensions/api_test/debugger/background.js
+++ b/chrome/test/data/extensions/api_test/debugger/background.js
@@ -98,6 +98,18 @@ chrome.test.runTests([
fail("Can not attach to the page with the \"chrome://\" scheme."));
chrome.tabs.remove(tab.id);
});
- }
+ },
+
+ function attachToMissing() {
+ var missingDebuggee = {tabId: -1};
+ chrome.debugger.attach(missingDebuggee, protocolVersion,
+ fail("No tab with given id " + missingDebuggee.tabId + "."));
+ },
+ function attachToExtension() {
pfeldman 2013/02/20 14:58:39 attachToExtensionWithNoSilentFlag
Vladislav Kaznacheev 2013/02/20 15:24:50 Done.
+ debuggeeExtension = {extensionId: "foo"};
+ chrome.debugger.attach(debuggeeExtension, protocolVersion,
+ fail("Cannot attach to an extension, " +
+ "--extension-debugging-silent command line option required."));
+ },
]);

Powered by Google App Engine
This is Rietveld 408576698