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

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

Issue 23108007: Add width and height to chrome.tabs.Tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code formatting. Check width and height is positive for newly created tab. Created 7 years, 4 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/basics/tab_size.html ('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/tab_size.js
diff --git a/chrome/test/data/extensions/api_test/tabs/basics/tab_size.js b/chrome/test/data/extensions/api_test/tabs/basics/tab_size.js
new file mode 100644
index 0000000000000000000000000000000000000000..de970bb68331dca0c52447a5bf1c1aad2552ab38
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/tabs/basics/tab_size.js
@@ -0,0 +1,26 @@
+// Copyright (c) 2013 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 firstTabId;
+var firstTab;
+
+chrome.test.runTests([
+ function setupWindow() {
+ createWindow([pageUrl("a")], {}, pass(function(winId, tabIds) {
+ firstTabId = tabIds[0];
+ chrome.tabs.get(firstTabId, pass(function(tab) {
+ assertTrue(tab.width > 0);
+ assertTrue(tab.height > 0);
+ firstTab = tab;
+ }));
+ }));
+ },
+
+ function sizeAfterDuplicatingTab() {
+ chrome.tabs.duplicate(firstTabId, pass(function(tab) {
+ assertEq(firstTab.width, tab.width);
+ assertEq(firstTab.height, tab.height);
+ }));
+ }
+]);
« no previous file with comments | « chrome/test/data/extensions/api_test/tabs/basics/tab_size.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698