This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sec = document.body.id; | |
| $('ul#nav-main-menu > li').each(function( index ) { | |
| if ($(this).text().toUpperCase() == sec.toUpperCase()) { | |
| $('#nav-main-menu [tabindex=0]').get(index).focus(); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let chromeWindow = open('chrome://foo/content/'); | |
| assert.ok(~windows().indexOf(chromeWindow), 'chrome URI works'); | |
| let resourceWindow = open('resource://foo'); | |
| assert.ok(~windows().indexOf(resourceWindow), 'resource URI works'); | |
| // Wait for the window unload before ending test | |
| close(chromeWindow).close(resourceWindow).then(done); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let { promise } = require('sdk/window/helpers'); | |
| console.log("foo1"); | |
| promise(open('chrome://foo/content/'), 'load').then(function(window) { | |
| console.log("foo2"); | |
| assert.ok(~windows().indexOf(window), 'chrome URI works'); | |
| console.log("foo3"); | |
| return window; // pass window to next function | |
| }).then(close). | |
| then(promise.bind(null, 'resource://foo', 'load')).then(function(window) { | |
| assert.ok(~windows().indexOf(window), 'resource URI works'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exports['test new top window with content URI'] = function(assert) { | |
| let msg = 'only chrome, resource and data uris are allowed'; | |
| assert.throws(function () { | |
| open('foo'); | |
| }, msg); | |
| assert.throws(function () { | |
| open('http://foo'); | |
| }, msg); | |
| assert.throws(function () { | |
| open('https://foo'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* This Source Code Form is subject to the terms of the Mozilla Public | |
| * License, v. 2.0. If a copy of the MPL was not distributed with this | |
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| 'use strict'; | |
| module.metadata = { | |
| 'stability': 'unstable' | |
| }; | |
| const { Cc, Ci } = require('chrome'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 258 let labelledItemRules = mix(baseItemRules, { | |
| 259 label: { | |
| 260 map: stringOrNull, | |
| 261 is: ["string"], | |
| 262 ok: function (v) !!v, | |
| 263 msg: "The item must have a non-empty string label." | |
| 264 }, | |
| 265 image: { | |
| 266 map: stringOrNull, | |
| 267 is: ["string", "undefined", "null"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let Histogram = { | |
| hgramSamplesCaption: bundle.GetStringFromName("histogramSamples"), | |
| hgramAverageCaption: bundle.GetStringFromName("histogramAverage"), | |
| hgramSumCaption: bundle.GetStringFromName("histogramSum"), | |
| hgramCopyCaption: bundle.GetStringFromName("histogramCopy"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* This Source Code Form is subject to the terms of the Mozilla Public | |
| * License, v. 2.0. If a copy of the MPL was not distributed with this | |
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| const { setTimeout } = require('sdk/timers'); | |
| const utils = require('sdk/lang/functional'); | |
| const { invoke, defer, curry, partial, compose, memoize, once, delay, wrap } = utils; | |
| const deprecate = require('sdk/util/deprecate'); | |
| const { LoaderWithHookedConsole } = require('sdk/test/loader'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* This Source Code Form is subject to the terms of the Mozilla Public | |
| * License, v. 2.0. If a copy of the MPL was not distributed with this | |
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| const { setTimeout } = require('sdk/timers'); | |
| const utils = require('sdk/lang/functional'); | |
| const { invoke, defer, curry, compose, memoize, once, delay, wrap } = utils; | |
| exports['test forwardApply'] = function(assert) { | |
| function sum(b, c) this.a + b + c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * To change this template, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| package pebblemerchant; | |
| /** | |
| * | |
| * @author sunny | |
| */ |