Remove the Dromaeo and TodoMVC samples.
No one was maintaining or using these, and they were stale to the point that they were breaking pkgbuild tests because their dependencies weren't compatible with the latest SDK. This also removes tools/testing/perf_testing, which only tested these two samples. R=kevmoo@google.com Review URL: https://codereview.chromium.org/1576153002 .
@@ -9,7 +9,6 @@ args4j - in third_party/args4j
|
||||
bzip2 - in third_party/bzip2
|
||||
Commons IO - in third_party/commons-io
|
||||
Commons Lang in third_party/commons-lang
|
||||
dromaeo - in samples/third_party/dromaeo
|
||||
Eclipse - in third_party/eclipse
|
||||
gsutil - in third_party/gsutil
|
||||
Guava - in third_party/guava
|
||||
|
||||
@@ -2,22 +2,15 @@
|
||||
# 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.
|
||||
|
||||
samples/third_party/dromaeo: Pass, Slow
|
||||
samples/searchable_list: Pass, Slow
|
||||
|
||||
[ $use_repository_packages ]
|
||||
pkg/analyzer: PubGetError
|
||||
samples/third_party/angular_todo: Fail # angular needs to be updated
|
||||
samples/third_party/todomvc_performance: Skip # dependencies are not in the repo
|
||||
|
||||
[ $use_public_packages ]
|
||||
pkg/compiler: SkipByDesign # js_ast is not published
|
||||
samples/third_party/angular_todo: Pass, Slow
|
||||
samples/third_party/todomvc_performance: Pass, Slow
|
||||
|
||||
[ $builder_tag == russian ]
|
||||
samples/third_party/angular_todo: Fail # Issue 16356
|
||||
samples/third_party/dromaeo: Fail # Issue 23760
|
||||
|
||||
[ $use_public_packages && $system == windows ]
|
||||
samples/third_party/todomvc_performance: Fail # Issue 18086
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
build
|
||||
@@ -1,60 +0,0 @@
|
||||
library dromaeo.transformer;
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:barback/barback.dart';
|
||||
|
||||
/// Transformer used by `pub build` and `pub serve` to rewrite dromaeo html
|
||||
/// files to run performance tests.
|
||||
class DromaeoTransformer extends Transformer {
|
||||
|
||||
final BarbackSettings settings;
|
||||
|
||||
DromaeoTransformer.asPlugin(this.settings);
|
||||
|
||||
/// The index.html file and the tests/dom-*-html.html files are the ones we
|
||||
/// apply this transform to.
|
||||
Future<bool> isPrimary(AssetId id) {
|
||||
var reg = new RegExp('(tests/dom-.+-html\.html\$)|(index\.html\$)');
|
||||
return new Future.value(reg.hasMatch(id.path));
|
||||
}
|
||||
|
||||
Future apply(Transform transform) {
|
||||
Asset primaryAsset = transform.primaryInput;
|
||||
AssetId primaryAssetId = primaryAsset.id;
|
||||
|
||||
return primaryAsset.readAsString().then((String fileContents) {
|
||||
var filename = primaryAssetId.toString();
|
||||
var outputFileContents = fileContents;
|
||||
|
||||
if (filename.endsWith('index.html')) {
|
||||
var index = outputFileContents.indexOf(
|
||||
'<script src="packages/browser/dart.js">');
|
||||
outputFileContents = outputFileContents.substring(0, index) +
|
||||
'<script src="packages/browser_controller' +
|
||||
'/perf_test_controller.js"></script>\n' +
|
||||
outputFileContents.substring(index);
|
||||
transform.addOutput(new Asset.fromString(new AssetId.parse(
|
||||
primaryAssetId.toString().replaceAll('.html', '-dart.html')),
|
||||
outputFileContents));
|
||||
}
|
||||
|
||||
outputFileContents = _sourceJsNotDart(outputFileContents);
|
||||
// Rename the script to take the JavaScript source.
|
||||
transform.addOutput(new Asset.fromString(new AssetId.parse(
|
||||
_appendJs(primaryAssetId.toString())),
|
||||
outputFileContents));
|
||||
});
|
||||
}
|
||||
|
||||
String _appendJs(String path) => path.replaceAll('.html', '-js.html');
|
||||
|
||||
/// Given an html file that sources a Dart file, rewrite the html to instead
|
||||
/// source the compiled JavaScript file.
|
||||
String _sourceJsNotDart(String fileContents) {
|
||||
var dartScript = new RegExp(
|
||||
'<script type="application/dart" src="([\\w-]+)\.dart">');
|
||||
var match = dartScript.firstMatch(fileContents);
|
||||
return fileContents.replaceAll(dartScript, '<script type="text/javascript"'
|
||||
' src="${match.group(1)+ ".dart.js"}" defer>');
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
name: dromaeo
|
||||
version: 0.00.1-dev
|
||||
authors: ["Dart Team <misc@dartlang.org>"]
|
||||
homepage: http://www.dartlang.org
|
||||
description: >
|
||||
Dromaeo test suite, written in Dart.
|
||||
dependencies:
|
||||
browser_controller: ">=0.00.1-dev <0.0.2"
|
||||
barback: ">=0.13.0 <0.14.0"
|
||||
browser: ">=0.10.0 <0.10.1"
|
||||
environment:
|
||||
sdk: any
|
||||
transformers:
|
||||
- dromaeo
|
||||
- $dart2js:
|
||||
checked: false
|
||||
minify: true #TODO: How do you minify for Dart, too? The docs say you indent two spaces less...
|
||||
@@ -1,243 +0,0 @@
|
||||
library dromaeo_test;
|
||||
|
||||
import 'dart:html';
|
||||
import 'dart:async';
|
||||
import "dart:convert";
|
||||
import 'dart:math' as Math;
|
||||
import 'dart:js' as js;
|
||||
import 'Suites.dart';
|
||||
|
||||
main() {
|
||||
new Dromaeo().run();
|
||||
}
|
||||
|
||||
class SuiteController {
|
||||
final SuiteDescription _suiteDescription;
|
||||
final IFrameElement _suiteIframe;
|
||||
|
||||
DivElement _element;
|
||||
double _meanProduct;
|
||||
int _nTests;
|
||||
|
||||
SuiteController(this._suiteDescription, this._suiteIframe)
|
||||
: _meanProduct = 1.0,
|
||||
_nTests = 0 {
|
||||
_make();
|
||||
_init();
|
||||
}
|
||||
|
||||
start() {
|
||||
_suiteIframe.contentWindow.postMessage('start', '*');
|
||||
}
|
||||
|
||||
update(String testName, num mean, num error, double percent) {
|
||||
_meanProduct *= mean;
|
||||
_nTests++;
|
||||
|
||||
final meanAsString = mean.toStringAsFixed(2);
|
||||
final errorAsString = error.toStringAsFixed(2);
|
||||
final Element progressDisplay = _element.nextNode.nextNode;
|
||||
progressDisplay.innerHtml =
|
||||
'${progressDisplay.innerHtml}<li><b>${testName}:</b>'
|
||||
'${meanAsString}<small> runs/s ±${errorAsString}%<small></li>';
|
||||
_updateTestPos(percent);
|
||||
}
|
||||
|
||||
_make() {
|
||||
_element = _createDiv('test');
|
||||
// TODO(antonm): add an onclick functionality.
|
||||
_updateTestPos();
|
||||
}
|
||||
|
||||
_updateTestPos([double percent = 1.0]) {
|
||||
String suiteName = _suiteDescription.name;
|
||||
final done = percent >= 100.0;
|
||||
String info = '';
|
||||
if (done) {
|
||||
final parent = _element.parent;
|
||||
parent.attributes['class'] = '${parent.attributes["class"]} done';
|
||||
final mean = Math.pow(_meanProduct, 1.0 / _nTests).toStringAsFixed(2);
|
||||
info = '<span>${mean} runs/s</span>';
|
||||
}
|
||||
_element.innerHtml =
|
||||
'<b>${suiteName}:</b>'
|
||||
'<div class="bar"><div style="width:${percent}%;">${info}</div></div>';
|
||||
}
|
||||
|
||||
_init() {
|
||||
final div = _createDiv('result-item');
|
||||
div.nodes.add(_element);
|
||||
final description = _suiteDescription.description;
|
||||
final originUrl = _suiteDescription.origin.url;
|
||||
final testUrl = '${_suiteDescription.file}';
|
||||
div.innerHtml =
|
||||
'${div.innerHtml}<p>${description}<br/><a href="${originUrl}">Origin</a'
|
||||
'>, <a href="${testUrl}">Source</a>'
|
||||
'<ol class="results"></ol>';
|
||||
// Reread the element, as the previous wrapper get disconnected thanks
|
||||
// to .innerHtml update above.
|
||||
_element = div.nodes[0];
|
||||
|
||||
document.querySelector('#main').nodes.add(div);
|
||||
}
|
||||
|
||||
DivElement _createDiv(String clazz) {
|
||||
final div = new DivElement();
|
||||
div.attributes['class'] = clazz;
|
||||
return div;
|
||||
}
|
||||
}
|
||||
|
||||
class Dromaeo {
|
||||
final List<SuiteController> _suiteControllers;
|
||||
Function _handler;
|
||||
|
||||
Dromaeo()
|
||||
: _suiteControllers = new List<SuiteController>()
|
||||
{
|
||||
_handler = _createHandler();
|
||||
window.onMessage.listen(
|
||||
(MessageEvent event) {
|
||||
try {
|
||||
final response = JSON.decode(event.data);
|
||||
_handler = _handler(response['command'], response['data']);
|
||||
} catch (e, stacktrace) {
|
||||
if (!(e is FormatException &&
|
||||
(event.data.toString().startsWith('unittest') ||
|
||||
event.data.toString().startsWith('dart')))) {
|
||||
// Hack because unittest also uses post messages to communicate.
|
||||
// So the fact that the event.data is not proper json is not
|
||||
// always an error.
|
||||
print('Exception: ${e}: ${stacktrace}');
|
||||
print(event.data);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
run() {
|
||||
// TODO(vsm): Initial page should not run. For now, run all
|
||||
// tests by default.
|
||||
var tags = window.location.search;
|
||||
if (tags.length > 1) {
|
||||
tags = tags.substring(1);
|
||||
} else if (window.navigator.userAgent.contains('(Dart)')) {
|
||||
// TODO(vsm): Update when we change Dart VM detection.
|
||||
tags = 'js|dart&html';
|
||||
} else {
|
||||
tags = 'js|dart2js&html';
|
||||
}
|
||||
|
||||
// TODO(antonm): create Re-run tests href.
|
||||
final Element suiteNameElement = _byId('overview').nodes[0];
|
||||
final category = Suites.getCategory(tags);
|
||||
if (category != null) {
|
||||
suiteNameElement.innerHtml = category;
|
||||
}
|
||||
_css(_byId('tests'), 'display', 'none');
|
||||
for (SuiteDescription suite in Suites.getSuites(tags)) {
|
||||
final iframe = new IFrameElement();
|
||||
_css(iframe, 'height', '1px');
|
||||
_css(iframe, 'width', '1px');
|
||||
iframe.src = '${suite.file}';
|
||||
document.body.nodes.add(iframe);
|
||||
|
||||
_suiteControllers.add(new SuiteController(suite, iframe));
|
||||
}
|
||||
}
|
||||
|
||||
static const double _SECS_PER_TEST = 5.0;
|
||||
|
||||
Function _createHandler() {
|
||||
int suitesLoaded = 0;
|
||||
int totalTests = 0;
|
||||
int currentSuite;
|
||||
double totalTimeSecs, estimatedTimeSecs;
|
||||
|
||||
// TODO(jat): Remove void type below. Bug 5269037.
|
||||
void _updateTime() {
|
||||
final mins = (estimatedTimeSecs / 60).floor();
|
||||
final secs = (estimatedTimeSecs - mins * 60).round();
|
||||
final secsAsString = '${(secs < 10 ? "0" : "")}$secs';
|
||||
_byId('left').innerHtml = '${mins}:${secsAsString}';
|
||||
|
||||
final elapsed = totalTimeSecs - estimatedTimeSecs;
|
||||
final percent = (100 * elapsed / totalTimeSecs).toStringAsFixed(2);
|
||||
_css(_byId('timebar'), 'width', '${percent}%');
|
||||
}
|
||||
|
||||
Function loading, running, done;
|
||||
|
||||
loading = (String command, var data) {
|
||||
assert(command == 'inited');
|
||||
suitesLoaded++;
|
||||
totalTests += data['nTests'];
|
||||
if (suitesLoaded == _suitesTotal) {
|
||||
totalTimeSecs = estimatedTimeSecs = _SECS_PER_TEST * totalTests;
|
||||
_updateTime();
|
||||
currentSuite = 0;
|
||||
_suiteControllers[currentSuite].start();
|
||||
return running;
|
||||
}
|
||||
|
||||
return loading;
|
||||
};
|
||||
|
||||
running = (String command, var data) {
|
||||
switch (command) {
|
||||
case 'result':
|
||||
final testName = data['testName'];
|
||||
final mean = data['mean'];
|
||||
final error = data['error'];
|
||||
final percent = data['percent'];
|
||||
_suiteControllers[currentSuite].update(testName, mean, error, percent);
|
||||
estimatedTimeSecs -= _SECS_PER_TEST;
|
||||
_updateTime();
|
||||
return running;
|
||||
|
||||
case 'over':
|
||||
currentSuite++;
|
||||
if (currentSuite < _suitesTotal) {
|
||||
_suiteControllers[currentSuite].start();
|
||||
return running;
|
||||
}
|
||||
document.body.attributes['class'] = 'alldone';
|
||||
|
||||
var report = js.context['reportPerformanceTestDone'];
|
||||
if (report != null) {
|
||||
report.apply([]);
|
||||
} else {
|
||||
// This is not running as a performance test. Continue as normal.
|
||||
window.console.log('Warning: failed to call '
|
||||
'reportPerformanceTestDone. If this is a performance test, '
|
||||
'please include '
|
||||
'packages/browser_controller/perf_test_controller.js in your '
|
||||
'html file.');
|
||||
}
|
||||
return done;
|
||||
|
||||
default:
|
||||
throw 'Unknown command ${command} [${data}]';
|
||||
}
|
||||
};
|
||||
|
||||
done = (String command, var data) {
|
||||
};
|
||||
|
||||
return loading;
|
||||
}
|
||||
|
||||
_css(Element element, String property, String value) {
|
||||
// TODO(antonm): remove the last argument when CallWithDefaultValue
|
||||
// is implemented.
|
||||
element.style.setProperty(property, value, '');
|
||||
}
|
||||
|
||||
Element _byId(String id) {
|
||||
return document.querySelector('#$id');
|
||||
}
|
||||
|
||||
int get _suitesTotal {
|
||||
return _suiteControllers.length;
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
Dromaeo Test Suite
|
||||
Copyright (c) 2008 John Resig
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
----
|
||||
|
||||
All tests are the copyright of their respective owners.
|
||||
- Tests coming from the Computer Language Shootout are under the Revised BSD license
|
||||
<http://shootout.alioth.debian.org/license.php>.
|
||||
- Tests coming from John Resig are under an MIT license.
|
||||
@@ -1,57 +0,0 @@
|
||||
This is a port of the Dromaeo benchmark (http://dromaeo.com/) to Dart.
|
||||
See the attached LICENSE file in this directory.
|
||||
|
||||
To run the native Dart versions on Dartium:
|
||||
|
||||
(1) Use a Dartium chrome binary to open index.html in this directory.
|
||||
By default, this will run JS vs a native Dart version (dart:html)
|
||||
designed to match the JS for speed.
|
||||
|
||||
To run compiled versions on standard browsers:
|
||||
|
||||
(1) Execute python ./generate_dart2js_tests.py to create frog
|
||||
and dart2js variants.
|
||||
|
||||
(2) Use a standard browser to open index-js.html in this directory.
|
||||
By default, this will run JS vs a dart2js compiled Dart version
|
||||
(dart2js:html) designed to match the JS for speed.
|
||||
|
||||
-------------------------------------------------------
|
||||
|
||||
Note, you can run more variants and at a finer granularity. Dart
|
||||
Dromaeo includes the following modes:
|
||||
|
||||
- js : The original JS.
|
||||
- dart : Dart, running natively (Dartium only).
|
||||
- frog : Dart, compiled to JS with Frog.
|
||||
- dart2js : Dart, compiled to JS with dart2js.
|
||||
|
||||
It also includes the following versions for Dart modes:
|
||||
|
||||
- dom : The old deprecated dart:dom.
|
||||
- html : The new dart:html, using fast path APIs to match JS.
|
||||
|
||||
Finally, Dart Dromaeo runs the following suites of benchmarks:
|
||||
- attributes : Setting and getting DOM node attributes.
|
||||
- modify : Creating and injecting DOM nodes into a document.
|
||||
- query : Querying DOM elements in a document.
|
||||
- traverse : Traversing a DOM structure.
|
||||
|
||||
You can specify a disjunction of conjunctions from the three buckets
|
||||
above. Examples:
|
||||
|
||||
To run the attributes suite on JS, Dartium, and Dart2JS, load:
|
||||
|
||||
- index.html?js&attributes|dart&attributes&html|dart2js&attributes&html
|
||||
|
||||
To run the query suite with Dart2JS, load:
|
||||
|
||||
- index-js.html?dart&query&html
|
||||
|
||||
To run all tests in Dartium, load:
|
||||
|
||||
- index.html?js|dart|frog|dart2js
|
||||
|
||||
To run all tests (except the native Dart) in a regular browser, load:
|
||||
|
||||
- index-js.html?js|frog|dart2js
|
||||
@@ -1,174 +0,0 @@
|
||||
library Suites;
|
||||
|
||||
class Origin {
|
||||
final String author;
|
||||
final String url;
|
||||
|
||||
const Origin(this.author, this.url);
|
||||
}
|
||||
|
||||
class SuiteDescription {
|
||||
final String file;
|
||||
final String name;
|
||||
final Origin origin;
|
||||
final String description;
|
||||
final List<String> tags;
|
||||
final List testVariants;
|
||||
|
||||
const SuiteDescription(this.file, this.name, this.origin,
|
||||
this.description, this.tags, this.testVariants);
|
||||
}
|
||||
|
||||
class Suites {
|
||||
static const JOHN_RESIG = const Origin('John Resig', 'http://ejohn.org/');
|
||||
|
||||
static const CATEGORIES = const {
|
||||
// Platform tags
|
||||
'js': 'DOM Core Tests (JavaScript)',
|
||||
'dart': 'DOM Core Tests (dart)',
|
||||
'dart2js': 'DOM Core Tests (dart2js)',
|
||||
|
||||
// Library tags
|
||||
'html': 'DOM Core Tests (dart:html)',
|
||||
};
|
||||
|
||||
static const _CORE_TEST_OPTIONS = const [
|
||||
// A list of valid combinations for core Dromaeo DOM tests.
|
||||
// Each item in the list is a pair of (platform x [variants]).
|
||||
const ['js', const ['']],
|
||||
const ['dart', const ['html']],
|
||||
const ['dart2js', const ['html']],
|
||||
];
|
||||
|
||||
static const _CORE_SUITE_DESCRIPTIONS = const [
|
||||
const SuiteDescription(
|
||||
'tests/dom-attr.html',
|
||||
'DOM Attributes',
|
||||
JOHN_RESIG,
|
||||
'Setting and getting DOM node attributes',
|
||||
const ['attributes'],
|
||||
_CORE_TEST_OPTIONS),
|
||||
const SuiteDescription(
|
||||
'tests/dom-modify.html',
|
||||
'DOM Modification',
|
||||
JOHN_RESIG,
|
||||
'Creating and injecting DOM nodes into a document',
|
||||
const ['modify'],
|
||||
_CORE_TEST_OPTIONS),
|
||||
const SuiteDescription(
|
||||
'tests/dom-query.html',
|
||||
'DOM Query',
|
||||
JOHN_RESIG,
|
||||
'Querying DOM elements in a document',
|
||||
const ['query'],
|
||||
_CORE_TEST_OPTIONS),
|
||||
const SuiteDescription(
|
||||
'tests/dom-traverse.html',
|
||||
'DOM Traversal',
|
||||
JOHN_RESIG,
|
||||
'Traversing a DOM structure',
|
||||
const ['traverse'],
|
||||
_CORE_TEST_OPTIONS),
|
||||
const SuiteDescription(
|
||||
'/root_dart/tests/html/dromaeo_smoke.html',
|
||||
'Smoke test',
|
||||
const Origin('', ''),
|
||||
'Dromaeo no-op smoke test',
|
||||
const ['nothing'],
|
||||
_CORE_TEST_OPTIONS),
|
||||
];
|
||||
|
||||
// Mappings from original path to actual path given platform/library.
|
||||
static _getHtmlPathForVariant(platform, lib, path) {
|
||||
if (lib != '') {
|
||||
lib = '-$lib';
|
||||
}
|
||||
switch (platform) {
|
||||
case 'js':
|
||||
case 'dart':
|
||||
return path.replaceFirst('.html', '$lib.html');
|
||||
case 'dart2js':
|
||||
int i = path.indexOf('/');
|
||||
String topLevelDir = '';
|
||||
if (i != -1) topLevelDir = '${path.substring(0, i)}';
|
||||
return '$topLevelDir/'
|
||||
'${path.substring(i + 1).replaceFirst(".html", "$lib-js.html")}';
|
||||
}
|
||||
}
|
||||
|
||||
static var _SUITE_DESCRIPTIONS;
|
||||
|
||||
static List<SuiteDescription> get SUITE_DESCRIPTIONS {
|
||||
if (_SUITE_DESCRIPTIONS != null) {
|
||||
return _SUITE_DESCRIPTIONS;
|
||||
}
|
||||
_SUITE_DESCRIPTIONS = <SuiteDescription>[];
|
||||
|
||||
// Expand the list to include a unique SuiteDescription for each
|
||||
// tested variant.
|
||||
for (SuiteDescription suite in _CORE_SUITE_DESCRIPTIONS) {
|
||||
List variants = suite.testVariants;
|
||||
for (List variant in variants) {
|
||||
assert(variant.length == 2);
|
||||
String platform = variant[0];
|
||||
List<String> libraries = variant[1];
|
||||
for(String lib in libraries) {
|
||||
String path = _getHtmlPathForVariant(platform, lib, suite.file);
|
||||
final combined = new List.from(suite.tags);
|
||||
combined.add(platform);
|
||||
if (lib != '') {
|
||||
combined.add(lib);
|
||||
lib = ':$lib';
|
||||
}
|
||||
final name = (variant == null)
|
||||
? suite.name
|
||||
: '${suite.name} ($platform$lib)';
|
||||
_SUITE_DESCRIPTIONS.add(new SuiteDescription(
|
||||
path,
|
||||
name,
|
||||
suite.origin,
|
||||
suite.description,
|
||||
combined,
|
||||
[]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _SUITE_DESCRIPTIONS;
|
||||
}
|
||||
|
||||
static List<SuiteDescription> getSuites(String tags) {
|
||||
// Allow AND and OR in place of '&' and '|' for browsers where
|
||||
// those symbols are escaped.
|
||||
tags = tags.replaceAll('OR', '|').replaceAll('AND', '&');
|
||||
// A disjunction of conjunctions (e.g.,
|
||||
// 'js&modify|dart&dom&modify').
|
||||
final taglist = tags.split('|').map((tag) => tag.split('&')).toList();
|
||||
|
||||
bool match(suite) {
|
||||
// If any conjunction matches, return true.
|
||||
for (final tagset in taglist) {
|
||||
if (tagset.every((tag) => suite.tags.indexOf(tag) >= 0)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
final suites = SUITE_DESCRIPTIONS.where(match).toList();
|
||||
|
||||
suites.sort((s1, s2) => s1.name.compareTo(s2.name));
|
||||
return suites;
|
||||
}
|
||||
|
||||
static getCategory(String tags) {
|
||||
if (CATEGORIES.containsKey(tags)) {
|
||||
return CATEGORIES[tags];
|
||||
}
|
||||
for (final suite in _CORE_SUITE_DESCRIPTIONS) {
|
||||
if (suite.tags[0] == tags) {
|
||||
return suite.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
ol.results { text-align: left; display: none; font-size: 10px; list-style: none; display: none; }
|
||||
.alldone ol.results { display: block; width: 48%; float: left; }
|
||||
ol.results li { clear: both; overflow: auto; }
|
||||
ol.results b { display: block; width: 200px; float: left; text-align: right; padding-right: 15px; }
|
||||
#info { clear:both;width:420px;margin:0 auto;text-align:left; padding: 10px; }
|
||||
div.results { width:420px;margin:0 auto;margin-bottom:20px;text-align:left; padding: 10px 10px 10px 10px; }
|
||||
#info span { font-weight: bold; padding-top: 8px; }
|
||||
h1 { text-align: left; }
|
||||
h1 img { float:left;margin-right: 15px;margin-top: -10px; border: 0; }
|
||||
h1 small { font-weight:normal; }
|
||||
iframe { display: none; }
|
||||
div.resultwrap { text-align: center; }
|
||||
table.results { font-size: 12px; margin: 0 auto; }
|
||||
table.results td, table.results th.name, table.results th { text-align: right; }
|
||||
table.results .winner { color: #000; background-color: #c7331d; }
|
||||
table.results .tie { color: #000; background-color: #f9f2a1; }
|
||||
|
||||
body {
|
||||
font: normal 11px "Lucida Grande", Helvetica, Arial, sans-serif;
|
||||
background: black url(images/bg.png) repeat-x;
|
||||
margin: 0px auto;
|
||||
padding: 0px;
|
||||
color: #eee;
|
||||
text-align: center;
|
||||
line-height: 180%;
|
||||
}
|
||||
div, img, form, ul {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
small {font-size: 9px;}
|
||||
div, span, td, .text_l {text-align: left;}
|
||||
.clear {clear: both;}
|
||||
.text_r {text-align: right;}
|
||||
.text_c {text-align: center;}
|
||||
a {font: normal "Arial", sans-serif; color: #f9f2a1; }
|
||||
.left {float: left;}
|
||||
.right {float: right;}
|
||||
|
||||
#wrapper {width: 690px; margin: 0px auto; padding: 0px; margin-top: -7px; text-align: center;}
|
||||
#content {margin-bottom: 30px;}
|
||||
#main {padding-bottom: 40px;}
|
||||
|
||||
#top {background: url(images/top.png) repeat-x; height: 250px;}
|
||||
#logo {position: absolute; top: 0; left: 0; width: 100%; text-align: center; z-index: 100;}
|
||||
#logo img { margin: 0px auto; padding: 0px;}
|
||||
.dino1 {position: absolute; top: 105px; right: 300px; z-index: 15;}
|
||||
.dino2 {position: absolute; top: 110px; left: 15%; z-index: 12;}
|
||||
.dino3 {position: absolute; top: 120px; left: 400px; z-index: 31;}
|
||||
.dino4 {position: absolute; top: 96px; left: 200px; z-index: 8;}
|
||||
.dino5 {position: absolute; top: 110px; right: 85px; z-index: 14;}
|
||||
.dino6 {position: absolute; top: 105px; left: 30%; z-index: 14;}
|
||||
.dino7 {position: absolute; top: 110px; left: 70%; z-index: 22;}
|
||||
.dino8 {position: absolute; top: 105px; left: 37%; z-index: 20;}
|
||||
.coment {position: absolute; top: 0px; right: 0px; z-index: 2; float: right;}
|
||||
|
||||
.clouds {position: absolute; top: 10px; right: 11%; z-index: 12;}
|
||||
.clouds2 {position: absolute; top: 50px; right: 29%; z-index: 13;}
|
||||
.clouds5 {position: absolute; top: 0px; right: 15%; z-index: 16;}
|
||||
.clouds3 {position: absolute; top: 15px; left: 10%; z-index: 15;}
|
||||
.clouds4 {position: absolute; top: 10px; left: 15%; z-index: 14;}
|
||||
|
||||
.water {position: absolute; top: 110px; right: 9%; z-index: 13;}
|
||||
|
||||
|
||||
/* rendered html stuff */
|
||||
|
||||
table.results {text-align: center; margin: 0px auto; padding: 0px; background: none;}
|
||||
table.results td, table.results th {padding: 2px;}
|
||||
table.results tr.onetest td, table.results tr.onetest th {padding: 0px;}
|
||||
table.results tr.hidden { display: none; }
|
||||
#info {margin-bottom: 10px;}
|
||||
table.results .winner {background: #58bd79;}
|
||||
.name {font-weight: bold;}
|
||||
|
||||
div.resultwrap {margin: 10px 0 10px 0;}
|
||||
div.results {padding: 10px; margin-bottom: 20px; background: #c7331d;}
|
||||
|
||||
div.result-item { position: relative; width: 48%; float: left; overflow: hidden; margin-left: 1%; margin-right: 1%; height: 100px; }
|
||||
.alldone div.result-item { width: 98%; height: auto; margin-bottom: 10px; overflow: auto; }
|
||||
.alldone div.result-item p { width: 48%; float: left; }
|
||||
|
||||
div.result-item p { padding: 0px 4px; }
|
||||
|
||||
div.test { overflow: hidden; margin: 4px 0; }
|
||||
div.test b { display: block; width: 100%; text-align: left; margin: 0px; background: #c7331d; padding: 4px; }
|
||||
/*div.done div.test b {background: #58bd79;}*/
|
||||
div.done div.test b {background: #222;}
|
||||
div.bar { width: 100px; border: 1px inset #666; background: #c7331d; text-align: left; position: absolute; top: 7px; right: 4px; }
|
||||
div.bar div { height: 20px; background: #222; text-align: right; }
|
||||
div.done div.bar div {background: #58bd79; color: #000;}
|
||||
div.bar span { padding-left: 5px; padding-right: 5px; }
|
||||
|
||||
#info { margin: auto; }
|
||||
|
||||
h1 { font-size: 28px; border-bottom: 1px solid #AAA; position: relative; padding: 0px 1% 2px 1%;}
|
||||
h1 div.bar { font-size: 10px; width: 275px; top: -2px; right: 1%; }
|
||||
h1 input { position: absolute; top: 0px; right: 300px; }
|
||||
|
||||
h2 { font-size: 20px; border-bottom: 1px solid #AAA; position: relative; padding: 0px 1% 2px 1%;}
|
||||
h2 a { color: #FFF; }
|
||||
h2 div.bar { font-size: 10px; width: 275px; top: -2px; right: 1%; }
|
||||
h2 input { position: absolute; top: 0px; right: 300px; }
|
||||
|
||||
ul#tests { clear:both;width:420px;margin:0 auto;text-align:left; padding: 10px; list-style: none; }
|
||||
#tests b { background: #c7331d; color: #000; display: block; padding: 4px 0 4px 4px; margin-left: -20px; margin-bottom: 5px; font-size: 1.1em; -webkit-border-radius: 4px; -moz-border-radius: 4px; font-weight: normal; }
|
||||
#tests b.recommended { background: #58bd79; }
|
||||
#tests a:first-of-type { font-size: 1.2em; }
|
||||
#tests b a { font-weight: bold; color: #000; }
|
||||
#tests li { padding-left: 10px; padding-bottom: 5px; }
|
||||
|
||||
#overview { position: relative; }
|
||||
#overview a { font-size: 10px; top: -29px; left: 8px; position: absolute; }
|
||||
#overview table a { position: static; }
|
||||
@@ -1,84 +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.
|
||||
|
||||
part of common;
|
||||
|
||||
// Misc benchmark-related utility functions.
|
||||
|
||||
class BenchUtil {
|
||||
static int get now {
|
||||
return new DateTime.now().millisecondsSinceEpoch;
|
||||
}
|
||||
|
||||
static Map<String, Object> deserialize(String data) {
|
||||
return JSON.decode(data);
|
||||
}
|
||||
|
||||
static String serialize(Object obj) {
|
||||
return JSON.encode(obj);
|
||||
}
|
||||
|
||||
// Shuffle a list randomly.
|
||||
static void shuffle(List<Object> list) {
|
||||
int len = list.length - 1;
|
||||
for (int i = 0; i < len; i++) {
|
||||
int index = (Math.random() * (len - i)).toInt() + i;
|
||||
Object tmp = list[i];
|
||||
list[i] = list[index];
|
||||
list[index] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
static String formatGolemData(String prefix, Map<String, num> results) {
|
||||
List<String> elements = new List<String>();
|
||||
results.forEach((String name, num score) {
|
||||
elements.add('"${prefix}/${name}":${score}');
|
||||
});
|
||||
return serialize(elements);
|
||||
}
|
||||
|
||||
static bool _inRange(int charCode, String start, String end) {
|
||||
return start.codeUnitAt(0) <= charCode && charCode <= end.codeUnitAt(0);
|
||||
}
|
||||
|
||||
static const String DIGITS = '0123456789ABCDEF';
|
||||
static String _asDigit(int value) {
|
||||
return DIGITS[value];
|
||||
}
|
||||
|
||||
static String encodeUri(final String s) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (int i = 0; i < s.length; i++) {
|
||||
final int charCode = s.codeUnitAt(i);
|
||||
final bool noEscape =
|
||||
_inRange(charCode, '0', '9') ||
|
||||
_inRange(charCode, 'a', 'z') ||
|
||||
_inRange(charCode, 'A', 'Z');
|
||||
if (noEscape) {
|
||||
sb.write(s[i]);
|
||||
} else {
|
||||
sb.write('%');
|
||||
sb.write(_asDigit((charCode >> 4) & 0xF));
|
||||
sb.write(_asDigit(charCode & 0xF));
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
// TODO: use corelib implementation.
|
||||
static String replaceAll(String s, String pattern,
|
||||
String replacement(Match match)) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
int pos = 0;
|
||||
for (Match match in new RegExp(pattern).allMatches(s)) {
|
||||
sb.write(s.substring(pos, match.start));
|
||||
sb.write(replacement(match));
|
||||
pos = match.end;
|
||||
}
|
||||
sb.write(s.substring(pos));
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,32 +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.
|
||||
|
||||
part of common;
|
||||
|
||||
// A utility object for measuring time intervals.
|
||||
|
||||
class Interval {
|
||||
int _start, _stop;
|
||||
|
||||
Interval() {
|
||||
}
|
||||
|
||||
void start() {
|
||||
_start = BenchUtil.now;
|
||||
}
|
||||
|
||||
void stop() {
|
||||
_stop = BenchUtil.now;
|
||||
}
|
||||
|
||||
// Microseconds from between start() and stop().
|
||||
int get elapsedMicrosec {
|
||||
return (_stop - _start) * 1000;
|
||||
}
|
||||
|
||||
// Milliseconds from between start() and stop().
|
||||
int get elapsedMillisec {
|
||||
return (_stop - _start);
|
||||
}
|
||||
}
|
||||
@@ -1,51 +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.
|
||||
|
||||
part of common;
|
||||
|
||||
// Various math-related utility functions.
|
||||
|
||||
class Math2 {
|
||||
/// Computes the geometric mean of a set of numbers.
|
||||
/// [minNumber] is optional (defaults to 0.001) anything smaller than this
|
||||
/// will be changed to this value, eliminating infinite results.
|
||||
static double geometricMean(List<double> numbers,
|
||||
[double minNumber = 0.001]) {
|
||||
double log = 0.0;
|
||||
int nNumbers = 0;
|
||||
for (int i = 0, n = numbers.length; i < n; i++) {
|
||||
double number = numbers[i];
|
||||
if (number < minNumber) {
|
||||
number = minNumber;
|
||||
}
|
||||
nNumbers++;
|
||||
log += Math.log(number);
|
||||
}
|
||||
|
||||
return nNumbers > 0 ? Math.pow(Math.E, log / nNumbers) : 0.0;
|
||||
}
|
||||
|
||||
static int round(double d) {
|
||||
return d.round();
|
||||
}
|
||||
|
||||
static int floor(double d) {
|
||||
return d.floor();
|
||||
}
|
||||
|
||||
// TODO (olonho): use d.toStringAsFixed(precision) when implemented by DartVM
|
||||
static String toStringAsFixed(num d, int precision) {
|
||||
String dStr = d.toString();
|
||||
int pos = dStr.indexOf('.', 0);
|
||||
int end = pos < 0 ? dStr.length : pos + precision;
|
||||
if (precision > 0) {
|
||||
end++;
|
||||
}
|
||||
if (end > dStr.length) {
|
||||
end = dStr.length;
|
||||
}
|
||||
|
||||
return dStr.substring(0, end);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +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.
|
||||
|
||||
library common;
|
||||
import 'dart:math' as Math;
|
||||
import "dart:convert";
|
||||
part 'BenchUtil.dart';
|
||||
part 'Interval.dart';
|
||||
part 'Math2.dart';
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 448 B |
@@ -1,142 +0,0 @@
|
||||
// An version of Dromaeo's original htmlrunner adapted for the
|
||||
// Dart-based test driver.
|
||||
|
||||
var _operations = [];
|
||||
var _N_RUNS = 5;
|
||||
var _nRanTests = 0;
|
||||
var _nTests = 0;
|
||||
var _T_DISTRIBUTION = 2.776;
|
||||
|
||||
function startTest() {
|
||||
window.addEventListener(
|
||||
'message',
|
||||
function (event) {
|
||||
if (event.data == 'start') {
|
||||
_run();
|
||||
} else {
|
||||
window.alert('Unknown command: ' + event.data);
|
||||
}
|
||||
},
|
||||
false);
|
||||
}
|
||||
|
||||
function _run() {
|
||||
var currentOperation = 0;
|
||||
function handler() {
|
||||
if (currentOperation < _operations.length) {
|
||||
_operations[currentOperation]();
|
||||
currentOperation++;
|
||||
window.setTimeout(handler, 1);
|
||||
} else {
|
||||
_postMessage('over');
|
||||
}
|
||||
}
|
||||
window.setTimeout(handler, 0);
|
||||
}
|
||||
|
||||
function _postMessage(command, data) {
|
||||
var payload = { 'command': command };
|
||||
if (data) {
|
||||
payload['data'] = data;
|
||||
}
|
||||
window.parent.postMessage(JSON.stringify(payload), '*');
|
||||
}
|
||||
|
||||
function test(name, fn) {
|
||||
_nTests++;
|
||||
_operations.push(function () {
|
||||
// List of number of runs in seconds.
|
||||
var runsPerSecond = [];
|
||||
// Run the test several times.
|
||||
try {
|
||||
// TODO(antonm): use .setTimeout to schedule next run as JS
|
||||
// version does. That allows to report the intermediate results
|
||||
// more smoothly as well.
|
||||
for (var i = 0; i < _N_RUNS; i++) {
|
||||
var runs = 0;
|
||||
var start = Date.now();
|
||||
|
||||
var cur = Date.now();
|
||||
while ((cur - start) < 1000) {
|
||||
fn();
|
||||
cur = Date.now();
|
||||
runs++;
|
||||
}
|
||||
|
||||
runsPerSecond.push((runs * 1000.0) / (cur - start));
|
||||
}
|
||||
} catch(e) {
|
||||
window.alert('Exception : ' + e);
|
||||
return;
|
||||
}
|
||||
_reportTestResults(name, runsPerSecond);
|
||||
});
|
||||
}
|
||||
|
||||
// Adapted from Dromaeo's webrunner.
|
||||
function _compute(times){
|
||||
var results = {runs: times.length}, num = times.length;
|
||||
|
||||
times = times.sort(function(a,b){
|
||||
return a - b;
|
||||
});
|
||||
|
||||
// Make Sum
|
||||
results.sum = 0;
|
||||
|
||||
for ( var i = 0; i < num; i++ )
|
||||
results.sum += times[i];
|
||||
|
||||
// Make Min
|
||||
results.min = times[0];
|
||||
|
||||
// Make Max
|
||||
results.max = times[ num - 1 ];
|
||||
|
||||
// Make Mean
|
||||
results.mean = results.sum / num;
|
||||
|
||||
// Make Median
|
||||
results.median = num % 2 == 0 ?
|
||||
(times[Math.floor(num/2)] + times[Math.ceil(num/2)]) / 2 :
|
||||
times[Math.round(num/2)];
|
||||
|
||||
// Make Variance
|
||||
results.variance = 0;
|
||||
|
||||
for ( var i = 0; i < num; i++ )
|
||||
results.variance += Math.pow(times[i] - results.mean, 2);
|
||||
|
||||
results.variance /= num - 1;
|
||||
|
||||
// Make Standard Deviation
|
||||
results.deviation = Math.sqrt( results.variance );
|
||||
|
||||
// Compute Standard Errors Mean
|
||||
results.sem = (results.deviation / Math.sqrt(results.runs)) * _T_DISTRIBUTION;
|
||||
|
||||
// Error
|
||||
results.error = ((results.sem / results.mean) * 100) || 0;
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
function _reportTestResults(name, times) {
|
||||
_nRanTests++;
|
||||
var results = _compute(times);
|
||||
|
||||
_postMessage('result', {
|
||||
'testName': name,
|
||||
'mean': results.mean,
|
||||
'error': results.error,
|
||||
'percent': (100.0 * _nRanTests / _nTests)
|
||||
});
|
||||
}
|
||||
|
||||
function endTest() {
|
||||
_postMessage('inited', { 'nTests': _nTests });
|
||||
}
|
||||
|
||||
function prep(fn) {
|
||||
_operations.push(fn);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 711 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 890 B |
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,43 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; utf-8" />
|
||||
<title>Dromaeo: JavaScript Performance Testing</title>
|
||||
<link href="reset.css" rel="stylesheet" type="text/css" />
|
||||
<link href="application.css" rel="stylesheet" type="text/css" />
|
||||
<script type="application/dart" src="Dromaeo.dart"></script>
|
||||
<script src="packages/browser/dart.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top" >
|
||||
<div id="logo">
|
||||
<a href="./"><img src="images/logo3.png" class="png"/></a>
|
||||
</div>
|
||||
<img src="images/dino1.png" class="dino1 png"/>
|
||||
<img src="images/left.png" class="left png"/>
|
||||
<img src="images/dino2.png" class="dino2 png"/>
|
||||
<img src="images/dino2.png" class="dino2 png"/>
|
||||
<img src="images/dino3.png" class="dino3 png"/>
|
||||
<img src="images/dino4.png" class="dino4 png"/>
|
||||
<img src="images/dino5.png" class="dino5 png"/>
|
||||
<img src="images/dino7.png" class="dino7 png"/>
|
||||
<img src="images/dino8.png" class="dino8 png"/>
|
||||
<img src="images/dino6.png" class="dino6 png"/>
|
||||
<img src="images/clouds2.png" class="clouds2 png"/>
|
||||
<img src="images/clouds.png" class="clouds png"/>
|
||||
<img src="images/clouds2.png" class="clouds3 png"/>
|
||||
<img src="images/clouds.png" class="clouds4 png"/>
|
||||
<img src="images/clouds2.png" class="clouds5 png"/>
|
||||
<img src="images/comets.png" class="right png"/>
|
||||
</div>
|
||||
<div id="wrapper">
|
||||
<div id="main">
|
||||
<div id="info"><span>Mozilla JavaScript performance test suite.</span><br/>More information about <a href="http://wiki.mozilla.org/Dromaeo">Dromaeo</a> can be found on the Mozilla wiki.</div>
|
||||
<h1 id="overview" class="test"><span>Performance Tests</span> <input type="button" id="pause" class="pause" value="Loading..."/><div class="bar"><div id="timebar" style="width:25%;"><span class="left">Est. Time: <strong id="left">0:00</strong></span></div></div><a href="./">« View All Tests</a></h1><br style="clear:both;"/>
|
||||
<ul id="tests">
|
||||
<li><a href="?dom">DOM Core Tests</a><br/>(Tests DOM Querying, Traversing, Manipulation, and Attributes.)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,38 +0,0 @@
|
||||
/* --------------------------------------------------------------
|
||||
|
||||
reset.css
|
||||
* Resets default browser CSS.
|
||||
|
||||
Based on work by Eric Meyer:
|
||||
* meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
|
||||
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
html, body, div, span, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, code,
|
||||
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-weight: inherit;
|
||||
font-style: inherit;
|
||||
font-size: 100%;
|
||||
font-family: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
|
||||
body { line-height: 1.5; background: #fff; margin:1.5em 0; }
|
||||
|
||||
/* Tables still need 'cellspacing="0"' in the markup. */
|
||||
caption, th, td { text-align: left; font-weight:400; }
|
||||
|
||||
/* Remove possible quote marks (") from <q>, <blockquote>. */
|
||||
blockquote:before, blockquote:after, q:before, q:after { content: ""; }
|
||||
blockquote, q { quotes: "" ""; }
|
||||
|
||||
a img { border: none; }
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../htmlrunner.js"></script>
|
||||
<script>
|
||||
@@ -1,4 +0,0 @@
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
@@ -1,53 +0,0 @@
|
||||
part of dromaeo;
|
||||
|
||||
class Result {
|
||||
int get runs { return _sorted.length; }
|
||||
|
||||
double get sum {
|
||||
double result = 0.0;
|
||||
_sorted.forEach((double e) { result += e; });
|
||||
return result;
|
||||
}
|
||||
|
||||
double get min { return _sorted[0]; }
|
||||
double get max { return _sorted[runs - 1]; }
|
||||
|
||||
double get mean { return sum / runs; }
|
||||
|
||||
double get median {
|
||||
return (runs % 2 == 0) ?
|
||||
(_sorted[runs ~/ 2] + _sorted[runs ~/ 2 + 1]) / 2 : _sorted[runs ~/ 2];
|
||||
}
|
||||
|
||||
double get variance {
|
||||
double m = mean;
|
||||
double result = 0.0;
|
||||
_sorted.forEach((double e) { result += Math.pow(e - m, 2.0); });
|
||||
return result / (runs - 1);
|
||||
}
|
||||
|
||||
double get deviation { return Math.sqrt(variance); }
|
||||
|
||||
// Compute Standard Errors Mean
|
||||
double get sem { return (deviation / Math.sqrt(runs)) * T_DISTRIBUTION; }
|
||||
|
||||
double get error { return (sem / mean) * 100; }
|
||||
|
||||
// TODO: Implement writeOn.
|
||||
String toString() {
|
||||
return '[Result: mean = ${mean}]';
|
||||
}
|
||||
|
||||
factory Result(List<double> runsPerSecond) {
|
||||
runsPerSecond.sort((a, b) => a.compareTo(b));
|
||||
return new Result._internal(runsPerSecond);
|
||||
}
|
||||
|
||||
Result._internal(this._sorted) {}
|
||||
|
||||
List<double> _sorted;
|
||||
|
||||
// Populated from: http://www.medcalc.be/manual/t-distribution.php
|
||||
// 95% confidence for N - 1 = 4
|
||||
static const double T_DISTRIBUTION = 2.776;
|
||||
}
|
||||
@@ -1,132 +0,0 @@
|
||||
part of dromaeo;
|
||||
|
||||
typedef void Test();
|
||||
typedef void Operation();
|
||||
typedef void Reporter(Map<String, Result> results);
|
||||
|
||||
class Suite {
|
||||
/**
|
||||
* Ctor.
|
||||
* [:_window:] The window of the suite.
|
||||
* [:_name:] The name of the suite.
|
||||
*/
|
||||
Suite(this._window, this._name) :
|
||||
_operations = new List<Operation>(),
|
||||
_nTests = 0, _nRanTests = 0 {
|
||||
starter(MessageEvent event) {
|
||||
String command = event.data;
|
||||
switch (command) {
|
||||
case 'start':
|
||||
_run();
|
||||
return;
|
||||
default:
|
||||
_window.alert('[${_name}]: unknown command ${command}');
|
||||
}
|
||||
};
|
||||
_window.onMessage.listen(starter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a preparation step to the suite.
|
||||
* [:operation:] The operation to be performed.
|
||||
*/
|
||||
Suite prep(Operation operation){
|
||||
return _addOperation(operation);
|
||||
}
|
||||
|
||||
// How many times each individual test should be ran.
|
||||
static const int _N_RUNS = 5;
|
||||
|
||||
/**
|
||||
* Adds another test to the suite.
|
||||
* [:name:] The unique name of the test
|
||||
* [:test:] A function holding the test to run
|
||||
*/
|
||||
Suite test(String name, Test test_) {
|
||||
_nTests++;
|
||||
// Don't execute the test immediately.
|
||||
return _addOperation(() {
|
||||
// List of number of runs in seconds.
|
||||
List<double> runsPerSecond = new List<double>();
|
||||
|
||||
// Run the test several times.
|
||||
try {
|
||||
// TODO(antonm): use timer to schedule next run as JS
|
||||
// version does. That allows to report the intermidiate results
|
||||
// more smoothly as well.
|
||||
for (int i = 0; i < _N_RUNS; i++) {
|
||||
int runs = 0;
|
||||
final int start = new DateTime.now().millisecondsSinceEpoch;
|
||||
|
||||
int cur = new DateTime.now().millisecondsSinceEpoch;
|
||||
while ((cur - start) < 1000) {
|
||||
test_();
|
||||
cur = new DateTime.now().millisecondsSinceEpoch;
|
||||
runs++;
|
||||
}
|
||||
|
||||
runsPerSecond.add((runs * 1000.0) / (cur - start));
|
||||
}
|
||||
} catch (exception, stacktrace) {
|
||||
_window.alert('Exception ${exception}: ${stacktrace}');
|
||||
return;
|
||||
}
|
||||
_reportTestResults(name, new Result(runsPerSecond));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Finalizes the suite.
|
||||
* It might either run the tests immediately or schedule them to be ran later.
|
||||
*/
|
||||
void end() {
|
||||
_postMessage('inited', { 'nTests': _nTests });
|
||||
|
||||
}
|
||||
|
||||
_run() {
|
||||
int currentOperation = 0;
|
||||
handler() {
|
||||
if (currentOperation < _operations.length) {
|
||||
_operations[currentOperation]();
|
||||
currentOperation++;
|
||||
new Timer(const Duration(milliseconds: 1), handler);
|
||||
} else {
|
||||
_postMessage('over');
|
||||
}
|
||||
}
|
||||
Timer.run(handler);
|
||||
}
|
||||
|
||||
_reportTestResults(String name, Result result) {
|
||||
_nRanTests++;
|
||||
_postMessage('result', {
|
||||
'testName': name,
|
||||
'mean': result.mean,
|
||||
'error': result.error,
|
||||
'percent': (100.0 * _nRanTests / _nTests)
|
||||
});
|
||||
}
|
||||
|
||||
_postMessage(String command, [var data = null]) {
|
||||
final payload = { 'command': command };
|
||||
if (data != null) {
|
||||
payload['data'] = data;
|
||||
}
|
||||
_window.parent.postMessage(JSON.encode(payload), '*');
|
||||
}
|
||||
|
||||
// Implementation.
|
||||
|
||||
final Window _window;
|
||||
final String _name;
|
||||
|
||||
List<Operation> _operations;
|
||||
int _nTests;
|
||||
int _nRanTests;
|
||||
|
||||
Suite _addOperation(Operation operation) {
|
||||
_operations.add(operation);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
library dromaeo;
|
||||
import 'dart:async';
|
||||
import 'dart:html';
|
||||
import "dart:convert";
|
||||
import 'dart:math' as Math;
|
||||
part 'Common.dart';
|
||||
part 'RunnerSuite.dart';
|
||||
|
||||
void main() {
|
||||
final int num = 10240;
|
||||
|
||||
// Try to force real results.
|
||||
var ret;
|
||||
|
||||
Element elem = document.querySelector('#test1');
|
||||
Element a = document.querySelector('a');
|
||||
|
||||
new Suite(window, 'dom-attr')
|
||||
.test('getAttribute', () {
|
||||
for (int i = 0; i < num; i++)
|
||||
ret = elem.getAttribute('id');
|
||||
})
|
||||
.test('element.property', () {
|
||||
for (int i = 0; i < num * 2; i++)
|
||||
ret = elem.id;
|
||||
})
|
||||
.test('setAttribute', () {
|
||||
for (int i = 0; i < num; i++)
|
||||
a.setAttribute('id', 'foo');
|
||||
})
|
||||
.test('element.property = value', () {
|
||||
for (int i = 0; i < num; i++)
|
||||
a.id = 'foo';
|
||||
})
|
||||
.end();
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
library dromaeo;
|
||||
import 'dart:async';
|
||||
import 'dart:html';
|
||||
import "dart:convert";
|
||||
import 'dart:math' as Math;
|
||||
part 'Common.dart';
|
||||
part 'RunnerSuite.dart';
|
||||
|
||||
void main() {
|
||||
final int num = 400;
|
||||
var random = new Math.Random();
|
||||
|
||||
String str = 'null';
|
||||
// Very ugly way to build up the string, but let's mimic JS version as much as
|
||||
// possible.
|
||||
for (int i = 0; i < 1024; i++) {
|
||||
str += new String.fromCharCode(((25 * random.nextDouble()) + 97).toInt());
|
||||
}
|
||||
|
||||
List<Node> elems = <Node>[];
|
||||
|
||||
// Try to force real results.
|
||||
var ret;
|
||||
|
||||
final htmlstr = document.body.innerHtml;
|
||||
|
||||
new Suite(window, 'dom-modify')
|
||||
.test('createElement', () {
|
||||
for (int i = 0; i < num; i++) {
|
||||
ret = new Element.tag('div');
|
||||
ret = new Element.tag('span');
|
||||
ret = new Element.tag('table');
|
||||
ret = new Element.tag('tr');
|
||||
ret = new Element.tag('select');
|
||||
}
|
||||
})
|
||||
.test('createTextNode', () {
|
||||
for (int i = 0; i < num; i++) {
|
||||
ret = new Text(str);
|
||||
ret = new Text('${str}2');
|
||||
ret = new Text('${str}3');
|
||||
ret = new Text('${str}4');
|
||||
ret = new Text('${str}5');
|
||||
}
|
||||
})
|
||||
.test('innerHtml', () {
|
||||
document.body.innerHtml = htmlstr;
|
||||
})
|
||||
.prep(() {
|
||||
elems = new List<Node>();
|
||||
final telems = document.body.nodes;
|
||||
for (int i = 0; i < telems.length; i++) {
|
||||
elems.add(telems[i]);
|
||||
}
|
||||
})
|
||||
.test('cloneNode', () {
|
||||
for (int i = 0; i < elems.length; i++) {
|
||||
ret = elems[i].clone(false);
|
||||
ret = elems[i].clone(true);
|
||||
ret = elems[i].clone(true);
|
||||
}
|
||||
})
|
||||
.test('appendChild', () {
|
||||
for (int i = 0; i < elems.length; i++)
|
||||
document.body.append(elems[i]);
|
||||
})
|
||||
.test('insertBefore', () {
|
||||
for (int i = 0; i < elems.length; i++)
|
||||
document.body.insertBefore(elems[i], document.body.firstChild);
|
||||
})
|
||||
.end();
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
library dromaeo;
|
||||
import 'dart:async';
|
||||
import 'dart:html';
|
||||
import '../common/common.dart';
|
||||
import "dart:convert";
|
||||
import 'dart:math' as Math;
|
||||
part 'Common.dart';
|
||||
part 'RunnerSuite.dart';
|
||||
|
||||
void main() {
|
||||
final int num = 40;
|
||||
|
||||
// Try to force real results.
|
||||
var ret;
|
||||
|
||||
String html = document.body.innerHtml;
|
||||
|
||||
new Suite(window, 'dom-query')
|
||||
.prep(() {
|
||||
html = BenchUtil.replaceAll(html, 'id="test(\\w).*?"', (Match match) {
|
||||
final group = match.group(1);
|
||||
return 'id="test${group}${num}"';
|
||||
});
|
||||
html = BenchUtil.replaceAll(html, 'name="test.*?"', (Match match) {
|
||||
return 'name="test${num}"';
|
||||
});
|
||||
html = BenchUtil.replaceAll(html, 'class="foo.*?"', (Match match) {
|
||||
return 'class="foo test${num} bar"';
|
||||
});
|
||||
final div = new Element.tag('div');
|
||||
div.innerHtml = html;
|
||||
document.body.append(div);
|
||||
})
|
||||
.test('getElementById', () {
|
||||
for (int i = 0; i < num * 30; i++) {
|
||||
ret = document.getElementById('testA$num').nodeType;
|
||||
ret = document.getElementById('testB$num').nodeType;
|
||||
ret = document.getElementById('testC$num').nodeType;
|
||||
ret = document.getElementById('testD$num').nodeType;
|
||||
ret = document.getElementById('testE$num').nodeType;
|
||||
ret = document.getElementById('testF$num').nodeType;
|
||||
}
|
||||
})
|
||||
.test('getElementById (not in document)', () {
|
||||
for (int i = 0; i < num * 30; i++) {
|
||||
ret = document.getElementById('testA');
|
||||
ret = document.getElementById('testB');
|
||||
ret = document.getElementById('testC');
|
||||
ret = document.getElementById('testD');
|
||||
ret = document.getElementById('testE');
|
||||
ret = document.getElementById('testF');
|
||||
}
|
||||
})
|
||||
.test('getElementsByTagName(div)', () {
|
||||
for (int i = 0; i < num; i++) {
|
||||
List<Element> elems = document.getElementsByTagName('div');
|
||||
ret = elems.last.nodeType;
|
||||
}
|
||||
})
|
||||
.test('getElementsByTagName(p)', () {
|
||||
for (int i = 0; i < num; i++) {
|
||||
List<Element> elems = document.getElementsByTagName('p');
|
||||
ret = elems.last.nodeType;
|
||||
}
|
||||
})
|
||||
.test('getElementsByTagName(a)', () {
|
||||
for (int i = 0; i < num; i++) {
|
||||
List<Element> elems = document.getElementsByTagName('a');
|
||||
ret = elems.last.nodeType;
|
||||
}
|
||||
})
|
||||
.test('getElementsByTagName(*)', () {
|
||||
for (int i = 0; i < num; i++) {
|
||||
List<Element> elems = document.getElementsByTagName('*');
|
||||
ret = elems.last.nodeType;
|
||||
}
|
||||
})
|
||||
.test('getElementsByTagName (not in document)', () {
|
||||
for (int i = 0; i < num; i++) {
|
||||
List<Element> elems = document.getElementsByTagName('strong');
|
||||
ret = elems.length == 0;
|
||||
}
|
||||
})
|
||||
.test('getElementsByName', () {
|
||||
for (int i = 0; i < num * 20; i++) {
|
||||
List<Element> elems = document.getElementsByName('test$num');
|
||||
ret = elems[elems.length-1].nodeType;
|
||||
elems = document.getElementsByName('test$num');
|
||||
ret = elems[elems.length-1].nodeType;
|
||||
elems = document.getElementsByName('test$num');
|
||||
ret = elems[elems.length-1].nodeType;
|
||||
elems = document.getElementsByName('test$num');
|
||||
ret = elems[elems.length-1].nodeType;
|
||||
}
|
||||
})
|
||||
.test('getElementsByName (not in document)', () {
|
||||
for (int i = 0; i < num * 20; i++) {
|
||||
ret = document.getElementsByName('test').length == 0;
|
||||
ret = document.getElementsByName('test').length == 0;
|
||||
ret = document.getElementsByName('test').length == 0;
|
||||
ret = document.getElementsByName('test').length == 0;
|
||||
ret = document.getElementsByName('test').length == 0;
|
||||
}
|
||||
})
|
||||
.end();
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
library dromaeo;
|
||||
import 'dart:async';
|
||||
import 'dart:html';
|
||||
import "dart:convert";
|
||||
import '../common/common.dart';
|
||||
import 'dart:math' as Math;
|
||||
part 'Common.dart';
|
||||
part 'RunnerSuite.dart';
|
||||
|
||||
|
||||
void main() {
|
||||
final int num = 40;
|
||||
|
||||
// Try to force real results.
|
||||
var ret;
|
||||
|
||||
String html = document.body.innerHtml;
|
||||
|
||||
new Suite(window, 'dom-traverse')
|
||||
.prep(() {
|
||||
html = BenchUtil.replaceAll(html, 'id="test(\\w).*?"', (Match match) {
|
||||
final group = match.group(1);
|
||||
return 'id="test${group}${num}"';
|
||||
});
|
||||
html = BenchUtil.replaceAll(html, 'name="test.*?"', (Match match) {
|
||||
return 'name="test${num}"';
|
||||
});
|
||||
html = BenchUtil.replaceAll(html, 'class="foo.*?"', (Match match) {
|
||||
return 'class="foo test${num} bar"';
|
||||
});
|
||||
|
||||
final div = new Element.tag('div');
|
||||
div.innerHtml = html;
|
||||
document.body.append(div);
|
||||
})
|
||||
.test('firstChild', () {
|
||||
final nodes = document.body.childNodes;
|
||||
final nl = nodes.length;
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
for (int j = 0; j < nl; j++) {
|
||||
Node cur = nodes[j];
|
||||
while (cur != null) {
|
||||
cur = cur.firstChild;
|
||||
}
|
||||
ret = cur;
|
||||
}
|
||||
}
|
||||
})
|
||||
.test('lastChild', () {
|
||||
final nodes = document.body.childNodes;
|
||||
final nl = nodes.length;
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
for (int j = 0; j < nl; j++) {
|
||||
Node cur = nodes[j];
|
||||
while (cur != null) {
|
||||
cur = cur.lastChild;
|
||||
}
|
||||
ret = cur;
|
||||
}
|
||||
}
|
||||
})
|
||||
.test('nextSibling', () {
|
||||
for (int i = 0; i < num * 2; i++) {
|
||||
Node cur = document.body.firstChild;
|
||||
while (cur != null) {
|
||||
cur = cur.nextNode;
|
||||
}
|
||||
ret = cur;
|
||||
}
|
||||
})
|
||||
.test('previousSibling', () {
|
||||
for (int i = 0; i < num * 2; i++) {
|
||||
Node cur = document.body.lastChild;
|
||||
while (cur != null) {
|
||||
cur = cur.previousNode;
|
||||
}
|
||||
ret = cur;
|
||||
}
|
||||
})
|
||||
.test('childNodes', () {
|
||||
for (int i = 0; i < num; i++) {
|
||||
final nodes = document.body.childNodes;
|
||||
for (int j = 0; j < nodes.length; j++) {
|
||||
ret = nodes[j];
|
||||
}
|
||||
}
|
||||
})
|
||||
.end();
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
|
||||
a { color: orange; }
|
||||
div.test { overflow: hidden; margin: 4px; }
|
||||
div.test b { display: block; float: left; width: 150px; text-align: right; margin-right: 10px; }
|
||||
div.bar { float: left; width: 400px; border: 1px inset; text-align: left; }
|
||||
div.bar div { height: 1em; background: url(orange-stripe.png); }
|
||||
div.bar span { padding-left: 5px; padding-right: 5px; }
|
||||
body { font-family: Arial; font-size: 12px; background: url(gray-stripe.png); text-align: center; }
|
||||
|
||||
/*#main { margin: 0 auto; width: 600px; padding: 10px; background: #FFF; }*/
|
||||
|
||||
ol.results { text-align: left; display: none; font-size: 10px; margin-left: 120px; list-style: none; }
|
||||
ol.results li { clear: both; overflow: auto; }
|
||||
ol.results b { display: block; width: 200px; float: left; text-align: right; padding-right: 15px; }
|
||||
#info, div.results { clear:both;width:420px;margin:10 auto;text-align:left; padding: 10px 10px 10px 110px; }
|
||||
#info span { background: #FFF; color: #000; padding: 8px 4px 4px 4px; }
|
||||
h1 { text-align: left; }
|
||||
h1 img { float:left;margin-right: 15px;margin-top: -10px; border: 0; }
|
||||
h1 small { font-weight:normal; }
|
||||
iframe { display: none; }
|
||||
div.resultwrap { text-align: center; }
|
||||
table.results { font-size: 12px; margin: 0 auto; }
|
||||
table.results td, table.results th.name { text-align: right; }
|
||||
table.results .winner { background-color: #c7331d; }
|
||||
@@ -1 +0,0 @@
|
||||
build
|
||||
@@ -1,9 +0,0 @@
|
||||
# Names should be added to this file with this pattern:
|
||||
#
|
||||
# For individuals:
|
||||
# Name <email address>
|
||||
#
|
||||
# For organizations:
|
||||
# Organization <fnmatch pattern>
|
||||
#
|
||||
Google Inc. <*@google.com>
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright (c) 2012 The Polymer Authors. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,23 +0,0 @@
|
||||
Additional IP Rights Grant (Patents)
|
||||
|
||||
"This implementation" means the copyrightable works distributed by
|
||||
Google as part of the Polymer project.
|
||||
|
||||
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this section)
|
||||
patent license to make, have made, use, offer to sell, sell, import,
|
||||
transfer and otherwise run, modify and propagate the contents of this
|
||||
implementation of Polymer, where such license applies only to those
|
||||
patent claims, both currently owned or controlled by Google and acquired
|
||||
in the future, licensable by Google that are necessarily infringed by
|
||||
this implementation of Polymer. This grant does not include claims
|
||||
that would be infringed only as a consequence of further modification of
|
||||
this implementation. If you or your agent or exclusive licensee
|
||||
institute or order or agree to the institution of patent litigation
|
||||
against any entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that this implementation of Polymer or any code
|
||||
incorporated within this implementation of Polymer constitutes
|
||||
direct or contributory patent infringement, or inducement of patent
|
||||
infringement, then any patent rights granted to you under this License
|
||||
for this implementation of Polymer shall terminate as of the date
|
||||
such litigation is filed.
|
||||
@@ -1,4 +0,0 @@
|
||||
# Polymer TodoMVC Performance Test
|
||||
|
||||
This directory is a copy of samples/third_party/todomvc with some modifications
|
||||
to make a performance test and added a pure JS implementation for comparison.
|
||||
@@ -1,9 +0,0 @@
|
||||
# Names should be added to this file with this pattern:
|
||||
#
|
||||
# For individuals:
|
||||
# Name <email address>
|
||||
#
|
||||
# For organizations:
|
||||
# Organization <fnmatch pattern>
|
||||
#
|
||||
Google Inc. <*@google.com>
|
||||
@@ -1 +0,0 @@
|
||||
See https://github.com/Polymer/polymer/blob/master/CONTRIBUTING.md
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright (c) 2012 The Polymer Authors. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,23 +0,0 @@
|
||||
Additional IP Rights Grant (Patents)
|
||||
|
||||
"This implementation" means the copyrightable works distributed by
|
||||
Google as part of the Polymer project.
|
||||
|
||||
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this section)
|
||||
patent license to make, have made, use, offer to sell, sell, import,
|
||||
transfer and otherwise run, modify and propagate the contents of this
|
||||
implementation of Polymer, where such license applies only to those
|
||||
patent claims, both currently owned or controlled by Google and acquired
|
||||
in the future, licensable by Google that are necessarily infringed by
|
||||
this implementation of Polymer. This grant does not include claims
|
||||
that would be infringed only as a consequence of further modification of
|
||||
this implementation. If you or your agent or exclusive licensee
|
||||
institute or order or agree to the institution of patent litigation
|
||||
against any entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that this implementation of Polymer or any code
|
||||
incorporated within this implementation of Polymer constitutes
|
||||
direct or contributory patent infringement, or inducement of patent
|
||||
infringement, then any patent rights granted to you under this License
|
||||
for this implementation of Polymer shall terminate as of the date
|
||||
such litigation is filed.
|
||||
@@ -1,46 +0,0 @@
|
||||
This is a snapshot of https://github.com/Polymer/todomvc taken on 3-14-14.
|
||||
|
||||
# Polymer TodoMVC Example
|
||||
|
||||
> Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.
|
||||
|
||||
> _[Polymer - www.polymer-project.org](http://www.polymer-project.org/)_
|
||||
|
||||
## Learning Polymer
|
||||
|
||||
The [Polymer website](http://www.polymer-project.org) is a great resource for getting started.
|
||||
|
||||
Here are some links you may find helpful:
|
||||
|
||||
* [Getting Started](http://www.polymer-project.org/docs/start/everything.html)
|
||||
* [FAQ](http://www.polymer-project.org/resources/faq.html)
|
||||
* [Browser Compatibility](http://www.polymer-project.org/resources/compatibility.html)
|
||||
|
||||
Get help from Polymer devs and users:
|
||||
|
||||
* Find us on IRC on __#polymer__ at freenode.
|
||||
* Join the high-traffic [polymer-dev](https://groups.google.com/forum/?fromgroups=#!forum/polymer-dev) Google group or the announcement-only [polymer-announce](https://groups.google.com/forum/?fromgroups=#!forum/polymer-announce) Google group.
|
||||
|
||||
## Implementation
|
||||
|
||||
The Polymer implementation of TodoMVC has a few key differences with other implementations:
|
||||
|
||||
* Since [Web Components](http://w3c.github.io/webcomponents/explainer/) allow you to create new types of DOM elements, the DOM tree is very different from other implementations.
|
||||
* The template, styling, and behavior are fully encapsulated in each custom element. Instead of having an overall stylesheet (`base.css` or `app.css`), each element that needs styling has its own stylesheet.
|
||||
* Non-visual elements such as the router and the model are also implemented as custom elements and appear in the DOM. Implementing them as custom elements instead of plain objects allows you to take advantage of Polymer data binding and event handling throughout the app.
|
||||
|
||||
## Compatibility
|
||||
|
||||
Polymer and its polyfills are intended to work in the latest version of [evergreen browsers](http://tomdale.net/2013/05/evergreen-browsers/). IE9 is not supported. Please refer to [Browser Compatibility](http://www.polymer-project.org/resources/compatibility.html) for more details.
|
||||
|
||||
## Running this sample
|
||||
|
||||
1. Install [node.js](nodejs.org) (required for `bower` client-side package management)
|
||||
1. Install bower: `npm install -g bower`
|
||||
|
||||
1. From the `todomvc\` folder, run `bower update`
|
||||
1. Start a web server in the `todomvc\` folder. Hint: if you have python installed, you can just run:
|
||||
|
||||
`python -m SimpleHTTPServer`
|
||||
|
||||
1. Browse to the server root
|
||||
@@ -1,206 +0,0 @@
|
||||
/* base.css overrides */
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
line-height: 1.4em;
|
||||
background: #eaeaea url('../components/todomvc-common/bg.png');
|
||||
color: #4d4d4d;
|
||||
width: 550px;
|
||||
margin: 0 auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-font-smoothing: antialiased;
|
||||
-ms-font-smoothing: antialiased;
|
||||
-o-font-smoothing: antialiased;
|
||||
font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
body > header {
|
||||
padding-top: 22px;
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
/* position: absolute;
|
||||
top: -120px;*/
|
||||
width: 100%;
|
||||
font-size: 70px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
color: #b3b3b3;
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
text-shadow: -1px -1px rgba(0, 0, 0, 0.2);
|
||||
-webkit-text-rendering: optimizeLegibility;
|
||||
-moz-text-rendering: optimizeLegibility;
|
||||
-ms-text-rendering: optimizeLegibility;
|
||||
-o-text-rendering: optimizeLegibility;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
#info {
|
||||
margin: 65px auto 0;
|
||||
color: #a6a6a6;
|
||||
font-size: 12px;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#info a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
display:none;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 20px 0;
|
||||
border: 0;
|
||||
border-top: 1px dashed #C5C5C5;
|
||||
border-bottom: 1px dashed #F7F7F7;
|
||||
}
|
||||
|
||||
.learn a {
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
color: #b83f45;
|
||||
}
|
||||
|
||||
.learn a:hover {
|
||||
text-decoration: underline;
|
||||
color: #787e7e;
|
||||
}
|
||||
|
||||
.learn h3,
|
||||
.learn h4,
|
||||
.learn h5 {
|
||||
margin: 10px 0;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.learn h3 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.learn h4 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.learn h5 {
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.learn ul {
|
||||
padding: 0;
|
||||
margin: 0 0 30px 25px;
|
||||
}
|
||||
|
||||
.learn li {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.learn p {
|
||||
font-size: 15px;
|
||||
font-weight: 300;
|
||||
line-height: 1.3;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.quote {
|
||||
border: none;
|
||||
margin: 20px 0 60px 0;
|
||||
}
|
||||
|
||||
.quote p {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.quote p:before {
|
||||
content: '“';
|
||||
font-size: 50px;
|
||||
opacity: .15;
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
left: 3px;
|
||||
}
|
||||
|
||||
.quote p:after {
|
||||
content: '”';
|
||||
font-size: 50px;
|
||||
opacity: .15;
|
||||
position: absolute;
|
||||
bottom: -42px;
|
||||
right: 3px;
|
||||
}
|
||||
|
||||
.quote footer {
|
||||
position: absolute;
|
||||
bottom: -40px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.quote footer img {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.quote footer a {
|
||||
margin-left: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.speech-bubble {
|
||||
position: relative;
|
||||
padding: 10px;
|
||||
background: rgba(0, 0, 0, .04);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.speech-bubble:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 30px;
|
||||
border: 13px solid transparent;
|
||||
border-top-color: rgba(0, 0, 0, .04);
|
||||
}
|
||||
|
||||
/**body*/.learn-bar > .learn {
|
||||
position: absolute;
|
||||
width: 272px;
|
||||
top: 8px;
|
||||
left: -300px;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: rgba(255, 255, 255, .6);
|
||||
transition-property: left;
|
||||
transition-duration: 500ms;
|
||||
}
|
||||
|
||||
|
||||
/* IE doesn't support the hidden attribute */
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (min-width: 899px) {
|
||||
/**body*/.learn-bar {
|
||||
width: auto;
|
||||
margin: 0 0 0 300px;
|
||||
}
|
||||
/**body*/.learn-bar > .learn {
|
||||
left: 8px;
|
||||
}
|
||||
/**body*/.learn-bar #todoapp {
|
||||
width: 550px;
|
||||
margin: 130px auto 40px auto;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"name": "todomvc-template",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"todomvc-common": "~0.1.4",
|
||||
"polymer-selector": "Polymer/polymer-selector",
|
||||
"flatiron-director": "Polymer/flatiron-director",
|
||||
"polymer-localstorage": "Polymer/polymer-localstorage"
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "flatiron-director",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#0.2.1"
|
||||
},
|
||||
"version": "0.2.1",
|
||||
"homepage": "https://github.com/Polymer/flatiron-director",
|
||||
"_release": "0.2.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "0.2.1",
|
||||
"commit": "d01427ec016607908f939aad6b7ab4164b355a73"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/flatiron-director.git",
|
||||
"_target": "*",
|
||||
"_originalSource": "Polymer/flatiron-director"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# Names should be added to this file with this pattern:
|
||||
#
|
||||
# For individuals:
|
||||
# Name <email address>
|
||||
#
|
||||
# For organizations:
|
||||
# Organization <fnmatch pattern>
|
||||
#
|
||||
Google Inc. <*@google.com>
|
||||
@@ -1 +0,0 @@
|
||||
See https://github.com/Polymer/polymer/blob/master/CONTRIBUTING.md
|
||||
@@ -1,28 +0,0 @@
|
||||
// Copyright (c) 2011 Nodejitsu Inc.
|
||||
// Copyright (c) 2012 The Polymer Authors. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,23 +0,0 @@
|
||||
Additional IP Rights Grant (Patents)
|
||||
|
||||
"This implementation" means the copyrightable works distributed by
|
||||
Google as part of the Polymer project.
|
||||
|
||||
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this section)
|
||||
patent license to make, have made, use, offer to sell, sell, import,
|
||||
transfer and otherwise run, modify and propagate the contents of this
|
||||
implementation of Polymer, where such license applies only to those
|
||||
patent claims, both currently owned or controlled by Google and acquired
|
||||
in the future, licensable by Google that are necessarily infringed by
|
||||
this implementation of Polymer. This grant does not include claims
|
||||
that would be infringed only as a consequence of further modification of
|
||||
this implementation. If you or your agent or exclusive licensee
|
||||
institute or order or agree to the institution of patent litigation
|
||||
against any entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that this implementation of Polymer or any code
|
||||
incorporated within this implementation of Polymer constitutes
|
||||
direct or contributory patent infringement, or inducement of patent
|
||||
infringement, then any patent rights granted to you under this License
|
||||
for this implementation of Polymer shall terminate as of the date
|
||||
such litigation is filed.
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "flatiron-director",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#0.2.1"
|
||||
},
|
||||
"version": "0.2.1"
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright 2013 The Polymer Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style
|
||||
license that can be found in the LICENSE file.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Director</title>
|
||||
<script src="../platform/platform.js"></script>
|
||||
<link rel="import" href="flatiron-director.html">
|
||||
</head>
|
||||
<body>
|
||||
<polymer-element name="x-test">
|
||||
<template>
|
||||
<flatiron-director route="{{route}}" autoHash></flatiron-director>
|
||||
hash: <input value="{{route}}">
|
||||
<a href="#barnacle">Relocate</a>
|
||||
</template>
|
||||
<script>
|
||||
Polymer('x-test', {
|
||||
route: 'hello'
|
||||
});
|
||||
</script>
|
||||
</polymer-element>
|
||||
|
||||
<x-test></x-test>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2011 Nodejitsu Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -1,37 +0,0 @@
|
||||
<!--
|
||||
Copyright 2013 The Polymer Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style
|
||||
license that can be found in the LICENSE file.
|
||||
-->
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<script src="director/director.min.js"></script>
|
||||
|
||||
<polymer-element name="flatiron-director" attributes="route autoHash">
|
||||
<script>
|
||||
(function() {
|
||||
var private_router;
|
||||
Polymer('flatiron-director', {
|
||||
autoHash: false,
|
||||
ready: function() {
|
||||
this.router.on(/(.*)/, function(route) {
|
||||
this.route = route;
|
||||
}.bind(this));
|
||||
this.route = this.router.getRoute(0) || '';
|
||||
},
|
||||
routeChanged: function() {
|
||||
if (this.autoHash) {
|
||||
window.location.hash = this.route;
|
||||
}
|
||||
this.fire('director-route', this.route);
|
||||
},
|
||||
get router() {
|
||||
if (!private_router) {
|
||||
private_router = new Router();
|
||||
private_router.init();
|
||||
}
|
||||
return private_router;
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</polymer-element>
|
||||
@@ -1,64 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>polymer api</title>
|
||||
<style>
|
||||
html, body {
|
||||
font-family: Arial, sans-serif;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
[noviewer] [ifnoviewer] {
|
||||
display: block;
|
||||
}
|
||||
[detector], [ifnoviewer], [noviewer] [ifviewer] {
|
||||
display: none;
|
||||
}
|
||||
[ifviewer], [ifnoviewer] {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
iframe {
|
||||
border: none;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#remote {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
<script src="../platform/platform.js"></script>
|
||||
<link rel="import" href="../polymer-home-page/polymer-home-page.html">
|
||||
</head>
|
||||
<body>
|
||||
<img detector src="../polymer-home-page/bowager-logo.png" onerror="noviewer()">
|
||||
<polymer-home-page ifviewer></polymer-home-page>
|
||||
<div ifnoviewer>
|
||||
<span id="remote">[remote]</span>
|
||||
<iframe></iframe>
|
||||
</div>
|
||||
<!-- -->
|
||||
<script>
|
||||
var remoteDocs = 'http://turbogadgetry.com/bowertopia/components/';
|
||||
// if no local info viewer, load it remotely
|
||||
function noviewer() {
|
||||
document.body.setAttribute('noviewer', '');
|
||||
var path = location.pathname.split('/');
|
||||
var module = path.pop() || path.pop();
|
||||
document.querySelector('iframe').src = remoteDocs + module;
|
||||
document.querySelector('title').textContent = module;
|
||||
}
|
||||
// for testing only
|
||||
var opts = window.location.search;
|
||||
if (opts.indexOf('noviewer') >= 0) {
|
||||
noviewer();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"name": "platform",
|
||||
"main": "platform.js",
|
||||
"homepage": "https://github.com/Polymer/platform",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"description": "Integrate platform polyfills: load, build, test",
|
||||
"keywords": [
|
||||
"polymer",
|
||||
"web",
|
||||
"components"
|
||||
],
|
||||
"license": "BSD",
|
||||
"private": true,
|
||||
"version": "0.2.1",
|
||||
"_release": "0.2.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "0.2.1",
|
||||
"commit": "961d6f68848b9479d4d778466c37c0835837bc1c"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/platform.git",
|
||||
"_target": "0.2.1",
|
||||
"_originalSource": "Polymer/platform"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# Names should be added to this file with this pattern:
|
||||
#
|
||||
# For individuals:
|
||||
# Name <email address>
|
||||
#
|
||||
# For organizations:
|
||||
# Organization <fnmatch pattern>
|
||||
#
|
||||
Google Inc. <*@google.com>
|
||||
@@ -1,73 +0,0 @@
|
||||
# Contributing
|
||||
|
||||
Want to contribute to Polymer? Great!
|
||||
|
||||
We are more than happy to accept external contributions to the project in the form of [feedback](https://groups.google.com/forum/?fromgroups=#!forum/polymer-dev), [bug reports](../../issues), and pull requests.
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
Before we can accept patches, there's a quick web form you need to fill out.
|
||||
|
||||
- If you're contributing as an individual (e.g. you own the intellectual property), fill out [this form](http://code.google.com/legal/individual-cla-v1.0.html).
|
||||
- If you're contributing under a company, fill out [this form](http://code.google.com/legal/corporate-cla-v1.0.html) instead.
|
||||
|
||||
This CLA asserts that contributions are owned by you and that we can license all work under our [license](LICENSE).
|
||||
|
||||
Other projects require a similar agreement: jQuery, Firefox, Apache, Node, and many more.
|
||||
|
||||
[More about CLAs](https://www.google.com/search?q=Contributor%20License%20Agreement)
|
||||
|
||||
## Initial setup
|
||||
|
||||
Here's an easy guide that should get you up and running:
|
||||
|
||||
1. Setup Grunt: `sudo npm install -g grunt-cli`
|
||||
1. Fork the project on github and pull down your copy.
|
||||
> replace the {{ username }} with your username and {{ repository }} with the repository name
|
||||
|
||||
git clone git@github.com:{{ username }}/{{ repository }}.git --recursive
|
||||
|
||||
Note the `--recursive`. This is necessary for submodules to initialize properly. If you don't do a recursive clone, you'll have to init them manually:
|
||||
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
Download and run the `pull-all.sh` script to install the sibling dependencies.
|
||||
|
||||
git clone git://github.com/Polymer/tools.git && tools/bin/pull-all.sh
|
||||
|
||||
1. Test your change
|
||||
> in the repo you've made changes to, run the tests:
|
||||
|
||||
cd $REPO
|
||||
npm install
|
||||
grunt test
|
||||
|
||||
1. Commit your code and make a pull request.
|
||||
|
||||
That's it for the one time setup. Now you're ready to make a change.
|
||||
|
||||
## Submitting a pull request
|
||||
|
||||
We iterate fast! To avoid potential merge conflicts, it's a good idea to pull from the main project before making a change and submitting a pull request. The easiest way to do this is setup a remote called `upstream` and do a pull before working on a change:
|
||||
|
||||
git remote add upstream git://github.com/Polymer/{{ repository }}.git
|
||||
|
||||
Then before making a change, do a pull from the upstream `master` branch:
|
||||
|
||||
git pull upstream master
|
||||
|
||||
To make life easier, add a "pull upstream" alias in your `.gitconfig`:
|
||||
|
||||
[alias]
|
||||
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
|
||||
|
||||
That will pull in changes from your forked repo, the main (upstream) repo, and merge the two. Then it's just a matter of running `git pu` before a change and pushing to your repo:
|
||||
|
||||
git checkout master
|
||||
git pu
|
||||
# make change
|
||||
git commit -a -m 'Awesome things.'
|
||||
git push
|
||||
|
||||
Lastly, don't forget to submit the pull request.
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright (c) 2012 The Polymer Authors. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,23 +0,0 @@
|
||||
Additional IP Rights Grant (Patents)
|
||||
|
||||
"This implementation" means the copyrightable works distributed by
|
||||
Google as part of the Polymer project.
|
||||
|
||||
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this section)
|
||||
patent license to make, have made, use, offer to sell, sell, import,
|
||||
transfer and otherwise run, modify and propagate the contents of this
|
||||
implementation of Polymer, where such license applies only to those
|
||||
patent claims, both currently owned or controlled by Google and acquired
|
||||
in the future, licensable by Google that are necessarily infringed by
|
||||
this implementation of Polymer. This grant does not include claims
|
||||
that would be infringed only as a consequence of further modification of
|
||||
this implementation. If you or your agent or exclusive licensee
|
||||
institute or order or agree to the institution of patent litigation
|
||||
against any entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that this implementation of Polymer or any code
|
||||
incorporated within this implementation of Polymer constitutes
|
||||
direct or contributory patent infringement, or inducement of patent
|
||||
infringement, then any patent rights granted to you under this License
|
||||
for this implementation of Polymer shall terminate as of the date
|
||||
such litigation is filed.
|
||||
@@ -1,6 +0,0 @@
|
||||
Platform
|
||||
========
|
||||
|
||||
Aggregated polyfills the Polymer platform.
|
||||
|
||||
[](https://github.com/igrigorik/ga-beacon)
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "platform",
|
||||
"main": "platform.js",
|
||||
"homepage": "https://github.com/Polymer/platform",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"description": "Integrate platform polyfills: load, build, test",
|
||||
"keywords": [
|
||||
"polymer",
|
||||
"web",
|
||||
"components"
|
||||
],
|
||||
"license": "BSD",
|
||||
"private": true,
|
||||
"version": "0.2.1"
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "polymer-localstorage",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#0.2.1"
|
||||
},
|
||||
"version": "0.2.1",
|
||||
"homepage": "https://github.com/Polymer/polymer-localstorage",
|
||||
"_release": "0.2.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "0.2.1",
|
||||
"commit": "19e87468b2a977bf79db60db247e0b4e8672e920"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/polymer-localstorage.git",
|
||||
"_target": "*",
|
||||
"_originalSource": "Polymer/polymer-localstorage"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# Names should be added to this file with this pattern:
|
||||
#
|
||||
# For individuals:
|
||||
# Name <email address>
|
||||
#
|
||||
# For organizations:
|
||||
# Organization <fnmatch pattern>
|
||||
#
|
||||
Google Inc. <*@google.com>
|
||||
@@ -1 +0,0 @@
|
||||
See https://github.com/Polymer/polymer/blob/master/CONTRIBUTING.md
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright (c) 2012 The Polymer Authors. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,23 +0,0 @@
|
||||
Additional IP Rights Grant (Patents)
|
||||
|
||||
"This implementation" means the copyrightable works distributed by
|
||||
Google as part of the Polymer project.
|
||||
|
||||
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this section)
|
||||
patent license to make, have made, use, offer to sell, sell, import,
|
||||
transfer and otherwise run, modify and propagate the contents of this
|
||||
implementation of Polymer, where such license applies only to those
|
||||
patent claims, both currently owned or controlled by Google and acquired
|
||||
in the future, licensable by Google that are necessarily infringed by
|
||||
this implementation of Polymer. This grant does not include claims
|
||||
that would be infringed only as a consequence of further modification of
|
||||
this implementation. If you or your agent or exclusive licensee
|
||||
institute or order or agree to the institution of patent litigation
|
||||
against any entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that this implementation of Polymer or any code
|
||||
incorporated within this implementation of Polymer constitutes
|
||||
direct or contributory patent infringement, or inducement of patent
|
||||
infringement, then any patent rights granted to you under this License
|
||||
for this implementation of Polymer shall terminate as of the date
|
||||
such litigation is filed.
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "polymer-localstorage",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#0.2.1"
|
||||
},
|
||||
"version": "0.2.1"
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>polymer-localstorage</title>
|
||||
<script src="../platform/platform.js"></script>
|
||||
<link rel="import" href="polymer-localstorage.html">
|
||||
<link rel="import" href="../polymer-ui-toggle-button/polymer-ui-toggle-button.html">
|
||||
</head>
|
||||
<body>
|
||||
<polymer-element name="x-test1">
|
||||
<template>
|
||||
string entered below will be stored in localStorage and automatically retrived from localStorage when the page is reloaded<br>
|
||||
<input value="{{value}}">
|
||||
<polymer-localstorage name="polymer-localstorage-x-test1" value="{{value}}"></polymer-localstorage>
|
||||
</template>
|
||||
<script>
|
||||
Polymer('x-test1');
|
||||
</script>
|
||||
</polymer-element>
|
||||
|
||||
<x-test1></x-test1>
|
||||
<br><br>
|
||||
|
||||
<polymer-element name="x-test2">
|
||||
<template>
|
||||
<polymer-ui-toggle-button value="{{mode}}"></polymer-ui-toggle-button>
|
||||
<polymer-localstorage name="polymer-localstorage-x-test2" value="{{mode}}"></polymer-localstorage>
|
||||
</template>
|
||||
<script>
|
||||
Polymer('x-test2', {
|
||||
mode: false
|
||||
});
|
||||
</script>
|
||||
</polymer-element>
|
||||
|
||||
<x-test2></x-test2>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,64 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>polymer api</title>
|
||||
<style>
|
||||
html, body {
|
||||
font-family: Arial, sans-serif;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
[noviewer] [ifnoviewer] {
|
||||
display: block;
|
||||
}
|
||||
[detector], [ifnoviewer], [noviewer] [ifviewer] {
|
||||
display: none;
|
||||
}
|
||||
[ifviewer], [ifnoviewer] {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
iframe {
|
||||
border: none;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#remote {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
<script src="../platform/platform.js"></script>
|
||||
<link rel="import" href="../polymer-home-page/polymer-home-page.html">
|
||||
</head>
|
||||
<body>
|
||||
<img detector src="../polymer-home-page/bowager-logo.png" onerror="noviewer()">
|
||||
<polymer-home-page ifviewer></polymer-home-page>
|
||||
<div ifnoviewer>
|
||||
<span id="remote">[remote]</span>
|
||||
<iframe></iframe>
|
||||
</div>
|
||||
<!-- -->
|
||||
<script>
|
||||
var remoteDocs = 'http://turbogadgetry.com/bowertopia/components/';
|
||||
// if no local info viewer, load it remotely
|
||||
function noviewer() {
|
||||
document.body.setAttribute('noviewer', '');
|
||||
var path = location.pathname.split('/');
|
||||
var module = path.pop() || path.pop();
|
||||
document.querySelector('iframe').src = remoteDocs + module;
|
||||
document.querySelector('title').textContent = module;
|
||||
}
|
||||
// for testing only
|
||||
var opts = window.location.search;
|
||||
if (opts.indexOf('noviewer') >= 0) {
|
||||
noviewer();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,127 +0,0 @@
|
||||
<!--
|
||||
Copyright 2013 The Polymer Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style
|
||||
license that can be found in the LICENSE file.
|
||||
-->
|
||||
<!--
|
||||
/**
|
||||
* @module Polymer Elements
|
||||
*/
|
||||
/**
|
||||
* Element access to localStorage. The "name" property
|
||||
* is the key to the data ("value" property) stored in localStorage.
|
||||
*
|
||||
* polymer-localstorage automatically saves the value to localStorage when
|
||||
* value is changed. Note that if value is an object auto-save will be
|
||||
* triggered only when value is a different instance.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* <polymer-localstorage name="my-app-storage" value="{{value}}"></polymer-localstorage>
|
||||
*
|
||||
* @class polymer-localstorage
|
||||
* @blurb Element access to localStorage.
|
||||
* @snap http://polymer.github.io/polymer-localstorage/snap.png
|
||||
* @author The Polymer Authors
|
||||
* @categories Data
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* Fired after it is loaded from localStorage.
|
||||
*
|
||||
* @event polymer-localstorage-load
|
||||
*/
|
||||
-->
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
|
||||
<polymer-element name="polymer-localstorage" attributes="name value useRaw autoSaveDisabled">
|
||||
<template>
|
||||
<style>
|
||||
:host {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
<script>
|
||||
Polymer('polymer-localstorage', {
|
||||
/**
|
||||
* The key to the data stored in localStorage.
|
||||
*
|
||||
* @attribute name
|
||||
* @type string
|
||||
* @default null
|
||||
*/
|
||||
name: '',
|
||||
/**
|
||||
* The data associated with the specified name.
|
||||
*
|
||||
* @attribute value
|
||||
* @type object
|
||||
* @default null
|
||||
*/
|
||||
value: null,
|
||||
/**
|
||||
* If true, the value is stored and retrieved without JSON processing.
|
||||
*
|
||||
* @attribute useRaw
|
||||
* @type boolean
|
||||
* @default false
|
||||
*/
|
||||
useRaw: false,
|
||||
/**
|
||||
* If true, auto save is disabled.
|
||||
*
|
||||
* @attribute autoSaveDisabled
|
||||
* @type boolean
|
||||
* @default false
|
||||
*/
|
||||
autoSaveDisabled: false,
|
||||
enteredView: function() {
|
||||
// wait for bindings are all setup
|
||||
this.async('load');
|
||||
},
|
||||
valueChanged: function() {
|
||||
if (this.loaded && !this.autoSaveDisabled) {
|
||||
this.save();
|
||||
}
|
||||
},
|
||||
load: function() {
|
||||
var v = localStorage.getItem(this.name);
|
||||
if (this.useRaw) {
|
||||
this.value = v;
|
||||
} else {
|
||||
// localStorage has a flaw that makes it difficult to determine
|
||||
// if a key actually exists or not (getItem returns null if the
|
||||
// key doesn't exist, which is not distinguishable from a stored
|
||||
// null value)
|
||||
// however, if not `useRaw`, an (unparsed) null value unambiguously
|
||||
// signals that there is no value in storage (a stored null value would
|
||||
// be escaped, i.e. "null")
|
||||
// in this case we save any non-null current (default) value
|
||||
if (v === null) {
|
||||
if (this.value !== null) {
|
||||
this.save();
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
v = JSON.parse(v);
|
||||
} catch(x) {
|
||||
}
|
||||
this.value = v;
|
||||
}
|
||||
}
|
||||
this.loaded = true;
|
||||
this.asyncFire('polymer-localstorage-load');
|
||||
},
|
||||
/**
|
||||
* Saves the value to localStorage.
|
||||
*
|
||||
* @method save
|
||||
*/
|
||||
save: function() {
|
||||
var v = this.useRaw ? this.value : JSON.stringify(this.value);
|
||||
localStorage.setItem(this.name, v);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</polymer-element>
|
||||
@@ -1,28 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>polymer-localstorage</title>
|
||||
<script src="../../../platform/platform.js"></script>
|
||||
<script src="../../../tools/test/htmltest.js"></script>
|
||||
<script src="../../../tools/test/chai/chai.js"></script>
|
||||
<link rel="import" href="../../polymer-localstorage.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<polymer-localstorage id="localstorage" name="polymer-localstorage-test" useRaw></polymer-localstorage>
|
||||
|
||||
<script>
|
||||
var assert = chai.assert;
|
||||
document.addEventListener('polymer-ready', function() {
|
||||
var s = document.querySelector('#localstorage');
|
||||
var m = 'hello wold';
|
||||
window.localStorage.setItem(s.name, m);
|
||||
s.load();
|
||||
assert.equal(s.value, m);
|
||||
s.value = 'goodbye';
|
||||
assert.equal(window.localStorage.getItem(s.name), m);
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013 The Polymer Authors. All rights reserved.
|
||||
* Use of this source code is governed by a BSD-style
|
||||
* license that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
htmlSuite('polymer-localstorage', function() {
|
||||
htmlTest('html/polymer-localstorage.html');
|
||||
});
|
||||
@@ -1,31 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright 2013 The Polymer Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style
|
||||
license that can be found in the LICENSE file.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>polymer-localstorage Test Runner (Mocha)</title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- -->
|
||||
<link rel="stylesheet" href="../../tools/test/mocha/mocha.css" />
|
||||
<script src="../../tools/test/mocha/mocha.js"></script>
|
||||
<script src="../../tools/test/chai/chai.js"></script>
|
||||
<script src="../../tools/test/mocha-htmltest.js"></script>
|
||||
<!-- -->
|
||||
<script src="../../platform/platform.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script>
|
||||
mocha.setup({ui: 'tdd', slow: 1000, htmlbase: ''});
|
||||
</script>
|
||||
<!-- -->
|
||||
<script src="js/polymer-localstorage.js"></script>
|
||||
<!-- -->
|
||||
<script>
|
||||
mocha.run();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "polymer-selection",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#0.2.1"
|
||||
},
|
||||
"version": "0.2.1",
|
||||
"homepage": "https://github.com/Polymer/polymer-selection",
|
||||
"_release": "0.2.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "0.2.1",
|
||||
"commit": "414b5314477367acb821fc515279f18bc66e4897"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/polymer-selection.git",
|
||||
"_target": "0.2.1",
|
||||
"_originalSource": "Polymer/polymer-selection"
|
||||
}
|
||||