2011-04-13 16:27:15 +00:00
|
|
|
package com.ibm.wala.cast.js.test;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.net.URL;
|
|
|
|
|
|
|
|
import org.junit.Before;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
import com.ibm.wala.cast.js.html.JSSourceExtractor;
|
|
|
|
import com.ibm.wala.cast.js.ipa.callgraph.JSCFABuilder;
|
|
|
|
import com.ibm.wala.ipa.callgraph.CallGraph;
|
|
|
|
import com.ibm.wala.util.CancelException;
|
|
|
|
|
2011-10-31 18:47:14 +00:00
|
|
|
public abstract class TestMozillaBugPages extends TestJSCallGraphShape {
|
2011-04-13 16:27:15 +00:00
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
justThisTest(TestMozillaBugPages.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Before
|
|
|
|
public void config() {
|
2012-01-06 21:20:13 +00:00
|
|
|
JSSourceExtractor.USE_TEMP_NAME = true;
|
2011-04-13 16:27:15 +00:00
|
|
|
JSSourceExtractor.DELETE_UPON_EXIT = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test public void testMozilla439164() throws IOException, IllegalArgumentException, CancelException {
|
|
|
|
URL url = getClass().getClassLoader().getResource("pages/mochitest/mozillaBug439164.html");
|
|
|
|
JSCFABuilder builder = Util.makeHTMLCGBuilder(url);
|
|
|
|
CallGraph CG = builder.makeCallGraph(builder.getOptions());
|
2011-04-28 19:08:06 +00:00
|
|
|
Util.dumpCG(builder.getPointerAnalysis(), CG);
|
2011-04-13 16:27:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test public void testMozilla488233() throws IOException, IllegalArgumentException, CancelException {
|
2011-04-20 20:55:57 +00:00
|
|
|
URL url = getClass().getClassLoader().getResource("pages/mochitest/mozillaBug488233NoExtJS.html");
|
2011-04-13 16:27:15 +00:00
|
|
|
JSCFABuilder builder = Util.makeHTMLCGBuilder(url);
|
|
|
|
CallGraph CG = builder.makeCallGraph(builder.getOptions());
|
2011-04-28 19:08:06 +00:00
|
|
|
Util.dumpCG(builder.getPointerAnalysis(), CG);
|
2011-04-13 16:27:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test public void testMozilla490152() throws IOException, IllegalArgumentException, CancelException {
|
2011-04-20 20:55:57 +00:00
|
|
|
URL url = getClass().getClassLoader().getResource("pages/mochitest/mozillaBug490152NoExtJS.html");
|
2011-04-13 16:27:15 +00:00
|
|
|
JSCFABuilder builder = Util.makeHTMLCGBuilder(url);
|
|
|
|
CallGraph CG = builder.makeCallGraph(builder.getOptions());
|
2011-04-28 19:08:06 +00:00
|
|
|
Util.dumpCG(builder.getPointerAnalysis(), CG);
|
2011-04-13 16:27:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test public void testMozilla625562() throws IOException, IllegalArgumentException, CancelException {
|
2011-04-20 20:55:57 +00:00
|
|
|
URL url = getClass().getClassLoader().getResource("pages/mochitest/mozillaBug625562NoExtJS.html");
|
2011-04-13 16:27:15 +00:00
|
|
|
JSCFABuilder builder = Util.makeHTMLCGBuilder(url);
|
|
|
|
CallGraph CG = builder.makeCallGraph(builder.getOptions());
|
2011-04-28 19:08:06 +00:00
|
|
|
Util.dumpCG(builder.getPointerAnalysis(), CG);
|
2011-04-13 16:27:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|