Add: Test pages
This commit is contained in:
@@ -7,6 +7,9 @@ function boot(name)
|
||||
tool: name === 'settings' ? [] : name
|
||||
});
|
||||
eruda.show().get().config.set('displaySize', '50%');
|
||||
|
||||
if (name == null) return;
|
||||
|
||||
loadJs('lib/boot', function ()
|
||||
{
|
||||
loadJs('lib/jasmine-jquery', function ()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Console</title>
|
||||
<link rel="stylesheet" href="lib/jasmine.css">
|
||||
<script src="lib/jquery.js"></script>
|
||||
@@ -11,6 +12,6 @@
|
||||
<script src="boot.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>boot('console');</script>
|
||||
<script>boot('console');</script>
|
||||
</body>
|
||||
</html>
|
||||
17
test/elements.html
Normal file
17
test/elements.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Elements</title>
|
||||
<link rel="stylesheet" href="lib/jasmine.css">
|
||||
<script src="lib/jquery.js"></script>
|
||||
<script src="lib/jasmine.js"></script>
|
||||
<script src="lib/jasmine-html.js"></script>
|
||||
<script src="assets/eruda.js"></script>
|
||||
<script src="boot.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>boot('elements');</script>
|
||||
</body>
|
||||
</html>
|
||||
17
test/features.html
Normal file
17
test/features.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Features</title>
|
||||
<link rel="stylesheet" href="lib/jasmine.css">
|
||||
<script src="lib/jquery.js"></script>
|
||||
<script src="lib/jasmine.js"></script>
|
||||
<script src="lib/jasmine-html.js"></script>
|
||||
<script src="assets/eruda.js"></script>
|
||||
<script src="boot.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>boot('features');</script>
|
||||
</body>
|
||||
</html>
|
||||
0
test/features.js
Normal file
0
test/features.js
Normal file
127
test/index.html
127
test/index.html
@@ -3,90 +3,55 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Eruda</title>
|
||||
<title>Eruda Test Page</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<script src="assets/eruda.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="test-list">
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="test-element" class="border super-long1 super-long2 super-long-class-name" style="color:red">
|
||||
<!-- This is a comment -->
|
||||
<div class="child-one" style="background-image: url(http://7xn2zy.com1.z0.glb.clouddn.com/blog_elf.jpg); color: rgb(255, 80, 0);">One</div>
|
||||
<div class="child-two">Two</div>
|
||||
<a href="https://github.com/liriliri/eruda">GitHub</a>
|
||||
<div class="child-three" style="height: 500px">
|
||||
This is a very long text!
|
||||
This is a very long text!
|
||||
This is a very long text!
|
||||
This is a very long text!
|
||||
This is a very long text!
|
||||
</div>
|
||||
<div class="fixed-footer">This is a footer!</div>
|
||||
<div>
|
||||
<img src="http://7xn2zy.com1.z0.glb.clouddn.com/blog_elf.jpg">
|
||||
</div>
|
||||
</div>
|
||||
<button>Test</button>
|
||||
<button onclick="xxx();">Trigger Error</button>
|
||||
<div style="height: 500px;"></div>
|
||||
<script>
|
||||
function init()
|
||||
{
|
||||
// Test scripts
|
||||
var test = document.getElementById('test-element');
|
||||
test.addEventListener('click', function ()
|
||||
{
|
||||
console.log('test2');
|
||||
}, false);
|
||||
test.addEventListener('click', function ()
|
||||
{
|
||||
console.log('This is something really really cool!!!!! Laaaaaaaaaa!!!!!!!!!!!!!!!');
|
||||
}, true);
|
||||
test.addEventListener('touchstart', function ()
|
||||
{
|
||||
console.log('test3');
|
||||
}, false);
|
||||
function req(url)
|
||||
{
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
||||
xhr.open('GET', url);
|
||||
xhr.send();
|
||||
}
|
||||
setTimeout(function ()
|
||||
{
|
||||
req('webpack-dev-server/test/style.css');
|
||||
}, 1000);
|
||||
setTimeout(function ()
|
||||
{
|
||||
req('webpack-dev-server/test/data.json');
|
||||
}, 2000);
|
||||
setTimeout(function ()
|
||||
{
|
||||
req('webpack-dev-server/test/empty.json');
|
||||
}, 3000);
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType = 'arraybuffer';
|
||||
xhr.open('GET', 'webpack-dev-server/test/data.json');
|
||||
xhr.send();
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
var el = document.createElement('div');
|
||||
document.body.appendChild(el);
|
||||
setTimeout(function ()
|
||||
{
|
||||
eruda.init({container: el});
|
||||
}, 1000);
|
||||
})();
|
||||
</script>
|
||||
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"></script>
|
||||
<script>FastClick.attach(document.body);</script>-->
|
||||
<header>ERUDA TEST PAGE</header>
|
||||
<nav id="test-list">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="console.html">console</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="elements.html">elements</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="network.html">network</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="resources.html">resources</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="sources.html">sources</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="info.html">info</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="snippets.html">snippets</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="features.html">features</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="settings.html">settings</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="manual.html">manual</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<script>
|
||||
(function () {
|
||||
var el = document.createElement('div');
|
||||
document.body.appendChild(el);
|
||||
setTimeout(function () {
|
||||
eruda.init({container: el});
|
||||
eruda.show().get().config.set('displaySize', '50%');
|
||||
}, 1000);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
17
test/info.html
Normal file
17
test/info.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Info</title>
|
||||
<link rel="stylesheet" href="lib/jasmine.css">
|
||||
<script src="lib/jquery.js"></script>
|
||||
<script src="lib/jasmine.js"></script>
|
||||
<script src="lib/jasmine-html.js"></script>
|
||||
<script src="assets/eruda.js"></script>
|
||||
<script src="boot.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>boot('info');</script>
|
||||
</body>
|
||||
</html>
|
||||
0
test/info.js
Normal file
0
test/info.js
Normal file
13
test/manual.html
Normal file
13
test/manual.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Manual</title>
|
||||
<script src="assets/eruda.js"></script>
|
||||
<script src="boot.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>boot();</script>
|
||||
</body>
|
||||
</html>
|
||||
17
test/network.html
Normal file
17
test/network.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Network</title>
|
||||
<link rel="stylesheet" href="lib/jasmine.css">
|
||||
<script src="lib/jquery.js"></script>
|
||||
<script src="lib/jasmine.js"></script>
|
||||
<script src="lib/jasmine-html.js"></script>
|
||||
<script src="assets/eruda.js"></script>
|
||||
<script src="boot.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>boot('network');</script>
|
||||
</body>
|
||||
</html>
|
||||
0
test/network.js
Normal file
0
test/network.js
Normal file
17
test/resources.html
Normal file
17
test/resources.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Resources</title>
|
||||
<link rel="stylesheet" href="lib/jasmine.css">
|
||||
<script src="lib/jquery.js"></script>
|
||||
<script src="lib/jasmine.js"></script>
|
||||
<script src="lib/jasmine-html.js"></script>
|
||||
<script src="assets/eruda.js"></script>
|
||||
<script src="boot.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>boot('resources');</script>
|
||||
</body>
|
||||
</html>
|
||||
0
test/resources.js
Normal file
0
test/resources.js
Normal file
@@ -2,7 +2,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Console</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Settings</title>
|
||||
<link rel="stylesheet" href="lib/jasmine.css">
|
||||
<script src="lib/jquery.js"></script>
|
||||
<script src="lib/jasmine.js"></script>
|
||||
|
||||
17
test/snippets.html
Normal file
17
test/snippets.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Snippets</title>
|
||||
<link rel="stylesheet" href="lib/jasmine.css">
|
||||
<script src="lib/jquery.js"></script>
|
||||
<script src="lib/jasmine.js"></script>
|
||||
<script src="lib/jasmine-html.js"></script>
|
||||
<script src="assets/eruda.js"></script>
|
||||
<script src="boot.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>boot('snippets');</script>
|
||||
</body>
|
||||
</html>
|
||||
0
test/snippets.js
Normal file
0
test/snippets.js
Normal file
17
test/sources.html
Normal file
17
test/sources.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title>Sources</title>
|
||||
<link rel="stylesheet" href="lib/jasmine.css">
|
||||
<script src="lib/jquery.js"></script>
|
||||
<script src="lib/jasmine.js"></script>
|
||||
<script src="lib/jasmine-html.js"></script>
|
||||
<script src="assets/eruda.js"></script>
|
||||
<script src="boot.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>boot('sources');</script>
|
||||
</body>
|
||||
</html>
|
||||
0
test/sources.js
Normal file
0
test/sources.js
Normal file
@@ -1,17 +1,52 @@
|
||||
html {
|
||||
font-size: 46px;
|
||||
body, html {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#test-element {
|
||||
margin: 15px auto;
|
||||
* {
|
||||
font-family: 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica, 'Franklin Gothic Medium', 'Franklin Gothic', 'ITC Franklin Gothic', Arial, sans-serif;
|
||||
}
|
||||
|
||||
header {
|
||||
position: relative;
|
||||
z-index: 15;
|
||||
background: #eda29b;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .05), 0 1px 4px 0 rgba(0, 0, 0, .08), 0 3px 1px -2px rgba(0, 0, 0, .2);
|
||||
font-size: 30px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0,0,0,.05),0 1px 4px 0 rgba(0,0,0,.2), 0 3px 1px -2px rgba(0,0,0,.1);
|
||||
}
|
||||
.border {
|
||||
border: 15px solid #fff;
|
||||
|
||||
nav ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 15px;
|
||||
}
|
||||
.fixed-footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
background: #f2d367;
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
nav ul li:nth-child(4n), nav ul li:nth-child(4n-3) {
|
||||
background: #e17555;
|
||||
}
|
||||
|
||||
nav ul li a {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
padding: 10px;
|
||||
color: #e07556;
|
||||
font-size: 18px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
nav ul li:nth-child(4n) a, nav ul li:nth-child(4n-3) a{
|
||||
color: #9c3c53;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user