blob: 1590ca9fdb3587f3406d17a7026895882f1c237e [file] [log] [blame]
<html>
<head>
<title>cluster-page-sk demo</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../node_modules/native-promise-only/npo.js"></script>
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<script src="bower_components/page/page.js"></script>
<script src="bower_components/d3/d3.js"></script>
<script src="../common/js/common.js"></script>
<script src="../js/gold.js"></script>
<script src="bower_components/sinonjs/sinon.js"></script>
<script src="testdata.js"></script>
<script>
var server = sinon.fakeServer.create();
server.autoRespond = true;
server.autoRespondAfter = 2000;
server.respondWith("GET", /\/json\/clusterdiff*/, function(request) {
request.respond(200, {"Content-Type":"application/json"},
JSON.stringify(testdata.clusterDiffResult));
});
server.respondWith("GET", /\/json\/diff*/, function(request) {
request.respond(200, {"Content-Type":"application/json"},
JSON.stringify(testdata.diffDigests));
});
server.respondWith("GET", /\/json\/details*/, function(request) {
var ret = {
digest: testdata.fiveSearchResults.digests[0],
commits: testdata.fiveSearchResults.commits
};
request.respond(200, {"Content-Type":"application/json"},
JSON.stringify(ret));
});
server.respondWith("GET", "/json/paramset", function(request) {
request.respond(200, {"Content-Type":"application/json"},
JSON.stringify(testdata.paramSet));
});
</script>
<link rel="import" href="cluster-page-sk.html">
</head>
<body>
<cluster-page-sk></cluster-page-sk>
<script type="text/javascript" charset="utf-8">
var testQuery = "?query=source_type%3Dgm%26name%3Dtextblobmixedsizes&include=false&head=true&unt=true&pos=true&neg=true";
window.history.replaceState(null, null, window.location.pathname + testQuery);
$$$('cluster-page-sk').pageSelected(new page.Context(window.location.pathname + testQuery));
</script>
</body>
</html>