Skip to content

Commit

Permalink
Merge m-c to m-i.
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Newman committed Jul 27, 2012
2 parents 03f8cf9 + 9866090 commit dd8a479
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 43 deletions.
32 changes: 18 additions & 14 deletions browser/components/sessionstore/test/browser_522545.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,24 @@ function test() {
event.initEvent("input", true, false);
gURLBar.dispatchEvent(event);

executeSoon(function() {
is(browser.userTypedValue, "example.org",
"userTypedValue was set when changing gURLBar.value");
is(browser.userTypedClear, 0,
"userTypedClear was not changed when changing gURLBar.value");

// Now make sure ss gets these values too
let newState = JSON.parse(ss.getBrowserState());
is(newState.windows[0].tabs[0].userTypedValue, "example.org",
"sessionstore got correct userTypedValue");
is(newState.windows[0].tabs[0].userTypedClear, 0,
"sessionstore got correct userTypedClear");
runNextTest();
});
browser.addEventListener("load", function onLoad() {
browser.removeEventListener("load", onLoad, true);

executeSoon(function () {
is(browser.userTypedValue, "example.org",
"userTypedValue was set when changing gURLBar.value");
is(browser.userTypedClear, 0,
"userTypedClear was not changed when changing gURLBar.value");

// Now make sure ss gets these values too
let newState = JSON.parse(ss.getBrowserState());
is(newState.windows[0].tabs[0].userTypedValue, "example.org",
"sessionstore got correct userTypedValue");
is(newState.windows[0].tabs[0].userTypedClear, 0,
"sessionstore got correct userTypedClear");
runNextTest();
});
}, true);
});
}

