Skip to content

Instantly share code, notes, and snippets.

View mihaisucan's full-sized avatar

Mihai Sucan mihaisucan

View GitHub Profile
mochitest call activateHUDForContext(tab)
activateHUDForContext panel12874287978081
registerActiveContext panel12874287978081
windowInitializer hud_panel1287428796112
canActivateContext panel1287428796112
returns false
windowInitializer stops, doesn't open the console
// static
nsresult
XPCConvert::JSErrorToXPCException(XPCCallContext& ccx,
const char* message,
const char* ifaceName,
const char* methodName,
const JSErrorReport* report,
nsIException** exceptn)
{
nsresult rv = NS_ERROR_FAILURE;
void
DOMWorkerErrorReporter(JSContext* aCx,
const char* aMessage,
JSErrorReport* aReport)
{
NS_ASSERTION(!NS_IsMainThread(), "Huh?!");
nsDOMWorker* worker = (nsDOMWorker*)JS_GetContextPrivate(aCx);
if (worker->IsCanceled()) {
diff --git a/toolkit/components/console/hudservice/HUDService.jsm b/toolkit/components/console/hudservice/HUDService.jsm
--- a/toolkit/components/console/hudservice/HUDService.jsm
+++ b/toolkit/components/console/hudservice/HUDService.jsm
@@ -1679,32 +1679,64 @@ HUD_SERVICE.prototype =
*/
adjustVisibilityForMessageType:
function HS_adjustVisibilityForMessageType(aHUDId, aMessageType, aState)
{
let displayNode = this.getOutputNodeById(aHUDId);
let outputNode = displayNode.querySelector(".hud-output-node");
@import "test2.css";
.foobar { color: blue }
@media screen {
.foobar {
border: 1px solid green;
text-align: error;
-whatever: test;
<!DOCTYPE html>
<html>
<body>
<p><button>click!</button></p>
<script type="text/javascript"><!--
(function () {
var btn = document.querySelector('button');
btn.addEventListener('click', function() {
console.log("button clicked");
}, false);
@mihaisucan
mihaisucan / dryice-build-script.js
Created January 7, 2011 21:18
imaginary build script
var dryice = require("dryice");
var Step = require("step");
var build;
var script;
var appFolder = "/path/to/the/webapp";
var buildFolder = "/path/to/the/target/build/folder";
// filters should also be allowed to be async. they can call onReady() when they are done, if they return undefined.
function myCustomFilter(data, filename, onReady, script) {
#!/bin/bash
if [[ "$1" == "-dbg" ]]
then
OBJ_DIR="ff-dbg-obj"
TEST_FILE="$2"
else
OBJ_DIR="ff-obj"
TEST_FILE="$1"
fi
#!/bin/bash
# $Author: Mihai Sucan <mihai.sucan@gmail.com>$
# $Date: 2011-05-02 21:10:35 $
# usage:
# moztests -hud
# runs the HUDService tests
# moztests -ws
# runs the Workspace tests
@mihaisucan
mihaisucan / test.css
Created August 2, 2011 19:46
devtools "stress" test :)
@import "test2.css";
.foobar { color: blue }
@media screen {
.foobar {
border: 1px solid green;
text-align: error;
-whatever: test;