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

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

Issue 9162002: Query the current window with chrome.tabs.query using -1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit 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
« no previous file with comments | « chrome/renderer/resources/extensions/schema_generated_bindings.js ('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/basics/query.js
diff --git a/chrome/test/data/extensions/api_test/tabs/basics/query.js b/chrome/test/data/extensions/api_test/tabs/basics/query.js
index bbe6fe774bd03e072b091aabc431216c01eb54cd..5ebd145b266b6104395c36e92415e9f2b331904c 100644
--- a/chrome/test/data/extensions/api_test/tabs/basics/query.js
+++ b/chrome/test/data/extensions/api_test/tabs/basics/query.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -79,6 +79,19 @@ chrome.test.runTests([
}));
},
+ function queryCurrentWindow() {
+ chrome.windows.getCurrent(function(win) {
+ chrome.tabs.query({windowId: chrome.windows.WINDOW_ID_CURRENT},
+ pass(function(tabs) {
+ // The current window should only contain this test page.
+ assertEq(1, tabs.length);
+ assertEq(win.id, tabs[0].windowId);
+ assertEq(location.href, tabs[0].url);
+ assertEq(location.href, tabs[0].title);
+ }));
+ });
+ },
+
function queryPinned() {
chrome.tabs.query({pinned: true}, pass(function(tabs) {
assertEq(pinned_tabs.length, tabs.length);
« no previous file with comments | « chrome/renderer/resources/extensions/schema_generated_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698