mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:27:43 +00:00
Make unittest follow the new package layout.
Review URL: https://codereview.chromium.org//10918240 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12396 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
e71572cebc
commit
2ba81033a6
|
@ -4,9 +4,8 @@
|
|||
|
||||
#library('args_test');
|
||||
|
||||
#import('../../unittest/unittest.dart');
|
||||
|
||||
// TODO(rnystrom): Use "package:" URL here when test.dart can handle pub.
|
||||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../../unittest/lib/unittest.dart');
|
||||
#import('../lib/args.dart');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../lib/dartdoc.dart', prefix: 'dd');
|
||||
#import('../lib/markdown.dart', prefix: 'md');
|
||||
|
||||
// TODO(rnystrom): Better path to unittest.
|
||||
#import('../../unittest/unittest.dart');
|
||||
#import('../../unittest/lib/unittest.dart');
|
||||
|
||||
main() {
|
||||
group('countOccurrences', () {
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
|
||||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../lib/markdown.dart');
|
||||
|
||||
// TODO(rnystrom): Better path to unittest.
|
||||
#import('../../unittest/unittest.dart');
|
||||
#import('../../unittest/lib/unittest.dart');
|
||||
|
||||
/// Most of these tests are based on observing how showdown behaves:
|
||||
/// http://softwaremaniacs.org/playground/showdown-highlight/
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
|
||||
#library('bidi_format_test');
|
||||
|
||||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../intl.dart');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
|
||||
/**
|
||||
* Tests the bidirectional text formatting library.
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
|
||||
#library('bidi_utils_test');
|
||||
|
||||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../intl.dart');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
|
||||
/**
|
||||
* Tests the bidi utilities library.
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
|
||||
#library('date_time_format_tests');
|
||||
|
||||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../date_format.dart');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
#import('date_time_format_test_data.dart');
|
||||
#import('../intl.dart');
|
||||
#import('../lib/date_format_internal.dart');
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
*/
|
||||
#library('intl_message_test_2');
|
||||
|
||||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../date_format.dart');
|
||||
#import('../date_symbol_data_local.dart');
|
||||
#import('../intl.dart');
|
||||
#import('../message_lookup_local.dart');
|
||||
#import('../example/basic/basic_example.dart');
|
||||
#import('../../unittest/unittest.dart');
|
||||
#import('../../unittest/lib/unittest.dart');
|
||||
|
||||
List list;
|
||||
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
#library('intl_message_test');
|
||||
|
||||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../intl.dart');
|
||||
#import('../../unittest/unittest.dart');
|
||||
#import('../../unittest/lib/unittest.dart');
|
||||
#import('../message_lookup_local.dart');
|
||||
|
||||
/** Tests the MessageFormat library in dart. */
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
#library('intl_test');
|
||||
|
||||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../intl.dart');
|
||||
#import('../../unittest/unittest.dart');
|
||||
#import('../../unittest/lib/unittest.dart');
|
||||
#import('../date_symbol_data_local.dart');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
#library('number_format_test');
|
||||
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
// TODO(rnystrom): Use "package:" URL (#4968).
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../number_format.dart');
|
||||
#import('../intl.dart');
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
// TODO(rnystrom): Use "package:" import when test.dart supports it (#4968).
|
||||
#import('../lib/logging.dart');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
|
||||
main() {
|
||||
test('level comparison is a valid comparator', () {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#import('dart:html');
|
||||
#import('unittest.dart');
|
||||
|
||||
#source('html_print.dart');
|
||||
#source('src/html_print.dart');
|
||||
|
||||
class HtmlConfiguration extends Configuration {
|
||||
/** Whether this is run within dartium layout tests. */
|
|
@ -6,7 +6,7 @@
|
|||
* A library for writing dart unit tests.
|
||||
*
|
||||
* To import this library, specify the relative path to
|
||||
* pkg/unittest/unittest.dart.
|
||||
* pkg/unittest/lib/unittest.dart.
|
||||
*
|
||||
* ##Concepts##
|
||||
*
|
||||
|
@ -138,20 +138,20 @@
|
|||
|
||||
#import('dart:isolate');
|
||||
|
||||
#source('collection_matchers.dart');
|
||||
#source('config.dart');
|
||||
#source('core_matchers.dart');
|
||||
#source('description.dart');
|
||||
#source('expect.dart');
|
||||
#source('future_matchers.dart');
|
||||
#source('interfaces.dart');
|
||||
#source('map_matchers.dart');
|
||||
#source('matcher.dart');
|
||||
#source('mock.dart');
|
||||
#source('numeric_matchers.dart');
|
||||
#source('operator_matchers.dart');
|
||||
#source('string_matchers.dart');
|
||||
#source('test_case.dart');
|
||||
#source('src/collection_matchers.dart');
|
||||
#source('src/config.dart');
|
||||
#source('src/core_matchers.dart');
|
||||
#source('src/description.dart');
|
||||
#source('src/expect.dart');
|
||||
#source('src/future_matchers.dart');
|
||||
#source('src/interfaces.dart');
|
||||
#source('src/map_matchers.dart');
|
||||
#source('src/matcher.dart');
|
||||
#source('src/mock.dart');
|
||||
#source('src/numeric_matchers.dart');
|
||||
#source('src/operator_matchers.dart');
|
||||
#source('src/string_matchers.dart');
|
||||
#source('src/test_case.dart');
|
||||
|
||||
/** [Configuration] used by the unittest library. */
|
||||
Configuration _config = null;
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('instance_test');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
#source('test_utils.dart');
|
||||
|
||||
doesThrow() { throw 'X'; }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('matcherTest');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
#source('test_utils.dart');
|
||||
|
||||
doesNotThrow() {}
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('unittestTest');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
|
||||
main() {
|
||||
test('Mocking: RegExp CallMatcher bad', () {
|
||||
var m = new Mock();
|
||||
m.when(callsTo(matches('^[A-Z]'))).
|
||||
alwaysThrow('Method names must start with lower case.');
|
||||
m.Test();
|
||||
var m = new Mock();
|
||||
m.when(callsTo(matches('^[A-Z]'))).
|
||||
alwaysThrow('Method names must start with lower case.');
|
||||
m.Test();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('unittestTest');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
|
||||
main() {
|
||||
test('Mocking: stepwiseValidate', () {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('unittestTest');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
|
||||
class MockList extends Mock implements List {
|
||||
}
|
||||
|
@ -166,11 +166,11 @@ main() {
|
|||
m.getLogs(null, returning(4)).verify(happenedExactly(2));
|
||||
});
|
||||
|
||||
test('Mocking: RegExp CallMatcher good', () {
|
||||
var m = new Mock();
|
||||
m.when(callsTo(matches('^[A-Z]'))).
|
||||
alwaysThrow('Method names must start with lower case.');
|
||||
m.test();
|
||||
test('Mocking: RegExp CallMatcher good', () {
|
||||
var m = new Mock();
|
||||
m.when(callsTo(matches('^[A-Z]'))).
|
||||
alwaysThrow('Method names must start with lower case.');
|
||||
m.test();
|
||||
});
|
||||
|
||||
test('Mocking: No logging', () {
|
||||
|
@ -600,7 +600,7 @@ main() {
|
|||
expect(log[pos + 1].args[0] - log[pos].args[0], equals(1));
|
||||
return 2;
|
||||
});
|
||||
expect(total, equals((0 * 1) + (2 * 3) + (4 * 5) + (6 * 7) + (8 * 9)));
|
||||
expect(total, equals((0 * 1) + (2 * 3) + (4 * 5) + (6 * 7) + (8 * 9)));
|
||||
});
|
||||
|
||||
test('Mocking: clearLogs', () {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#library('unittestTest');
|
||||
#import('dart:isolate');
|
||||
#import('../../../pkg/unittest/unittest.dart');
|
||||
#import('../../../pkg/unittest/lib/unittest.dart');
|
||||
|
||||
var tests; // array of test names
|
||||
var expected; // array of test expected results (from buildStatusString)
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
// Tests that benchmark classes used in perf testing are not broken.
|
||||
#import('benchmark_lib.dart');
|
||||
#import('dart:html');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
|
||||
void main() {
|
||||
useHtmlConfiguration();
|
||||
|
||||
test('performanceTesting', () {
|
||||
test('performanceTesting', () {
|
||||
window.setTimeout(BENCHMARK_SUITE.runBenchmarks, 0);
|
||||
window.setTimeout(expectAsync0(testForCompletion), 0);
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('AsyncWindowTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('AudioContextTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('AudioElementTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('BElementTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('blob_test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('CacheTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('CallbacksTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('CanvasTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// We have aliased the legacy type CanvasPixelArray with the new type
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('CanvasTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('CanvasUsingHtmlTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html', prefix: 'html');
|
||||
#import('dart:html');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('CrossFrameTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('CSSTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('CSSStyleDeclarationTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('DartObjectLocalStorageTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// TODO(vsm): Rename this to wrapper_caching_test or similar. It's
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('datalistelement_dataview_test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('DocumentTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('DocumentFragmentTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
#source('util.dart');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('DOMConstructorsTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file
|
||||
|
||||
#library('DOMIsolatesTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
#import('dart:isolate');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('DOMParserTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file
|
||||
|
||||
#library('ElementAddTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
#source('util.dart');
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('ElementTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
// element_constructor_foo_test.dart file.
|
||||
|
||||
#library('ElementConstructorTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('ElementTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
expectLargeRect(ClientRect rect) {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('EventCustomEventTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// TODO(nweiz): Make this private to testEvents when Frog supports closures with
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('EventTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// TODO(nweiz): Make this private to testEvents when Frog supports closures with
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('EventsTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('ExceptionsTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('fileapi');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
void fail(message) {
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#library('FormDataTest');
|
||||
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
void main() {
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#library('FormElementTest');
|
||||
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
void main() {
|
||||
|
@ -34,47 +34,47 @@ void main() {
|
|||
form.acceptCharset = charset;
|
||||
expect(form.acceptCharset, charset);
|
||||
});
|
||||
|
||||
|
||||
test('actionTest', () {
|
||||
var action = 'http://dartlang.org/';
|
||||
form.action = action;
|
||||
expect(form.action, action);
|
||||
});
|
||||
|
||||
|
||||
test('autocompleteTest', () {
|
||||
var auto = 'on';
|
||||
form.autocomplete = auto;
|
||||
expect(form.autocomplete, auto);
|
||||
});
|
||||
|
||||
|
||||
test('encodingAndEnctypeTest', () {
|
||||
expect(form.enctype, form.encoding);
|
||||
});
|
||||
|
||||
|
||||
test('lengthTest', () {
|
||||
expect(form.length, 0);
|
||||
form.innerHTML = '<label>Google: <input type="search" name="q"></label> '
|
||||
'<input type="submit" value="Search...">';
|
||||
expect(form.length, 2);
|
||||
});
|
||||
|
||||
|
||||
test('methodTest', () {
|
||||
var method = 'post';
|
||||
form.method = method;
|
||||
expect(form.method, method);
|
||||
});
|
||||
|
||||
|
||||
test('nameTest', () {
|
||||
var name = 'aname';
|
||||
form.name = name;
|
||||
expect(form.name, name);
|
||||
});
|
||||
|
||||
|
||||
test('noValidateTest', () {
|
||||
form.noValidate = true;
|
||||
expect(form.noValidate, true);
|
||||
});
|
||||
|
||||
|
||||
test('targetTest', () {
|
||||
var target = 'target';
|
||||
form.target = target;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('HiddenDom1Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// Test that the dart:html API does not leak native jsdom methods:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('HiddenDom2Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// Test that the dart:html API does not leak native jsdom methods:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('HistoryTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('AudioElementTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('ElementListTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// Test that ElementList implements List<T>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('ElementTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('HTMLOptionsCollectionTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('IndexedDB1Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
const String DB_NAME = 'Test';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('IndexedDB1Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
#import('dart:coreimpl');
|
||||
#import('utils.dart');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('IndexedDB3Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// Read with cursor.
|
||||
|
@ -56,7 +56,7 @@ class Test {
|
|||
|
||||
fail(message) => (e) {
|
||||
guardAsync(() {
|
||||
Expect.fail('IndexedDB failure: $message');
|
||||
Expect.fail('IndexedDB failure: $message');
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('IndexedDB4Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// Test for IDBKeyRange and IDBCursor.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('InnerFrameTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('InstanceOfTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('IsolatesTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
#import('dart:json');
|
||||
#import('dart:isolate', prefix:'isolate');
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file
|
||||
|
||||
#library('JsInterop1Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
#import('dart:json');
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file
|
||||
|
||||
#library('JsInterop2Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
#import('dart:isolate');
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file
|
||||
|
||||
#library('JsInterop3Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
#import('dart:isolate');
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file
|
||||
|
||||
#library('JsInterop4Test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
#import('dart:isolate');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('KeyNameLocationTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
// Test for existence of some KeyName and KeyLocation constants.
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('LocalStorageTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('LocationTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('MeasurementTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('SerializedScriptValueTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('mutationobserver_test');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('NativeGCTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('NodeTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
Node makeNode() => new Element.tag('div');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#library('PerformanceApiTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
@ -10,7 +10,7 @@ main() {
|
|||
var requestStart = window.performance.timing.requestStart;
|
||||
var responseStart = window.performance.timing.responseStart;
|
||||
var responseEnd = window.performance.timing.responseEnd;
|
||||
|
||||
|
||||
var loading = window.performance.timing.domLoading;
|
||||
var loadedStart = window.performance.timing.domContentLoadedEventStart;
|
||||
var loadedEnd = window.performance.timing.domContentLoadedEventEnd;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('QueryTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
@ -16,7 +16,7 @@ main() {
|
|||
final element =
|
||||
new Element.html("<div><br/><img/><input/><img/></div>");
|
||||
document.body.nodes.addAll([div, canvas, element]);
|
||||
|
||||
|
||||
|
||||
test('query', () {
|
||||
Element e = query('#testcanvas');
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file
|
||||
|
||||
#library('NodeListTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#library('RequestAnimationFrameTest');
|
||||
#import('../../pkg/unittest/unittest.dart');
|
||||
#import('../../pkg/unittest/html_config.dart');
|
||||
#import('../../pkg/unittest/lib/unittest.dart');
|
||||
#import('../../pkg/unittest/lib/html_config.dart');
|
||||
#import('dart:html');
|
||||
|
||||
main() {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue