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

Unified Diff: chrome/common/extensions/docs/examples/api/devtools/audits/broken-links/devtools.js

Issue 9289057: Changing manifest to v2 extension samples (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding zip files after rebasing with master Created 8 years, 11 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/common/extensions/docs/examples/api/devtools/audits/broken-links/devtools.js
diff --git a/chrome/common/extensions/docs/examples/api/devtools/audits/broken-links/devtools.html b/chrome/common/extensions/docs/examples/api/devtools/audits/broken-links/devtools.js
similarity index 65%
copy from chrome/common/extensions/docs/examples/api/devtools/audits/broken-links/devtools.html
copy to chrome/common/extensions/docs/examples/api/devtools/audits/broken-links/devtools.js
index 20270250167e4016eb0ab2fe5482c2e9caf12856..bc406c94d3890127a7546c48711ace0774c5c1e4 100644
--- a/chrome/common/extensions/docs/examples/api/devtools/audits/broken-links/devtools.html
+++ b/chrome/common/extensions/docs/examples/api/devtools/audits/broken-links/devtools.js
@@ -1,11 +1,11 @@
-<html>
-<head>
-<script type="text/javascript">
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
-var category = chrome.experimental.devtools.audits.addCategory("Broken links",
- 1);
+var category = chrome.experimental.devtools.audits.addCategory(
+ "Broken links", 1);
category.onAuditStarted.addListener(function callback(auditResults) {
- chrome.extension.sendRequest({ tabId: chrome.devtools.inspectedWindow.tabId },
+ chrome.extension.sendRequest({ tabId: webInspector.inspectedWindow.tabId },
function(results) {
if (!results.badlinks.length) {
auditResults.addResult("No broken links",
@@ -19,15 +19,12 @@ category.onAuditStarted.addListener(function callback(auditResults) {
details.addChild(auditResults.createURL(results.badlinks[i].href,
results.badlinks[i].text));
}
- auditResults.addResult("Broken links found (" + results.badlinks.length +
+ auditResults.addResult("Broken links found (" +
+ results.badlinks.length +
")", "",
auditResults.Severity.Severe,
details);
}
auditResults.done();
});
-});
-</script>
-
-</head>
-</html>
+});

Powered by Google App Engine
This is Rietveld 408576698