test: drop now-empty remote runner (#35343)
* test: drop the now-empty remote runner from CI * move fixtures to spec-main * remove remote runner * fix stuff * remove global-paths hack * move ts-smoke to spec/ * fix test after merge * rename spec-main to spec * no need to ignore spec/node_modules twice * simplify spec-runner a little * no need to hash pj/yl twice * undo lint change to verify-mksnapshot.py * excessive .. * update electron_woa_testing.yml * don't search for test-results-remote.xml it is never produced now
This commit is contained in:
parent
e87c4015fe
commit
db7c92fd57
327 changed files with 950 additions and 1707 deletions
10
spec/fixtures/devtools-extensions/foo/_locales/en/messages.json
vendored
Normal file
10
spec/fixtures/devtools-extensions/foo/_locales/en/messages.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"foo": {
|
||||
"message": "foo - $BAZ$ ($2)",
|
||||
"placeholders": {
|
||||
"baz": {
|
||||
"content": "$1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
2
spec/fixtures/devtools-extensions/foo/devtools.js
vendored
Normal file
2
spec/fixtures/devtools-extensions/foo/devtools.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/* global chrome */
|
||||
chrome.devtools.panels.create('Foo', 'foo.png', 'index.html');
|
8
spec/fixtures/devtools-extensions/foo/foo.html
vendored
Normal file
8
spec/fixtures/devtools-extensions/foo/foo.html
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>foo</title>
|
||||
<script src="devtools.js"></script>
|
||||
</head>
|
||||
</html>
|
11
spec/fixtures/devtools-extensions/foo/index.html
vendored
Normal file
11
spec/fixtures/devtools-extensions/foo/index.html
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<script src="panel.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
a custom devtools extension
|
||||
</body>
|
||||
</html>
|
10
spec/fixtures/devtools-extensions/foo/manifest.json
vendored
Normal file
10
spec/fixtures/devtools-extensions/foo/manifest.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "foo",
|
||||
"permissions": [
|
||||
"storage"
|
||||
],
|
||||
"version": "1.0",
|
||||
"devtools_page": "foo.html",
|
||||
"default_locale": "en"
|
||||
}
|
79
spec/fixtures/devtools-extensions/foo/panel.js
vendored
Normal file
79
spec/fixtures/devtools-extensions/foo/panel.js
vendored
Normal file
|
@ -0,0 +1,79 @@
|
|||
/* global chrome */
|
||||
function testStorageClear (callback) {
|
||||
chrome.storage.sync.clear(function () {
|
||||
chrome.storage.sync.get(null, function (syncItems) {
|
||||
chrome.storage.local.clear(function () {
|
||||
chrome.storage.local.get(null, function (localItems) {
|
||||
callback(syncItems, localItems);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testStorageRemove (callback) {
|
||||
chrome.storage.sync.remove('bar', function () {
|
||||
chrome.storage.sync.get({ foo: 'baz' }, function (syncItems) {
|
||||
chrome.storage.local.remove(['hello'], function () {
|
||||
chrome.storage.local.get(null, function (localItems) {
|
||||
callback(syncItems, localItems);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testStorageSet (callback) {
|
||||
chrome.storage.sync.set({ foo: 'bar', bar: 'foo' }, function () {
|
||||
chrome.storage.sync.get({ foo: 'baz', bar: 'fooo' }, function (syncItems) {
|
||||
chrome.storage.local.set({ hello: 'world', world: 'hello' }, function () {
|
||||
chrome.storage.local.get(null, function (localItems) {
|
||||
callback(syncItems, localItems);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testStorage (callback) {
|
||||
testStorageSet(function (syncForSet, localForSet) {
|
||||
testStorageRemove(function (syncForRemove, localForRemove) {
|
||||
testStorageClear(function (syncForClear, localForClear) {
|
||||
callback(
|
||||
syncForSet, localForSet,
|
||||
syncForRemove, localForRemove,
|
||||
syncForClear, localForClear
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
testStorage(function (
|
||||
syncForSet, localForSet,
|
||||
syncForRemove, localForRemove,
|
||||
syncForClear, localForClear
|
||||
) {
|
||||
setTimeout(() => {
|
||||
const message = JSON.stringify({
|
||||
runtimeId: chrome.runtime.id,
|
||||
tabId: chrome.devtools.inspectedWindow.tabId,
|
||||
i18nString: chrome.i18n.getMessage('foo', ['bar', 'baz']),
|
||||
storageItems: {
|
||||
local: {
|
||||
set: localForSet,
|
||||
remove: localForRemove,
|
||||
clear: localForClear
|
||||
},
|
||||
sync: {
|
||||
set: syncForSet,
|
||||
remove: syncForRemove,
|
||||
clear: syncForClear
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const sendMessage = `require('electron').ipcRenderer.send('answer', ${message})`;
|
||||
window.chrome.devtools.inspectedWindow.eval(sendMessage, function () {});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue