3
<title>require.js: Simple Bad Base Test</title>
4
<base href="http://some.example.com/path/" />
5
<script type="text/javascript" src="http://127.0.0.1/requirejs/requirejs/require.js"></script>
6
<script type="text/javascript" src="http://127.0.0.1/requirejs/requirejs/tests/doh/runner.js"></script>
7
<script type="text/javascript" src="http://127.0.0.1/requirejs/requirejs/tests/doh/_browserRunner.js"></script>
8
<script type="text/javascript">
10
baseUrl: "http://127.0.0.1/requirejs/requirejs/tests/"
12
["require", "simple", "dimple", "func"],
13
function(require, simple, dimple, func) {
18
t.is("blue", simple.color);
19
t.is("dimple-blue", dimple.color);
20
t.is("You called a function", func());
28
<script type="text/javascript">
29
//This test is only in the HTML since it uses an URL for a require
30
//argument. It will not work well in say, the Rhino tests.
31
var path = location.href.replace(/simple-badbase\.html$/, "foo"),
32
index = path.indexOf(":"),
33
noProtocolPath = path.substring(index + 1, path.length).replace(/foo/, "bar");
35
require([path, noProtocolPath], function() {
40
t.is("foo", foo.name);
41
t.is("bar", bar.name);
51
<h1>require.js: Simple Test</h1>
52
<p>You may need to change the IP address used for this test for it to work correctly.</p>
53
<p>Check console for messages</p>