Skip to content

Commit

Permalink
giving test files more meaningful names, avoid numbers that change ev…
Browse files Browse the repository at this point in the history
…ery time the test suite is built
  • Loading branch information
Hallvord R. M. Steen committed Dec 5, 2014
1 parent 21fbe35 commit cc3f954
Show file tree
Hide file tree
Showing 180 changed files with 114 additions and 18 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/* Test HTML: <form><input id="input_text" autofocus onfocus="this.select()" value="cut text"></form>*/
/* Targets: 'input_text' */
function clipboard_api_test(e){
setTimeout(function(){
setTimeout(function(){
var elm=document.getElementById('input_text');
var passed = elm.selectionStart === 0 && elm.selectionEnd === 0 && elm.value === '';
result( passed );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/* Test HTML: <form><input id="input_text" autofocus onfocus="this.select()" value="cut text"></form>*/
/* Targets: document 'input_text' */
function clipboard_api_test(e){
return e.target.value === e.target.defaultValue;
return e.target.value === e.target.defaultValue;
}

</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/* Test HTML: <form><input id="input_text" autofocus onfocus="this.select()" value="cut text"></form>*/
/* Targets: document 'input_text' */
function clipboard_api_test(e){
return e.target.value === e.target.defaultValue;
return e.target.value === e.target.defaultValue;
}

</script>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@
sel.removeAllRanges();
sel.addRange(rng);
}
}
function triggerTestManually(eventType){
try{
var ifr=document.getElementById('iframe');
window.afterExecCommand=false;
ifr.contentDocument.execCommand(window.eventType, false, false);
var execSucceeded = ifr.contentDocument.execCommand(eventType, false, false);
window.afterExecCommand=true;
}catch(e){
result('Can not test - exception from execCommand '+e+' (Note: enable clipboard accesss in preferences for '+location.hostname+' before running this test)');
}
if(!execSucceeded){
result('Can not test - exception from execCommand '+e+' (Note: tester may have to enable clipboard accesss in preferences for '+location.hostname+' before running this test)');
}
}catch(e){
result('Can not test - exception from execCommand '+e+' (Note: tester may have to enable clipboard accesss in preferences for '+location.hostname+' before running this test)');
}
}

</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@
sel.removeAllRanges();
sel.addRange(rng);
}
}
function triggerTestManually(eventType){
try{
var ifr=document.getElementById('iframe');
window.afterExecCommand=false;
ifr.contentDocument.execCommand(window.eventType, false, false);
var execSucceeded = ifr.contentDocument.execCommand(eventType, false, false);
window.afterExecCommand=true;
}catch(e){
result('Can not test - exception from execCommand '+e+' (Note: enable clipboard accesss in preferences for '+location.hostname+' before running this test)');
}
if(!execSucceeded){
result('Can not test - exception from execCommand '+e+' (Note: tester may have to enable clipboard accesss in preferences for '+location.hostname+' before running this test)');
}
}catch(e){
result('Can not test - exception from execCommand '+e+' (Note: tester may have to enable clipboard accesss in preferences for '+location.hostname+' before running this test)');
}
}

</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@
sel.removeAllRanges();
sel.addRange(rng);
}
}
function triggerTestManually(eventType){
try{
var ifr=document.getElementById('iframe');
window.afterExecCommand=false;
ifr.contentDocument.execCommand(window.eventType, false, false);
var execSucceeded = ifr.contentDocument.execCommand(eventType, false, false);
window.afterExecCommand=true;
}catch(e){
result('Can not test - exception from execCommand '+e+' (Note: enable clipboard accesss in preferences for '+location.hostname+' before running this test)');
}
if(!execSucceeded){
result('Can not test - exception from execCommand '+e+' (Note: tester may have to enable clipboard accesss in preferences for '+location.hostname+' before running this test)');
}
}catch(e){
result('Can not test - exception from execCommand '+e+' (Note: tester may have to enable clipboard accesss in preferences for '+location.hostname+' before running this test)');
}
}

</script>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<title> ClipboardEvent - integration with execCommand - returns false when not allowed to write to clipboard - copy on document</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/_lib.js"></script>
<script>
/** integration with execCommand - returns false when not allowed to write to clipboard */
/* Events: cut copy */

function clipboard_api_test(e){
assert_unreached('document.execCommand() triggered from non-user-initiated script thread, events should not fire');
}
function onTestSetupReady(eventType){
try{
result(document.execCommand(eventType) === false);
}catch(e){
result('FAILED - exception from document.execCommand() when it was expected to return false');
}
}

</script>
</head>
<body>

<p>FAILED (This TC requires JavaScript enabled)</p>
<form><input id="input_text" autofocus onfocus="this.select()" value="copied text"></form>
<div id="log"></div>
<script>
var dataToPaste='';
var externalPassCondition=null;
var eventTarget=document;
var eventType='copy';
window.onload=function(){
setupTest( eventTarget, eventType, dataToPaste, externalPassCondition );
}
</script>
</body></html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<title> ClipboardEvent - integration with execCommand - returns false when not allowed to write to clipboard - cut on document</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/_lib.js"></script>
<script>
/** integration with execCommand - returns false when not allowed to write to clipboard */
/* Events: cut copy */

function clipboard_api_test(e){
assert_unreached('document.execCommand() triggered from non-user-initiated script thread, events should not fire');
}
function onTestSetupReady(eventType){
try{
result(document.execCommand(eventType) === false);
}catch(e){
result('FAILED - exception from document.execCommand() when it was expected to return false');
}
}

</script>
</head>
<body>

<p>FAILED (This TC requires JavaScript enabled)</p>
<form><input id="input_text" autofocus onfocus="this.select()" value="copied text"></form>
<div id="log"></div>
<script>
var dataToPaste='';
var externalPassCondition=null;
var eventTarget=document;
var eventType='cut';
window.onload=function(){
setupTest( eventTarget, eventType, dataToPaste, externalPassCondition );
}
</script>
</body></html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/* Test HTML: <p>The "copy" menu UI state is enabled on this page even when there is no selection.</p> */
document.onbeforecopy = function(){return false;}
function clipboard_api_test(e){
result('UI test: passes if "copy" menu UI state is enabled');
result('UI test: passes if "copy" menu UI state is enabled');
}

</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/* Test HTML: <p>The "cut" menu UI state is enabled on this page even when there is no editable selection.</p> */
document.onbeforecut = function(){return false;}
function clipboard_api_test(e){
result('UI test: passes if "cut" menu UI state is enabled');
result('UI test: passes if "cut" menu UI state is enabled');
}

</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/* Test HTML: <p>The "paste" menu UI state is enabled on this page even when there is no editable context.</p> */
document.onbeforepaste = function(){return false;}
function clipboard_api_test(e){
result('UI test: passes if "paste" menu UI state is enabled');
result('UI test: passes if "paste" menu UI state is enabled');
}

</script>
Expand Down

0 comments on commit cc3f954

Please sign in to comment.