Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (78 sloc) 2.77 KB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="../javascripts/libs.js"></script>
<script src="../javascripts/utils.js"></script>
<script src="../javascripts/scanning.js"></script>
<script src="fixtures/privacy-pages.js"></script>
<script src="fixtures/privacy-settings-home.js"></script>
<link rel="stylesheet" href="testsuite.css" type="text/css" media="screen" />
<script>
$(document).ready(function(){
module("Find dropdowns");
test("Detect open settings", function() {
ok(scanningController, "The Scanning Controller should be available");
stop();
scanningController.getInformationDropdownSettings("div.uiSelector", basicDirectoryInfo1, function(value){
equals(value, 3, "Should find at least one 'open' privacy setting");
start();
});
});
test("Detect all closed settings", function() {
ok(scanningController, "The Scanning Controller should be available");
stop();
scanningController.getInformationDropdownSettings("div.uiSelector", basicDirectoryInfo2, function(value){
equals(value, 0, "Should find no 'open' privacy settings");
start();
});
});
module("Find URLs in the privacy settings page");
test("Find URLs - basic", function() {
stop();
getUrlForV2Section('basic', function(url) {
ok(url, "The 'basic' URL shouldn't be empty; was " + url);
ok(/h=12345678901234567890123456789012/.test(url),
"The hash in the URL should be correct");
start();
}, {'test': privacySettingsHTML1});
});
test("Find URLs - custom", function() {
stop();
getUrlForV2Section('custom', function(url) {
ok(url, "The 'custom' URL shouldn't be empty; was " + url);
ok(/h=12345678901234567890123456789012/.test(url),
"The hash in the URL should be correct");
start();
}, {'test': privacySettingsHTML1});
});
module("Photo album privacy settings");
test("getPhotoAlbumSettings", function() {
stop();
scanningController.getPhotoAlbumSettings(function(openAlbums, totalAlbums){
equals(openAlbums, 1, "There is only one open album");
equals(totalAlbums, 1, "There is only one album");
start();
}, photoAlbumPrivacy1);
});
module("Generic privacy settings");
test("getPrivacySettings", function() {
stop();
scanningController.getPrivacySettings(function(openSettings, totalSettings){
equals(openSettings, 1, "There is only one open setting");
equals(totalSettings, 17, "There is only one setting");
start();
}, privacySettings1);
});
});
</script>
</head>
<body>
<script type="text/javascript" src="testrunner.js"></script>
<h1>QUnit test suite</h1>
<h2 id="banner"></h2>
<h2 id="userAgent"></h2>
<ol id="tests"></ol>
<div id="main"></div>
</body>
</html>
You can’t perform that action at this time.