Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
ebfe6020
Unverified
Commit
ebfe6020
authored
Oct 07, 2019
by
Yegor
Committed by
GitHub
Oct 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable more web tests; use blacklist to filter them out (#41922)
Add more web tests;use blacklist instead of whitelist
parent
cf0d4979
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
21 deletions
+27
-21
test.dart
dev/bots/test.dart
+22
-12
transformed_monodrag_test.dart
...ages/flutter/test/gestures/transformed_monodrag_test.dart
+2
-2
matchers.dart
packages/flutter_test/lib/src/matchers.dart
+3
-3
chrome.dart
packages/flutter_tools/lib/src/web/chrome.dart
+0
-4
No files found.
dev/bots/test.dart
View file @
ebfe6020
...
@@ -435,18 +435,28 @@ Future<void> _runTests() async {
...
@@ -435,18 +435,28 @@ Future<void> _runTests() async {
}
}
Future
<
void
>
_runWebTests
()
async
{
Future
<
void
>
_runWebTests
()
async
{
await
_runFlutterWebTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
),
tests:
<
String
>[
final
Directory
flutterPackageDir
=
Directory
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
));
'test/foundation/'
,
final
Directory
testDir
=
Directory
(
path
.
join
(
flutterPackageDir
.
path
,
'test'
));
'test/physics/'
,
'test/services/'
,
// TODO(yjbanov): we're getting rid of this blacklist as part of https://github.com/flutter/flutter/projects/60
// TODO(yjbanov): re-enable when flakiness is resolved
const
List
<
String
>
kBlacklist
=
<
String
>[
// 'test/rendering/',
'test/cupertino'
,
// 'test/painting/',
'test/examples'
,
// 'test/scheduler/',
'test/material'
,
// 'test/semantics/',
'test/painting'
,
// 'test/widgets/',
'test/rendering'
,
// 'test/material/',
'test/semantics'
,
]);
'test/widgets'
,
];
final
List
<
String
>
directories
=
testDir
.
listSync
()
.
whereType
<
Directory
>()
.
map
<
String
>((
Directory
dir
)
=>
path
.
relative
(
dir
.
path
,
from:
flutterPackageDir
.
path
))
.
where
((
String
relativePath
)
=>
!
kBlacklist
.
contains
(
relativePath
))
.
toList
();
await
_runFlutterWebTest
(
flutterPackageDir
.
path
,
tests:
directories
);
await
_runFlutterWebTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_web_plugins'
),
tests:
<
String
>[
'test'
]);
await
_runFlutterWebTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_web_plugins'
),
tests:
<
String
>[
'test'
]);
}
}
...
...
packages/flutter/test/gestures/transformed_monodrag_test.dart
View file @
ebfe6020
...
@@ -334,7 +334,7 @@ void main() {
...
@@ -334,7 +334,7 @@ void main() {
expect
(
startDetails
,
hasLength
(
1
));
expect
(
startDetails
,
hasLength
(
1
));
expect
(
updateDetails
.
single
.
globalPosition
,
within
(
distance:
0.0001
,
from:
const
Offset
(
400
+
kTouchSlop
+
3
,
300
+
kTouchSlop
+
4
)));
expect
(
updateDetails
.
single
.
globalPosition
,
within
(
distance:
0.0001
,
from:
const
Offset
(
400
+
kTouchSlop
+
3
,
300
+
kTouchSlop
+
4
)));
expect
(
updateDetails
.
single
.
delta
,
within
(
distance:
0.1
,
from:
const
Offset
(
5
,
0.0
)));
// sqrt(3^2 + 4^2)
expect
(
updateDetails
.
single
.
delta
,
within
(
distance:
0.1
,
from:
const
Offset
(
5
,
0.0
)));
// sqrt(3^2 + 4^2)
expect
(
updateDetails
.
single
.
primaryDelta
,
within
(
distance:
0.1
,
from:
5.0
));
// sqrt(3^2 + 4^2)
expect
(
updateDetails
.
single
.
primaryDelta
,
within
<
double
>
(
distance:
0.1
,
from:
5.0
));
// sqrt(3^2 + 4^2)
});
});
});
});
...
@@ -662,7 +662,7 @@ void main() {
...
@@ -662,7 +662,7 @@ void main() {
expect
(
startDetails
,
hasLength
(
1
));
expect
(
startDetails
,
hasLength
(
1
));
expect
(
updateDetails
.
single
.
globalPosition
,
within
(
distance:
0.0001
,
from:
const
Offset
(
400
+
kTouchSlop
-
4
,
300
+
kTouchSlop
+
3
)));
expect
(
updateDetails
.
single
.
globalPosition
,
within
(
distance:
0.0001
,
from:
const
Offset
(
400
+
kTouchSlop
-
4
,
300
+
kTouchSlop
+
3
)));
expect
(
updateDetails
.
single
.
delta
,
within
(
distance:
0.1
,
from:
const
Offset
(
0.0
,
5.0
)));
// sqrt(3^2 + 4^2)
expect
(
updateDetails
.
single
.
delta
,
within
(
distance:
0.1
,
from:
const
Offset
(
0.0
,
5.0
)));
// sqrt(3^2 + 4^2)
expect
(
updateDetails
.
single
.
primaryDelta
,
within
(
distance:
0.1
,
from:
5.0
));
// sqrt(3^2 + 4^2)
expect
(
updateDetails
.
single
.
primaryDelta
,
within
<
double
>
(
distance:
0.1
,
from:
5.0
));
// sqrt(3^2 + 4^2)
});
});
});
});
}
}
packages/flutter_test/lib/src/matchers.dart
View file @
ebfe6020
...
@@ -1026,8 +1026,8 @@ double _sizeDistance(Size a, Size b) {
...
@@ -1026,8 +1026,8 @@ double _sizeDistance(Size a, Size b) {
/// The distance is computed by a [DistanceFunction].
/// The distance is computed by a [DistanceFunction].
///
///
/// If `distanceFunction` is null, a standard distance function is used for the
/// If `distanceFunction` is null, a standard distance function is used for the
/// `
runtimeType` of the `from` argument. Standard functions are defined for
/// `
T` generic argument. Standard functions are defined for the following
/// t
he following t
ypes:
/// types:
///
///
/// * [Color], whose distance is the maximum component-wise delta.
/// * [Color], whose distance is the maximum component-wise delta.
/// * [Offset], whose distance is the Euclidean distance computed using the
/// * [Offset], whose distance is the Euclidean distance computed using the
...
@@ -1050,7 +1050,7 @@ Matcher within<T>({
...
@@ -1050,7 +1050,7 @@ Matcher within<T>({
@required
T
from
,
@required
T
from
,
DistanceFunction
<
T
>
distanceFunction
,
DistanceFunction
<
T
>
distanceFunction
,
})
{
})
{
distanceFunction
??=
_kStandardDistanceFunctions
[
from
.
runtimeType
];
distanceFunction
??=
_kStandardDistanceFunctions
[
T
];
if
(
distanceFunction
==
null
)
{
if
(
distanceFunction
==
null
)
{
throw
ArgumentError
(
throw
ArgumentError
(
...
...
packages/flutter_tools/lib/src/web/chrome.dart
View file @
ebfe6020
...
@@ -154,10 +154,6 @@ class ChromeLauncher {
...
@@ -154,10 +154,6 @@ class ChromeLauncher {
return
chrome
;
return
chrome
;
}
}
/// Connects to an instance of Chrome with an open debug port.
static
Future
<
Chrome
>
fromExisting
(
int
port
)
async
=>
_connect
(
Chrome
.
_
(
port
,
ChromeConnection
(
'localhost'
,
port
)),
false
);
static
Future
<
Chrome
>
get
connectedInstance
=>
_currentCompleter
.
future
;
static
Future
<
Chrome
>
get
connectedInstance
=>
_currentCompleter
.
future
;
/// Returns the full URL of the Chrome remote debugger for the main page.
/// Returns the full URL of the Chrome remote debugger for the main page.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment