Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Merging to tip. a=blocking-b7
Browse files Browse the repository at this point in the history
  • Loading branch information
mounirlamouri committed Oct 1, 2010
1 parent d5f1840 commit 01396b7
Show file tree
Hide file tree
Showing 84 changed files with 674 additions and 195 deletions.
3 changes: 0 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ export::
ifdef ENABLE_TESTS
# Additional makefile targets to call automated test suites
include $(topsrcdir)/testing/testsuite-targets.mk
else
# OS X Universal builds will want to call this, so stub it out
package-tests:
endif

include $(topsrcdir)/config/rules.mk
Expand Down
4 changes: 2 additions & 2 deletions accessible/tests/mochitest/events/test_scroll.xul
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
var jar = getJar(rootDir);
if (jar) {
var tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path;
rootDir = "file://" + tmpdir.path + '/';
}
var url = rootDir + "/scroll.html#link1";
var url = rootDir + "scroll.html#link1";
var tabBrowser = document.getElementById("tabBrowser");
tabBrowser.loadURI(url);
}
Expand Down
2 changes: 1 addition & 1 deletion accessible/tests/mochitest/test_value.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}

var rootDir = getRootDirectory(window.location.href);
var href = rootDir.path + "/foo";
var href = rootDir.path + "foo";

// roles that can't live as nsHTMLLinkAccessibles
testValue("aria_menuitem_link", "");
Expand Down
37 changes: 36 additions & 1 deletion browser/base/content/test/browser_bug561636.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function test9()
gBrowser.removeTab(tab, {animate: false});

// Next test
executeSoon(finish);
executeSoon(test10);
});
};

Expand All @@ -372,3 +372,38 @@ function test9()

tab.linkedBrowser.loadURI(uri);
}

/**
* In this test, we check that the author defined error message is shown.
*/
function test10()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input x-moz-errormessage='foo' required id='i'><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();

gInvalidFormPopup.addEventListener("popupshown", function() {
gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

let doc = gBrowser.contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");

checkPopupShow();

is(gInvalidFormPopup.firstChild.nodeValue, "foo",
"The panel should show the author defined error message");

// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab, {animate: false});
executeSoon(finish);
}, false);

tab.linkedBrowser.addEventListener("load", function(aEvent) {
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

gBrowser.contentDocument.getElementById('s').click();
}, true);

gBrowser.selectedTab = tab;
gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}
4 changes: 2 additions & 2 deletions browser/base/content/test/browser_tab_dragdrop2.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function test()
// Now run the tests again and then close C.
// The test results does not matter, all this is just to exercise some code to
// catch assertions or crashes.
var uri = "chrome://mochikit/content/browser/" +
"browser/base/content/test/browser_tab_dragdrop2_frame1.xul";
var chromeroot = getRootDirectory(gTestPath);
var uri = chromeroot + "browser_tab_dragdrop2_frame1.xul";
let window_B = openDialog(location, "_blank", "chrome,all,dialog=no,left=200,top=200,width=200,height=200", uri);
window_B.addEventListener("load", function(aEvent) {
window_B.removeEventListener("load", arguments.callee, false);
Expand Down
4 changes: 2 additions & 2 deletions browser/components/preferences/tests/browser_privacypane_1.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ function test() {
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path;
rootDir = "file://" + tmpdir.path + '/';
}
loader.loadSubScript(rootDir + "/privacypane_tests.js", this);
loader.loadSubScript(rootDir + "privacypane_tests.js", this);

run_test_subset([
test_pane_visibility,
Expand Down
4 changes: 2 additions & 2 deletions browser/components/preferences/tests/browser_privacypane_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ function test() {
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path;
rootDir = "file://" + tmpdir.path + '/';
}
loader.loadSubScript(rootDir + "/privacypane_tests.js", this);
loader.loadSubScript(rootDir + "privacypane_tests.js", this);

run_test_subset([
test_historymode_retention("remember", undefined),
Expand Down
4 changes: 2 additions & 2 deletions browser/components/preferences/tests/browser_privacypane_3.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function test() {
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path;
rootDir = "file://" + tmpdir.path + '/';
}
loader.loadSubScript(rootDir + "/privacypane_tests.js", this);
loader.loadSubScript(rootDir + "privacypane_tests.js", this);

run_test_subset([
test_custom_retention("rememberHistory", "remember"),
Expand Down
4 changes: 2 additions & 2 deletions browser/components/preferences/tests/browser_privacypane_4.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function test() {
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path;
rootDir = "file://" + tmpdir.path + '/';
}
loader.loadSubScript(rootDir + "/privacypane_tests.js", this);
loader.loadSubScript(rootDir + "privacypane_tests.js", this);

run_test_subset([
test_custom_retention("acceptCookies", "remember"),
Expand Down
4 changes: 2 additions & 2 deletions browser/components/preferences/tests/browser_privacypane_5.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function test() {
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path;
rootDir = "file://" + tmpdir.path + '/';
}
loader.loadSubScript(rootDir + "/privacypane_tests.js", this);
loader.loadSubScript(rootDir + "privacypane_tests.js", this);

run_test_subset([
test_locbar_suggestion_retention(-1, undefined),
Expand Down
4 changes: 2 additions & 2 deletions browser/components/preferences/tests/browser_privacypane_6.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function test() {
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path;
rootDir = "file://" + tmpdir.path + '/';
}
loader.loadSubScript(rootDir + "/privacypane_tests.js", this);
loader.loadSubScript(rootDir + "privacypane_tests.js", this);

run_test_subset([
test_privatebrowsing_toggle,
Expand Down
4 changes: 2 additions & 2 deletions browser/components/preferences/tests/browser_privacypane_7.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function test() {
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path;
rootDir = "file://" + tmpdir.path + '/';
}
loader.loadSubScript(rootDir + "/privacypane_tests.js", this);
loader.loadSubScript(rootDir + "privacypane_tests.js", this);

run_test_subset([
test_privatebrowsing_ui,
Expand Down
4 changes: 2 additions & 2 deletions browser/components/preferences/tests/browser_privacypane_8.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ function test() {
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path;
rootDir = "file://" + tmpdir.path + '/';
}
loader.loadSubScript(rootDir + "/privacypane_tests.js", this);
loader.loadSubScript(rootDir + "privacypane_tests.js", this);

run_test_subset([
// history mode should be initialized to remember
Expand Down
4 changes: 2 additions & 2 deletions build/macosx/universal/flight.mk
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ postflight_all:
# A universal .dmg can now be produced by making in either architecture's
# INSTALLER_DIR.
# Now, repeat the process for the test package.
$(MAKE) -C $(OBJDIR_ARCH_1) UNIVERSAL_BINARY= package-tests
$(MAKE) -C $(OBJDIR_ARCH_2) UNIVERSAL_BINARY= package-tests
$(MAKE) -C $(OBJDIR_ARCH_1) UNIVERSAL_BINARY= CHROME_JAR= package-tests
$(MAKE) -C $(OBJDIR_ARCH_2) UNIVERSAL_BINARY= CHROME_JAR= package-tests
rm -rf $(DIST_UNI)/test-package-stage
# automation.py differs because it hardcodes a path to
# dist/bin. It doesn't matter which one we use.
Expand Down
8 changes: 8 additions & 0 deletions build/mobile/sutagent/android/ASMozStub.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,12 @@ public void onDestroy()

System.exit(0);
}

public void SendToDataChannel(String strToSend)
{
if (runDataThrd.isAlive())
{
runDataThrd.SendToDataChannel(strToSend);
}
}
}
8 changes: 7 additions & 1 deletion build/mobile/sutagent/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
android:versionName="1.0" android:sharedUserId="org.mozilla.sharedID">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name=".SUTAgentAndroid"
android:screenOrientation="nosensor"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -25,7 +26,7 @@

</application>

<uses-sdk android:minSdkVersion="5"/>
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="8"/>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Expand Down Expand Up @@ -59,4 +60,9 @@

<uses-permission android:name="android.permission.VIBRATE"></uses-permission>



<uses-permission android:name="android.permission.SET_TIME"></uses-permission>


</manifest>
19 changes: 17 additions & 2 deletions build/mobile/sutagent/android/DataWorkerThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,34 @@ public class DataWorkerThread extends Thread
private RunDataThread theParent = null;
private Socket socket = null;
boolean bListening = true;
PrintWriter out = null;
SimpleDateFormat sdf = null;

public DataWorkerThread(RunDataThread theParent, Socket workerSocket)
{
super("DataWorkerThread");
this.theParent = theParent;
this.socket = workerSocket;
this.sdf = new SimpleDateFormat("yyyyMMdd-HH:mm:ss");
}

public void StopListening()
{
bListening = false;
}

public void SendString(String strToSend)
{
if (this.out != null)
{
Calendar cal = Calendar.getInstance();
String strOut = sdf.format(cal.getTime());
strOut += " " + strToSend + "\r\n";

out.write(strOut);
out.flush();
}
}

private String readLine(BufferedInputStream in)
{
Expand Down Expand Up @@ -135,13 +151,12 @@ public void run()
{
OutputStream cmdOut = socket.getOutputStream();
InputStream cmdIn = socket.getInputStream();
PrintWriter out = new PrintWriter(cmdOut, true);
this.out = new PrintWriter(cmdOut, true);
BufferedInputStream in = new BufferedInputStream(cmdIn);
String inputLine, outputLine;
DoCommand dc = new DoCommand(theParent.svc);

Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd-HH:mm:ss");
sRet = sdf.format(cal.getTime());
sRet += " trace output";

Expand Down
Loading

0 comments on commit 01396b7

Please sign in to comment.