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

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

Issue 13517002: Support shared workers as debug targets for chrome.debugger API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 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 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 7a160c8fa5f67a0b4c56f656511e56d9dce7fc8c..c75e4976132dd1994c610df794ff11b75962aa59 100644
--- a/chrome/test/data/extensions/api_test/debugger/background.js
+++ b/chrome/test/data/extensions/api_test/debugger/background.js
@@ -114,5 +114,21 @@ chrome.test.runTests([
debuggeeExtension = {extensionId: ownExtensionId};
chrome.debugger.attach(debuggeeExtension, protocolVersion,
fail(SILENT_FLAG_REQUIRED));
+ },
+
+ function discoverWorkerWithNoSilentFlag() {
+ chrome.test.listenOnce(chrome.tabs.onUpdated, function () {
+ chrome.debugger.getTargets(function(targets) {
+ var page = targets.filter(
+ function(t) { return t.type == 'worker'; })[0];
+ if (page) {
+ chrome.debugger.attach({targetId: page.id}, protocolVersion,
+ fail(SILENT_FLAG_REQUIRED));
+ } else {
+ chrome.test.fail("Cannot discover a newly created worker");
+ }
+ });
+ });
+ chrome.tabs.create({url: "worker.html"});
}
]);

Powered by Google App Engine
This is Rietveld 408576698