Expand Down
7 changes: 6 additions & 1 deletion browser/components/thumbnails/PageThumbs.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ let PageThumbs = {
telemetry.getHistogramById("FX_THUMBNAILS_CAPTURE_TIME_MS")
.add(new Date() - telemetryCaptureTime);

canvas.mozFetchAsStream(aCallback, this.contentType);
// Fetch the canvas data on the next event loop tick so that we allow
// some event processing in between drawing to the canvas and encoding
// its data. We want to block the UI as short as possible. See bug 744100.
Services.tm.currentThread.dispatch(function () {
canvas.mozFetchAsStream(aCallback, this.contentType);
}.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
},

/**
Expand Down
2 changes: 1 addition & 1 deletion browser/devtools/commandline/GcliCommands.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "LayoutHelpers",
"resource:///modules/devtools/LayoutHelpers.jsm");

XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource:///modules/devtools/Console.jsm");
"resource://gre/modules/devtools/Console.jsm");

XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
"resource://gre/modules/AddonManager.jsm");
Expand Down
4 changes: 2 additions & 2 deletions browser/devtools/commandline/gcli.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

var EXPORTED_SYMBOLS = [ "gcli" ];

Components.utils.import("resource://gre/modules/Require.jsm");
Components.utils.import("resource:///modules/devtools/Console.jsm");
Components.utils.import("resource://gre/modules/devtools/Require.jsm");
Components.utils.import("resource://gre/modules/devtools/Console.jsm");
Components.utils.import("resource:///modules/devtools/Browser.jsm");

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function test() {

let [ define, require ] = (function() {
let tempScope = {};
Components.utils.import("resource://gre/modules/Require.jsm", tempScope);
Components.utils.import("resource://gre/modules/devtools/Require.jsm", tempScope);
return [ tempScope.define, tempScope.require ];
})();

Expand Down
2 changes: 1 addition & 1 deletion browser/devtools/commandline/test/browser_gcli_pref.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let tabSizeOrig = undefined;
let remoteHostOrig = undefined;

function setup() {
Components.utils.import("resource://gre/modules/Require.jsm", imports);
Components.utils.import("resource://gre/modules/devtools/Require.jsm", imports);
imports.settings = imports.require("gcli/settings");

tiltEnabledOrig = imports.prefBranch.getBoolPref("devtools.tilt.enabled");
Expand Down
2 changes: 1 addition & 1 deletion browser/devtools/commandline/test/browser_gcli_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ let tabSizeOrig = undefined;
let remoteHostOrig = undefined;

function setup() {
Components.utils.import("resource://gre/modules/Require.jsm", imports);
Components.utils.import("resource://gre/modules/devtools/Require.jsm", imports);
imports.settings = imports.require("gcli/settings");

tiltEnabled = imports.settings.getSetting("devtools.tilt.enabled");
Expand Down
4 changes: 2 additions & 2 deletions browser/devtools/commandline/test/browser_gcli_web.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@

let [ define, require ] = (function() {
let tempScope = {};
Components.utils.import("resource://gre/modules/Require.jsm", tempScope);
Components.utils.import("resource://gre/modules/devtools/Require.jsm", tempScope);
return [ tempScope.define, tempScope.require ];
})();

let console = (function() {
let tempScope = {};
Components.utils.import("resource:///modules/devtools/Console.jsm", tempScope);
Components.utils.import("resource://gre/modules/devtools/Console.jsm", tempScope);
return console;
})();

Expand Down
2 changes: 1 addition & 1 deletion browser/devtools/commandline/test/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const TEST_BASE_HTTPS = "https://example.com/browser/browser/devtools/commandlin

let console = (function() {
let tempScope = {};
Components.utils.import("resource:///modules/devtools/Console.jsm", tempScope);
Components.utils.import("resource://gre/modules/devtools/Console.jsm", tempScope);
return tempScope.console;
})();

Expand Down
2 changes: 1 addition & 1 deletion browser/devtools/shared/DeveloperToolbar.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");

XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource:///modules/devtools/Console.jsm");
"resource://gre/modules/devtools/Console.jsm");

XPCOMUtils.defineLazyModuleGetter(this, "gcli",
"resource:///modules/devtools/gcli.jsm");
Expand Down
2 changes: 1 addition & 1 deletion browser/devtools/shared/test/browser_require_basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

let [ define, require ] = (function() {
let tempScope = {};
Components.utils.import("resource://gre/modules/Require.jsm", tempScope);
Components.utils.import("resource://gre/modules/devtools/Require.jsm", tempScope);
return [ tempScope.define, tempScope.require ];
})();

Expand Down
2 changes: 1 addition & 1 deletion browser/devtools/shared/test/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

let console = (function() {
let tempScope = {};
Components.utils.import("resource:///modules/devtools/Console.jsm", tempScope);
Components.utils.import("resource://gre/modules/devtools/Console.jsm", tempScope);
return tempScope.console;
})();

Expand Down
23 changes: 15 additions & 8 deletions testing/marionette/marionette-actors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1374,14 +1374,21 @@ MarionetteDriverActor.prototype = {
let nullPrevious = (this.curBrowser.curFrameId == null);
let curWin = this.getCurrentWindow();
let frameObject = curWin.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).getOuterWindowWithId(message.json.value);
let reg = this.curBrowser.register(message.json.value, message.json.href);
if (reg) {
this.curBrowser.elementManager.seenItems[reg] = frameObject; //add to seenItems
if (nullPrevious && (this.curBrowser.curFrameId != null)) {
this.sendAsync("newSession", {B2G: (appName == "B2G")});
if (this.curBrowser.newSession) {
this.sendResponse(reg);
}
let browserType;
try {
browserType = message.target.getAttribute("type");
} catch (ex) {
// browserType remains undefined.
}
let reg;
if (!browserType || browserType != "content") {
reg = this.curBrowser.register(message.json.value, message.json.href);
}
this.curBrowser.elementManager.seenItems[reg] = frameObject; //add to seenItems
if (nullPrevious && (this.curBrowser.curFrameId != null)) {
this.sendAsync("newSession", {B2G: (appName == "B2G")});
if (this.curBrowser.newSession) {
this.sendResponse(reg);
}
}
return reg;
Expand Down
2 changes: 1 addition & 1 deletion testing/marionette/marionette-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ElementManager.prototype = {
*/
addToKnownElements: function EM_addToKnownElements(element) {
for (let i in this.seenItems) {
if (this.seenItems[i] == element) {
if (XPCNativeWrapper(this.seenItems[i]) == XPCNativeWrapper(element)) {
return i;
}
}
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions toolkit/devtools/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ PARALLEL_DIRS += \
sourcemap \
$(NULL)

EXTRA_JS_MODULES = \
Require.jsm \
$(NULL)

include $(topsrcdir)/config/rules.mk

libs::
$(NSINSTALL) $(srcdir)/*.jsm $(FINAL_TARGET)/modules/devtools
2 changes: 1 addition & 1 deletion toolkit/devtools/Require.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const EXPORTED_SYMBOLS = [ "define", "require" ];

const console = (function() {
const tempScope = {};
Components.utils.import("resource:///modules/devtools/Console.jsm", tempScope);
Components.utils.import("resource://gre/modules/devtools/Console.jsm", tempScope);
return tempScope.console;
})();

Expand Down
2 changes: 1 addition & 1 deletion toolkit/devtools/sourcemap/SourceMap.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

var EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ];

Components.utils.import('resource://gre/modules/Require.jsm');
Components.utils.import('resource://gre/modules/devtools/Require.jsm');
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
Expand Down
2 changes: 1 addition & 1 deletion toolkit/devtools/sourcemap/tests/unit/Utils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* https://github.com/mozilla/source-map/
*/

Components.utils.import('resource://gre/modules/Require.jsm');
Components.utils.import('resource://gre/modules/devtools/Require.jsm');
Components.utils.import('resource:///modules/devtools/SourceMap.jsm');

let EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ];
Expand Down

0 comments on commit dd8a479

Please sign in to comment.