michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: "use strict"; michael@0: michael@0: const tabs = require("sdk/tabs"); // From addon-kit michael@0: const windowUtils = require("sdk/deprecated/window-utils"); michael@0: const { getTabForWindow } = require('sdk/tabs/helpers'); michael@0: const app = require("sdk/system/xul-app"); michael@0: const { viewFor } = require("sdk/view/core"); michael@0: const { modelFor } = require("sdk/model/core"); michael@0: const { getTabId, isTab } = require("sdk/tabs/utils"); michael@0: const { defer } = require("sdk/lang/functional"); michael@0: michael@0: // The primary test tab michael@0: var primaryTab; michael@0: michael@0: // We have an auxiliary tab to test background tabs. michael@0: var auxTab; michael@0: michael@0: // The window for the outer iframe in the primary test page michael@0: var iframeWin; michael@0: michael@0: exports["test GetTabForWindow"] = function(assert, done) { michael@0: michael@0: assert.equal(getTabForWindow(windowUtils.activeWindow), null, michael@0: "getTabForWindow return null on topwindow"); michael@0: assert.equal(getTabForWindow(windowUtils.activeBrowserWindow), null, michael@0: "getTabForWindow return null on topwindow"); michael@0: michael@0: let subSubDocument = encodeURIComponent( michael@0: 'Sub iframe
'+ michael@0: '