diff --git a/tools/testing/__init__.py b/tools/testing/__init__.py deleted file mode 100644 index 4df76e2d64e..00000000000 --- a/tools/testing/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. - - -import test_runner -import utils - - -# Constants used for test outcomes -SKIP = 'skip' -FAIL = 'fail' -PASS = 'pass' -OKAY = 'okay' -TIMEOUT = 'timeout' -CRASH = 'crash' -SLOW = 'slow' - -HOST_CPUS = utils.GuessCpus() -USE_DEFAULT_CPUS = -1 diff --git a/tools/testing/browser_README.txt b/tools/testing/browser_README.txt deleted file mode 100644 index 2ec2f3562a8..00000000000 --- a/tools/testing/browser_README.txt +++ /dev/null @@ -1,29 +0,0 @@ -Overview: - These are the instructions to run a wide variety of browser tests using - test.dart or dart/tools/testing/perf_testing/run_perf_tests.py. Currently - the results of run_perf_tests are uploaded to - https://dartperf.googleplex.com/. - -========= General Browser Setup ========== - -See instructions on: -https://code.google.com/p/dart/wiki/BrowserTestSetup - -========= Proceed further only if you also want to run performance tests.====== - -1) Pull down benchmarks from internal repo (Google only): goto/dartbrowsersetup - -2) Create a directory in called appengine-python in third_party. Download the - Linux/Other Platforms .zip file, and place the contents in the directory - you just created. - http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Python - -3) Run the tests! While standing in dart/tools/testing/perf_testing, run - $> python run_perf_tests.py --forever --verbose - to run all the tests (browser performance, language correctness in the - browser, command line performance, and self-hosted compile time and compiled - code size). - - You can run individual tests by adding the particular option (such as - --language) when running create_graph.py. Type "create_graph.py -h" for a - full list of the options. diff --git a/tools/testing/extensions/chrome/ConsoleCollector.crx b/tools/testing/extensions/chrome/ConsoleCollector.crx deleted file mode 100644 index f853917fb99..00000000000 Binary files a/tools/testing/extensions/chrome/ConsoleCollector.crx and /dev/null differ diff --git a/tools/testing/extensions/chrome/ConsoleCollector/background.js b/tools/testing/extensions/chrome/ConsoleCollector/background.js deleted file mode 100644 index 21ae5775e7c..00000000000 --- a/tools/testing/extensions/chrome/ConsoleCollector/background.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/** - * This is the background window. It can access the necessary APIs to get - * at the console messages. It can only communicate with the content - * window through message passing. - * - * There is no way to query the console messages, as such, but we can - * set up a handler that is called when there are console messages. This - * will be called with any console messages already present, so it can be set - * up after the fact. However, if there are no messages it won't be called. - * To handle the end of the messages (or no messages) we have to use a - * sentinel message that is logged by the content page. - */ -var version = "1.0"; -var messages = []; // An array that we can put messages in. -var debuggeeId; // An object that identifies the browser tab we are talking to. -var callback; // For passing back the response to the content window. -var timer; // To time out if no messages are available. - -/** - * When we have collected all the messages, we send them back to the - * content page via the callback, turn off message collection, and - * detach the debugger from the browser tab. - */ -function allDone() { - callback(messages); - chrome.debugger.sendCommand(debuggeeId, "Console.clearMessages", {}, - function() { - chrome.debugger.sendCommand(debuggeeId, "Console.disable", {}, - function() {}); - chrome.debugger.detach(debuggeeId, function() {}); - }); - messages = []; -} - -/** - * Debugger event handler. We only care about console.messageAdded - * events, in which case we add a new message object with the fields - * we care about to our messages array. - */ -function onEvent(debuggeeId, method, params) { - var tabId = debuggeeId.tabId; - if (method == "Console.messageAdded") { - var msg = params.message; - // More fields are available if we want them later. See - // https://developers.google.com/chrome-developer-tools/docs/protocol/1.0/console#type-ConsoleMessage - if (msg.text == 'getMessages/end') { - allDone(); - } else { - messages.push({"source":msg.url, "line": msg.line, - "category":msg.source, "message":msg.text }); - } - } -} - -/** - * Handle requests sent by the content script. We save the callback, - * get the window and tab that is currently active, attach the - * debugger to that tab, and then turn on console message event - * handling, which will result in onEvent calls for each console - * message, including the ones that are already present in the console. - */ -function onRequest(request, sender, sendResponse) { - if (request.command == "getMessages") { - callback = sendResponse; - chrome.windows.getCurrent(function(win) { - chrome.tabs.getSelected(win.id, function(tab) { - debuggeeId = {tabId:tab.id}; - chrome.debugger.attach(debuggeeId, version, function() { - if (chrome.extension.lastError) { - // Attach failed; send an empty response. - callback([]); - } else { - chrome.debugger.sendCommand(debuggeeId, "Console.enable", {}, - function() {}); - //timer = setTimeout(allDone, 1000); - } - }); - }); - }); - } -} - -// Set up the general handler for debug events. -chrome.debugger.onEvent.addListener(onEvent); -// Listen for the content script to send a message to the background page. -chrome.extension.onRequest.addListener(onRequest); diff --git a/tools/testing/extensions/chrome/ConsoleCollector/content.js b/tools/testing/extensions/chrome/ConsoleCollector/content.js deleted file mode 100644 index 6339f811224..00000000000 --- a/tools/testing/extensions/chrome/ConsoleCollector/content.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/** - * This is the content page script. This runs in the context of the browser - * page, and communicates with the background page by relaying a getMessages - * request, and the forwarding the messages back to the browser page as a - * gotMessages message. - */ -window.addEventListener("message", function(event) { - if (event.source == window && event.data == "getMessages") { - // Log a special sentinel message to mark the end of the messages. - console.log('getMessages/end'); - chrome.extension.sendRequest({command: "getMessages"}, function(messages) { - window.postMessage({ "type": "gotMessages", "messages" : messages}, "*"); - }); - } -}, false); diff --git a/tools/testing/extensions/chrome/ConsoleCollector/manifest.json b/tools/testing/extensions/chrome/ConsoleCollector/manifest.json deleted file mode 100644 index 6f6b439588a..00000000000 --- a/tools/testing/extensions/chrome/ConsoleCollector/manifest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "Console Collector", - "version": "1.0", - "manifest_version": 2, - "description": "Allow querying of the Javascript console.", - "browser_action": { - "name": "ConsoleCollector" - }, - "background": { - "scripts": ["background.js"], - "persistent": true - }, - "content_scripts": [ - { - "matches": ["http://*/*", "file://*" ], - "js": [ "content.js" ] - } - ], - "permissions": [ - "tabs", "http://*/*", "file://*", "debugger" - ] -} diff --git a/tools/testing/extensions/firefox/ConsoleCollector.xpi b/tools/testing/extensions/firefox/ConsoleCollector.xpi deleted file mode 100644 index 40c261e12fd..00000000000 Binary files a/tools/testing/extensions/firefox/ConsoleCollector.xpi and /dev/null differ diff --git a/tools/testing/extensions/firefox/ConsoleCollector/Makefile b/tools/testing/extensions/firefox/ConsoleCollector/Makefile deleted file mode 100644 index f6c8610e16d..00000000000 --- a/tools/testing/extensions/firefox/ConsoleCollector/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -../ConsoleCollector.xpi: chrome.manifest install.rdf chrome/content/console.js chrome/content/overlay.xul - zip -r ../ConsoleCollector.xpi chrome.manifest install.rdf chrome/content/console.js chrome/content/overlay.xul diff --git a/tools/testing/extensions/firefox/ConsoleCollector/chrome.manifest b/tools/testing/extensions/firefox/ConsoleCollector/chrome.manifest deleted file mode 100644 index 5425ba6bc8b..00000000000 --- a/tools/testing/extensions/firefox/ConsoleCollector/chrome.manifest +++ /dev/null @@ -1,2 +0,0 @@ -content ConsoleCollector chrome/content/ -overlay chrome://browser/content/browser.xul chrome://ConsoleCollector/content/overlay.xul diff --git a/tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js b/tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js deleted file mode 100644 index af46de469f1..00000000000 --- a/tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// This Firefox add-on exposes the Javascript console contents to Javascript -// running in the browser. Once this is installed there will be a new -// window.ConsoleCollector object with read() and clear() functions. - -var ConsoleCollector = {}; - -(function() { - // An array for collecting the messages. - var messages = []; - - // Add a console message to the collection. - this.add = function(message) { - messages.push(message); - }; - - // Read the message collection. As a side effect we clear the message list. - this.read = function(type) { - var rtn = []; - for (var i = 0; i < messages.length; i++) { - var message = messages[i]; - if (message.errorMessage) { - rtn.push({ 'time' : message.timeStamp, - 'source' : message.sourceName, - 'line': message.lineNumber, - 'column': message.columnNumber, - 'category': message.category, - 'message' : message.errorMessage }); - } - } - messages = []; - return rtn; - }; - - // Clear the message list. - this.clear = function() { - messages = []; - }; -}).apply(ConsoleCollector); - -// A Console Listener. -// See https://developer.mozilla.org/en-US/docs/Console_service for -// details. -(function() { - - var consoleService; - - var consoleListener = { - observe: function(e) { - try { - var message = e.QueryInterface(Components.interfaces.nsIScriptError); - ConsoleCollector.add(message); - } catch (exception) { - ConsoleCollector.add(e); - } - }, - - QueryInterface: function (iid) { - if (!iid.equals(Components.interfaces.nsIConsoleListener) && - !iid.equals(Components.interfaces.nsISupports)) { - throw Components.results.NS_ERROR_NO_INTERFACE; - } - return this; - } - }; - - // Start collecting console messages. - function initialize(event) { - consoleService = Components.classes['@mozilla.org/consoleservice;1'] - .getService(Components.interfaces.nsIConsoleService); - if (consoleService) { - consoleService.registerListener(consoleListener); - } - // Add the handler for hooking in to each page's DOM. This handler - // is for each "gBrowser", representing a tab/window. - window.getBrowser().addEventListener("load", onPageLoad, true); - } - - // Stop collecting console messages. - function shutdown(event) { - window.getBrowser().removeEventListener("load", onPageLoad); - consoleService.unregisterListener(consoleListener); - ConsoleCollector.clear(); - } - - // Hook the ConsoleCollector into the DOM as window.ConsoleCollector. - var onPageLoad = function(e) { - var win = e.originalTarget.defaultView; - if (win) { - win.wrappedJSObject.ConsoleCollector = ConsoleCollector; - } - }; - - // Add the handlers to initialize the add-on and shut it down. - // These handlers are for the application as a whole. - window.addEventListener('load', initialize, false); - window.addEventListener('unload', shutdown, false); -}()); - - - diff --git a/tools/testing/extensions/firefox/ConsoleCollector/chrome/content/overlay.xul b/tools/testing/extensions/firefox/ConsoleCollector/chrome/content/overlay.xul deleted file mode 100644 index 21347fb6239..00000000000 --- a/tools/testing/extensions/firefox/ConsoleCollector/chrome/content/overlay.xul +++ /dev/null @@ -1,4 +0,0 @@ - - -