aboutsummaryrefslogtreecommitdiff
path: root/test/resources
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2018-10-03 22:23:57 +0000
committerRuben Rodriguez <ruben@gnu.org>2018-10-03 22:23:57 +0000
commitdcba303f8d172f6748225d2e00f28a44ac13c453 (patch)
treed03607192a35e21a65fe1972f57bc273c53a25bb /test/resources
parent5461a48cbeac01d5f8bc31a10d11ff72a295c7d9 (diff)
parent12bfe0f9fdad5bfea680d897c81319684ee82180 (diff)
Merge #25 `Adding automated test suite`
Diffstat (limited to 'test/resources')
-rw-r--r--test/resources/app-trilicensed.js1
-rw-r--r--test/resources/index.html38
-rw-r--r--test/resources/jquery.js1
-rw-r--r--test/resources/jslicense.html25
-rw-r--r--test/resources/proprietary.js1
-rw-r--r--test/resources/tracker.js1
6 files changed, 67 insertions, 0 deletions
diff --git a/test/resources/app-trilicensed.js b/test/resources/app-trilicensed.js
new file mode 100644
index 0000000..7b2c2ea
--- /dev/null
+++ b/test/resources/app-trilicensed.js
@@ -0,0 +1 @@
+document.write(`<p>Executing ${document.currentScript.src}</p>`);
diff --git a/test/resources/index.html b/test/resources/index.html
new file mode 100644
index 0000000..c5f364c
--- /dev/null
+++ b/test/resources/index.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<!--
+/**
+* GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript.
+*
+* Copyright (C) 2018 Giorgio Maone <giorgio@maone.net>
+*
+* This file is part of GNU LibreJS.
+*
+* GNU LibreJS is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* GNU LibreJS is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>.
+*/
+-->
+<head>
+ <meta charset="utf-8">
+ <title>LibreJS test document</title>
+ <link rel="shortcut icon" type="image/png" href="/icons/librejs.png">
+</head>
+<body>
+<h1>LibreJS test document</h1>
+<a href="jslicense.html" rel="jslicense">JavaScript license information</a>
+<script src="jquery.js"></script>
+<script src="app-trilicensed.js"></script>
+<script src="proprietary.js"></script>
+<script src="tracker.js"></script>
+</body>
+</html>
diff --git a/test/resources/jquery.js b/test/resources/jquery.js
new file mode 100644
index 0000000..7b2c2ea
--- /dev/null
+++ b/test/resources/jquery.js
@@ -0,0 +1 @@
+document.write(`<p>Executing ${document.currentScript.src}</p>`);
diff --git a/test/resources/jslicense.html b/test/resources/jslicense.html
new file mode 100644
index 0000000..0cd0449
--- /dev/null
+++ b/test/resources/jslicense.html
@@ -0,0 +1,25 @@
+<table id="jslicense-labels1">
+<tr>
+<td><a href="jquery.js">Fake jQuery</a></td>
+<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a>
+<td><a href="jquery-1.7.tar.gz">jquery-1.7.tar.gz</a></td>
+</tr>
+<tr>
+<td><a href="app-trilicensed.js">App specific script, tri-licensed (2 free and 1 proprietary license)</a></td>
+<td>
+<a href="magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt">GNU V3</a>
+<br>
+<a href="http://www.jclark.com/xml/copying.txt">Expat</a>
+<br>
+<a href="https://evil.com/someproprietarylicense">Proprietary, optional</a></td>
+</td>
+<td><a href="app-trilicensed.js">app-trilicensed.js</a></td>
+</tr>
+<tr>
+<td><a href="proprietary.js">App specific script, proprietary only</a></td>
+<td>
+<a href="https://evil.com/someproprietarylicense">Proprietary</a></td>
+</td>
+<td><a href="proprietary.js">proprietary.js</a></td>
+</tr>
+</table>
diff --git a/test/resources/proprietary.js b/test/resources/proprietary.js
new file mode 100644
index 0000000..7b2c2ea
--- /dev/null
+++ b/test/resources/proprietary.js
@@ -0,0 +1 @@
+document.write(`<p>Executing ${document.currentScript.src}</p>`);
diff --git a/test/resources/tracker.js b/test/resources/tracker.js
new file mode 100644
index 0000000..7b2c2ea
--- /dev/null
+++ b/test/resources/tracker.js
@@ -0,0 +1 @@
+document.write(`<p>Executing ${document.currentScript.src}</p>`);