mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1062611 - Test for WebIDE tabs. r=paul
This commit is contained in:
parent
e2529803f2
commit
de792955d8
@ -2,8 +2,8 @@
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
addons/simulators.json
|
||||
doc_tabs.html
|
||||
head.js
|
||||
templates.json
|
||||
|
||||
[browser_tabs.js]
|
||||
skip-if = true # Fails on TBPL, to be fixed in bug 1062611
|
||||
|
@ -2,6 +2,8 @@
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
"use strict";
|
||||
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webide/test/doc_tabs.html";
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
SimpleTest.requestCompleteLog();
|
||||
@ -9,10 +11,14 @@ function test() {
|
||||
Task.spawn(function() {
|
||||
const { DebuggerServer } =
|
||||
Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {});
|
||||
|
||||
// Since we test the connections set below, destroy the server in case it
|
||||
// was left open.
|
||||
DebuggerServer.destroy();
|
||||
DebuggerServer.init(function () { return true; });
|
||||
DebuggerServer.addBrowserActors();
|
||||
|
||||
let tab = yield addTab("about:newtab");
|
||||
let tab = yield addTab(TEST_URI);
|
||||
|
||||
let win = yield openWebIDE();
|
||||
|
||||
@ -23,15 +29,13 @@ function test() {
|
||||
yield selectTabProject(win);
|
||||
|
||||
let project = win.AppManager.selectedProject;
|
||||
is(project.location, "about:newtab", "Location is correct");
|
||||
is(project.name, "New Tab", "Name is correct");
|
||||
is(project.location, TEST_URI, "Location is correct");
|
||||
is(project.name, "example.com: Test Tab", "Name is correct");
|
||||
|
||||
yield closeWebIDE(win);
|
||||
DebuggerServer.destroy();
|
||||
yield removeTab(tab);
|
||||
|
||||
finish();
|
||||
});
|
||||
}).then(finish, handleError);
|
||||
}
|
||||
|
||||
function connectToLocal(win) {
|
||||
|
15
browser/devtools/webide/test/doc_tabs.html
Normal file
15
browser/devtools/webide/test/doc_tabs.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<!doctype html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Test Tab</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Test Tab
|
||||
</body>
|
||||
|
||||
</html>
|
@ -153,3 +153,8 @@ function removeTab(aTab, aWindow) {
|
||||
targetBrowser.removeTab(aTab);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
function handleError(aError) {
|
||||
ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
|
||||
finish();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user