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

Unified Diff: chrome/test/data/extensions/api_test/tabs/no_events/test.js

Issue 1239643004: extensions: tabs: set tab id to -1 for app/devtools windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 5 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/test/data/extensions/api_test/tabs/no_events/manifest.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/tabs/no_events/test.js
diff --git a/chrome/test/data/extensions/api_test/tabs/no_events/test.js b/chrome/test/data/extensions/api_test/tabs/no_events/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..4ebc2890b893a9ca4d38bd3efb590dd88ba6deba
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/tabs/no_events/test.js
@@ -0,0 +1,18 @@
+// Copyright 2015 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 errors = 0;
+
+function errorListener() { ++errors; }
+
+chrome.tabs.onCreated.addListener(errorListener);
+chrome.tabs.onRemoved.addListener(errorListener);
+chrome.tabs.onUpdated.addListener(errorListener);
+
+chrome.test.sendMessage('ready', function (message) {
+ if (errors == 0)
+ chrome.test.notifyPass();
+ else
+ chrome.test.notifyFail('Unexpected chrome.tabs events');
+});
« no previous file with comments | « chrome/test/data/extensions/api_test/tabs/no_events/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698