Last active
December 18, 2015 11:08
-
-
Save nunobaba/5773150 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<element name="x-app"> | |
<template> | |
<section id="globe"> | |
<header class="hdr"> | |
<h1>App Header</h1> | |
</header> | |
</section> | |
</template> | |
</element> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<link rel="import" href="app.html"> | |
<title>App</title> | |
</head> | |
<body> | |
<x-app></x-app> | |
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> | |
<script type="application/dart">main() {}</script> | |
<script src="packages/browser/dart.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:html'; | |
import 'package:unittest/unittest.dart'; | |
import 'package:web_ui/web_ui.dart'; | |
import 'package:web_ui/observe/html.dart'; | |
main() { | |
useShadowDom = true; | |
test('Header element is initially present.', () { | |
var story = () => expect(query('#hdr'), isNotNull); | |
Timer.run(expectAsync0(story)); | |
}); | |
test('EchapApp component is loaded.', () { | |
var story = () => expect(query('#globe'), isNotNull); | |
Timer.run(expectAsync0(story)); | |
}); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="import" href="../web/app.html"> | |
<script src="packages/web_ui/testing/testing.js"></script> | |
<title>App Main: Test</title> | |
</head> | |
<body> | |
<header id="hdr"> | |
..Now a component: | |
</header> | |
<x-app></x-app> | |
<script type="application/dart" src="main_test.dart"></script> | |
<script src="packages/browser/dart.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment