Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: test/data/input/component_inherit_test.html

Issue 11275029: Support for specifying an output directory (issue #106) (Closed) Base URL: git@github.com:dart-lang/dart-web-components.git@master
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <!-- 2 <!--
3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 for details. All rights reserved. Use of this source code is governed by a 4 for details. All rights reserved. Use of this source code is governed by a
5 BSD-style license that can be found in the LICENSE file. 5 BSD-style license that can be found in the LICENSE file.
6 --> 6 -->
7 <html lang="en"> 7 <html lang="en">
8 <head> 8 <head>
9 <meta charset="utf-8"> 9 <meta charset="utf-8">
10 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 10 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
11 <!-- use ../input/ so that the url also works from the output directory --> 11 <script type="application/javascript" src="testing.js"></script>
12 <script type="application/javascript" src="../input/testing.js"></script>
13 </head> 12 </head>
14 <body> 13 <body>
15 <element name="x-base" extends="div" constructor="Base"> 14 <element name="x-base" extends="div" constructor="Base">
16 <template> 15 <template>
17 <div>Here are the lifecycle methods that have been called:</div> 16 <div>Here are the lifecycle methods that have been called:</div>
18 <pre>{{status}}</pre> 17 <pre>{{status}}</pre>
19 <div>You should see Base created, Derived created, 18 <div>You should see Base created, Derived created,
20 Base inserted, Derived inserted</div> 19 Base inserted, Derived inserted</div>
21 </template> 20 </template>
22 <script type="application/dart"> 21 <script type="application/dart">
23 import 'package:web_components/web_component.dart'; 22 import 'package:web_components/web_component.dart';
24 class Base extends WebComponent { 23 class Base extends WebComponent {
25 String status = ''; 24 String status = '';
26 created() { 25 created() {
27 status = '${status}\nBase.created'; 26 status = '${status}\nBase.created';
28 } 27 }
29 inserted() { 28 inserted() {
30 status = '${status}\nBase.inserted'; 29 status = '${status}\nBase.inserted';
31 } 30 }
32 } 31 }
33 </script> 32 </script>
34 </element> 33 </element>
35 <element name="x-derived" extends="x-base" constructor="Derived"> 34 <element name="x-derived" extends="x-base" constructor="Derived">
36 <template><shadow></shadow></template> 35 <template><shadow></shadow></template>
37 <script type="application/dart"> 36 <script type="application/dart">
38 import 'package:web_components/web_components.dart'; 37 import 'package:web_components/web_components.dart';
39 38
40 // TODO(jmesserly): this is very weird
41 import '_component_inherit_test.html.x_base.dart';
42
43 class Derived extends Base { 39 class Derived extends Base {
44 created() { 40 created() {
45 super.created(); 41 super.created();
46 status = '${status}\nDerived.created'; 42 status = '${status}\nDerived.created';
47 } 43 }
48 inserted() { 44 inserted() {
49 super.inserted(); 45 super.inserted();
50 status = '${status}\nDerived.inserted'; 46 status = '${status}\nDerived.inserted';
51 } 47 }
52 } 48 }
53 </script> 49 </script>
54 </element> 50 </element>
55 <div is="x-derived"></div> 51 <div is="x-derived"></div>
56 <script type="application/dart"> 52 <script type="application/dart">
57 import '../input/common.dart'; 53 import 'common.dart';
58 import 'dart:html'; 54 import 'dart:html';
59 main() { 55 main() {
60 window.setTimeout(() => window.postMessage('done', '*'), 0); 56 window.setTimeout(() => window.postMessage('done', '*'), 0);
61 } 57 }
62 </script> 58 </script>
63 </body> 59 </body>
64 </html> 60 </html>
OLDNEW
« no previous file with comments | « test/data/input/component_inherit_noscript_test.html ('k') | test/data/input/conditional2_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698