Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dart.googlesource.com-test
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
dart.googlesource.com-test
Commits
d212d457
Commit
d212d457
authored
8 years ago
by
Natalie Weizenbaum
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use modern JS interop in the host page. (#481)
parent
4474285d
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/src/runner/browser/static/host.dart
+12
-3
12 additions, 3 deletions
lib/src/runner/browser/static/host.dart
lib/src/runner/browser/static/host.dart.js
+8394
-8552
8394 additions, 8552 deletions
lib/src/runner/browser/static/host.dart.js
pubspec.yaml
+1
-0
1 addition, 0 deletions
pubspec.yaml
with
8407 additions
and
8555 deletions
lib/src/runner/browser/static/host.dart
+
12
−
3
View file @
d212d457
...
...
@@ -5,10 +5,20 @@
import
'dart:async'
;
import
'dart:convert'
;
import
'dart:html'
;
import
'dart:js'
as
js
;
import
'package:stack_trace/stack_trace.dart'
;
import
'package:stream_channel/stream_channel.dart'
;
import
'package:js/js.dart'
;
/// A class defined in content shell, used to control its behavior.
@JS
()
class
_TestRunner
{
external
void
waitUntilDone
();
}
/// Returns the current content shell runner, or `null` if none exists.
@JS
()
external
_TestRunner
get
testRunner
;
/// The iframes created for each loaded test suite, indexed by the suite id.
final
_iframes
=
new
Map
<
int
,
IFrameElement
>();
...
...
@@ -67,8 +77,7 @@ final _iframes = new Map<int, IFrameElement>();
void
main
()
{
// This tells content_shell not to close immediately after the page has
// rendered.
var
testRunner
=
js
.
context
[
'testRunner'
];
if
(
testRunner
!=
null
)
testRunner
.
callMethod
(
'waitUntilDone'
,
[]);
testRunner
?.
waitUntilDone
();
runZoned
(()
{
var
serverChannel
=
_connectToServer
();
...
...
This diff is collapsed.
Click to expand it.
lib/src/runner/browser/static/host.dart.js
+
8394
−
8552
View file @
d212d457
This diff is collapsed.
Click to expand it.
pubspec.yaml
+
1
−
0
View file @
d212d457
...
...
@@ -36,4 +36,5 @@ dependencies:
matcher
:
'
>=0.12.0
<0.12.1'
dev_dependencies
:
fake_async
:
'
^0.1.2'
js
:
'
^0.6.0'
scheduled_test
:
'
^0.12.5'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment