Remove unused manual test pages

pull/2779/head
Alex Dima 3 years ago
parent 2d6b5590c7
commit d33ec7c209
No known key found for this signature in database
GPG Key ID: 39563C1504FDD0C9

@ -6,8 +6,6 @@
</head>
<body>
Jump to:
<a class="loading-opts" href="./smoketest.html">[SMOKETEST]</a>
&#160;|&#160;
<a class="loading-opts" href="./playground.generated/index.html">[PLAYGROUND]</a>
&#160;|&#160;
<a class="loading-opts" href="./mouse-fixed.html">[fixed element]</a>

File diff suppressed because one or more lines are too long

@ -1,25 +0,0 @@
define(['vs/base/common/severity'], function (severity) {
'use strict';
function ValidateParticipant() {}
ValidateParticipant.ID = 'doc.validateParticipant';
ValidateParticipant.prototype.validate = function (mirrorModel, markerService) {
var marker = {
severity: severity.Error,
message: [
{ isText: true, text: '\u2188 ' },
{ tagName: 'span', style: 'color:red', text: 'I AM' },
{ isText: true, text: ' A VALIDATION PARTICIPANT \u2188' }
],
startLineNumber: 1,
startColumn: 1,
endLineNumber: 1,
endColumn: 3
};
markerService.changeOne(ValidateParticipant.ID, mirrorModel.getAssociatedResource(), [marker]);
};
return {
ValidateParticipant: ValidateParticipant
};
});

@ -1,39 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style>
#errors {
position: fixed;
top: 0;
right: 0;
font-size: 20px;
width: 100px;
height: 100px;
}
body {
height: 100%;
}
#editor {
float: left;
width: 1250px;
}
</style>
</head>
<body>
<h2>Smoke Test</h2>
<div id="control"></div>
<div id="editor"></div>
<div id="errors"></div>
<div style="clear: both"></div>
<script src="../../metadata.js"></script>
<script src="dev-setup.js"></script>
<script>
loadEditor(function () {
require(['./smoketest'], function () {});
});
</script>
</body>
</html>

@ -1,145 +0,0 @@
/// <reference path="../../node_modules/monaco-editor-core/monaco.d.ts" />
define(['./samples-all.generated'], function (ALL_SAMPLES) {
var XHR_SAMPLES = {};
ALL_SAMPLES.forEach(function (sample) {
XHR_SAMPLES[sample.name] = sample.content;
});
var actions = (function () {
'use strict';
return [
{
name: 'Undo',
run: function (editor) {
editor.trigger('keyboard', monaco.editor.Handler.Undo);
}
},
{
name: 'type & suggest',
run: function (editor) {
editor.setPosition({
lineNumber: 1,
column: 1
});
var firstChar = editor.getModel().getLineContent(1).charAt(0);
editor.trigger('keyboard', monaco.editor.Handler.CursorEnd);
editor.trigger('keyboard', monaco.editor.Handler.Type, {
text: '\n' + firstChar
});
editor.focus();
editor.trigger('test', 'editor.action.triggerSuggest');
}
},
{
name: 'links',
run: function (editor) {
editor.setPosition({
lineNumber: 1,
column: 1
});
var commentsSupport = editor.getModel().getMode().commentsSupport;
var text = 'http://www.test.com';
if (commentsSupport) {
var commentsConfig = commentsSupport.getCommentsConfiguration();
if (commentsConfig && commentsConfig.lineCommentTokens) {
text = commentsConfig.lineCommentTokens[0] + ' ' + text;
} else if (commentsConfig && commentsConfig.blockCommentStartToken) {
text =
commentsConfig.blockCommentStartToken +
' ' +
text +
' ' +
commentsConfig.blockCommentEndToken;
}
}
editor.trigger('keyboard', monaco.editor.Handler.Type, {
text: text + '\n'
});
}
},
{
name: 'multicursor',
run: function (editor) {
editor.setPosition({
lineNumber: 1,
column: 1
});
editor.trigger('keyboard', monaco.editor.Handler.AddCursorDown);
editor.trigger('keyboard', monaco.editor.Handler.AddCursorDown);
editor.trigger('keyboard', monaco.editor.Handler.AddCursorDown);
editor.trigger('keyboard', monaco.editor.Handler.AddCursorDown);
editor.trigger('keyboard', monaco.editor.Handler.AddCursorDown);
editor.trigger('keyboard', monaco.editor.Handler.Type, {
text: 'some text - '
});
}
}
];
})();
var panelContainer = document.getElementById('control');
var editorContainer = document.getElementById('editor');
var editors = {},
models = {};
function onError(err) {
console.error(err);
alert('error!!');
}
function getAllModes() {
var result = monaco.languages.getLanguages().map(function (language) {
return language.id;
});
result.sort();
return result;
}
function createEditor(container, mode) {
editors[mode] = monaco.editor.create(container, {
value: mode
});
var value = mode + '\n' + XHR_SAMPLES['sample.' + mode + '.txt'];
var model = monaco.editor.createModel(value, mode);
editors[mode].setModel(model);
}
function createEditors(modes) {
for (var i = 0; i < modes.length; i++) {
var container = document.createElement('div');
container.style.width = '300px';
container.style.cssFloat = 'left';
container.style.height = '200px';
container.style.border = '1px solid #ccc';
container.style.background = 'red';
container.setAttribute('data-mime', modes[i]);
editorContainer.appendChild(container);
createEditor(container, modes[i]);
}
var clearer = document.createElement('div');
clearer.style.clear = 'both';
editorContainer.appendChild(clearer);
}
function executeAction(action) {
for (var mime in editors) {
if (editors.hasOwnProperty(mime)) {
action(editors[mime]);
}
}
}
function createActions(actions) {
for (var i = 0; i < actions.length; i++) {
var btn = document.createElement('button');
btn.appendChild(document.createTextNode('<<' + actions[i].name + '>>'));
btn.onclick = executeAction.bind(this, actions[i].run);
panelContainer.appendChild(btn);
}
}
createEditors(getAllModes());
createActions(actions);
});
Loading…
Cancel
Save