Bug 663778 - Tests: Charsets to utf-8 r=jwalker

This commit is contained in:
Michael Ratcliffe 2014-03-12 14:00:13 +00:00
parent d3a9fcdf6b
commit 64701bba07
23 changed files with 24 additions and 26 deletions

View File

@ -46,6 +46,6 @@ function test()
waitForFocus(createDocument, content);
}, true);
content.location = "data:text/html,basic domplate tests";
content.location = "data:text/html;charset=utf-8,domplate_test.js";
}

View File

@ -18,7 +18,7 @@ function test() {
waitForFocus(setupTest, content);
}, true);
content.location = "data:text/html,<h1>foo</h1><h2>bar</h2>";
content.location = "data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>";
function setupTest() {
openInspector((aInspector, aToolbox) => {
@ -29,8 +29,7 @@ function test() {
});
}
function runTests(aInspector) {
getHighlighterOutline().setAttribute("disable-transitions", "true");
function runTests() {
Task.spawn(function() {
yield hoverH1InMarkupView();
yield assertH1Highlighted();

View File

@ -52,7 +52,8 @@ function test()
waitForFocus(setupTest, content);
}, true);
content.location = "http://mochi.test:8888/browser/browser/devtools/inspector/test/browser_inspector_bug_650804_search.html";
content.location = "http://mochi.test:8888/browser/browser/devtools/" +
"inspector/test/browser_inspector_bug_650804_search.html";
function $(id) {
if (id == null) return null;

View File

@ -50,7 +50,6 @@ function test()
inspector = aInspector;
// Make sure the highlighter is shown so we can disable transitions
inspector.toolbox.highlighter.showBoxModel(getNodeFront(doc.body)).then(() => {
getHighlighterOutline().setAttribute("disable-transitions", "true");
runTests();
});
});

View File

@ -78,6 +78,7 @@ function test() {
waitForFocus(startTest, content);
}, true);
content.location = "data:text/html,<p>bug 699308 - test iframe navigation" +
"<iframe src='data:text/html,hello world'></iframe>";
content.location = "data:text/html;charset=utf-8," +
"<p>bug 699308 - test iframe navigation</p>" +
"<iframe src='data:text/html;charset=utf-8,hello world'></iframe>";
}

View File

@ -77,7 +77,6 @@ function prepareHighlighter() {
let deferred = promise.defer();
inspector.selection.setNode(doc.querySelector("p"), null);
inspector.once("inspector-updated", () => {
getHighlighterOutline().setAttribute("disable-transitions", "true");
deferred.resolve();
});
return deferred.promise;

View File

@ -150,5 +150,5 @@ function test() {
waitForFocus(createDocument, content);
}, true);
content.location = "data:text/html,basic tests for inspector";
content.location = "data:text/html;charset=utf-8,browser_inspector_changes.js";
}

View File

@ -51,7 +51,6 @@ function createDocument() {
inspector = aInspector;
inspector.selection.setNode(div, null);
inspector.once("inspector-updated", () => {
getHighlighterOutline().setAttribute("disable-transitions", "true");
inspector.toolbox.highlighterUtils.startPicker().then(testMouseOverH1Highlights);
});
});
@ -127,5 +126,5 @@ function test() {
waitForFocus(createDocument, content);
}, true);
content.location = "data:text/html,basic tests for inspector";
content.location = "data:text/html;charset=utf-8,browser_inspector_highlighter.js";
}

View File

@ -31,6 +31,7 @@ function createDocument() {
div2 = iframe2.contentDocument.createElement('div');
div2.textContent = 'nested div';
iframe2.contentDocument.body.appendChild(div2);
// Open the inspector, start the picker mode, and start the tests
openInspector(aInspector => {
inspector = aInspector;

View File

@ -137,5 +137,5 @@ function test()
waitForFocus(createDocument, content);
}, true);
content.location = "data:text/html,basic tests for inspector";
content.location = "data:text/html;charset=utf-8,browser_inspector_initialization.js";
}

View File

@ -49,5 +49,5 @@ function test() {
waitForFocus(createDocument, content);
}, true);
content.location = "data:text/html,basic tests for inspector";
content.location = "data:text/html;charset=utf-8,browser_inspector_invalidate.js";
}

View File

@ -67,5 +67,5 @@ function test()
waitForFocus(createDocument, content);
}, true);
content.location = "data:text/html,basic tests for inspector";
content.location = "data:text/html;charset=utf-8,browser_inspector_sidebarstate.js";
}

View File

@ -106,6 +106,6 @@ function test()
waitForFocus(createDocument, content);
}, true);
content.location = "data:text/html,basic tests for inspector";
content.location = "data:text/html;charset=utf-8,browser_inspector_tree_height.js";
}

View File

@ -28,7 +28,7 @@ let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/"));
Services.scriptloader.loadSubScript(testDir + "../../../commandline/test/helpers.js", this);
SimpleTest.registerCleanupFunction(() => {
console.error("Here we are\n")
console.error("Here we are\n");
let {DebuggerServer} = Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {});
console.error("DebuggerServer open connections: " + Object.getOwnPropertyNames(DebuggerServer._connections).length);

View File

@ -15,7 +15,7 @@ function test() {
waitForFocus(startTests, content);
}, true);
content.location = "data:text/html,<p>Select me!</p>";
content.location = "data:text/html;charset=utf-8,<p>Select me!</p>";
}
function startTests(aInspector, aToolbox) {

View File

@ -15,7 +15,7 @@ function test() {
waitForFocus(startTests, content);
}, true);
content.location = "data:text/html,<p>It's going to be legen....</p>";
content.location = "data:text/html;charset=utf-8,<p>It's going to be legen....</p>";
}
function startTests(aInspector, aToolbox) {

View File

@ -112,5 +112,5 @@ function test()
waitForFocus(() => openRuleView(simpleInherit), content);
}, true);
content.location = "data:text/html,basic style inspector tests";
content.location = "data:text/html;charset=utf-8,browser_inspector_changes.js";
}

View File

@ -83,5 +83,5 @@ function test()
waitForFocus(() => openRuleView(simpleOverride), content);
}, true);
content.location = "data:text/html,basic style inspector tests";
content.location = "data:text/html;charset=utf-8,browser_ruleview_manipulation.js";
}

View File

@ -178,5 +178,5 @@ function test()
waitForFocus(() => openRuleView(simpleOverride), content);
}, true);
content.location = "data:text/html,basic style inspector tests";
content.location = "data:text/html;charset=utf-8,browser_ruleview_override.js";
}

View File

@ -248,5 +248,5 @@ function test()
waitForFocus(() => openRuleView(startTest), content);
}, true);
content.location = "data:text/html,basic style inspector tests";
content.location = "data:text/html;charset=utf-8,browser_ruleview_ui.js";
}

View File

@ -189,5 +189,5 @@ function test()
waitForFocus(() => openRuleView(startTest), content);
}, true);
content.location = "data:text/html,basic style inspector tests";
content.location = "data:text/html;charset=utf-8,browser_ruleview_update.js";
}

View File

@ -153,7 +153,6 @@ let inputTests = [
];
function test() {
addTab(TEST_URI);
browser.addEventListener("load", function onLoad() {
browser.removeEventListener("load", onLoad, true);

View File

@ -28,7 +28,7 @@ function testViewSource(hud) {
EventUtils.sendMouseEvent({ type: "click" }, button, content);
openDebugger().then(({panelWin: { DebuggerView }}) => {
info("debugger openeed");
info("debugger opened");
Sources = DebuggerView.Sources;
openConsole(null, (hud) => {
info("console opened again");