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

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

Issue 11465028: rename web_components -> web_ui (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Created 8 years 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 <script type="application/javascript" src="testing.js"></script> 11 <script type="application/javascript" src="testing.js"></script>
12 </head> 12 </head>
13 <body> 13 <body>
14 <!-- Tests the iterate attribute on a node. --> 14 <!-- Tests the iterate attribute on a node. -->
15 <div id='test' template if="x == 3">{{x}}</div> 15 <div id='test' template if="x == 3">{{x}}</div>
16 <script type="application/dart"> 16 <script type="application/dart">
17 import 'dart:html'; 17 import 'dart:html';
18 import 'package:unittest/unittest.dart'; 18 import 'package:unittest/unittest.dart';
19 import 'package:web_components/watcher.dart'; 19 import 'package:web_ui/watcher.dart';
20 var x = 2; 20 var x = 2;
21 21
22 main() { 22 main() {
23 window.setTimeout(() { 23 window.setTimeout(() {
24 expect(document.query('#test'), isNull); 24 expect(document.query('#test'), isNull);
25 var placeholder = document.body.query('div#__e-1'); 25 var placeholder = document.body.query('div#__e-1');
26 expect(placeholder, isNotNull); 26 expect(placeholder, isNotNull);
27 expect(placeholder.style.display, equals('none')); 27 expect(placeholder.style.display, equals('none'));
28 x = 3; 28 x = 3;
29 dispatch(); 29 dispatch();
30 window.setTimeout(() { 30 window.setTimeout(() {
31 var div = document.query('#test'); 31 var div = document.query('#test');
32 expect(div, isNotNull); 32 expect(div, isNotNull);
33 expect(div.innerHtml, equals('3')); 33 expect(div.innerHtml, equals('3'));
34 expect(div.previousNode, same(placeholder)); 34 expect(div.previousNode, same(placeholder));
35 window.setTimeout(() => window.postMessage('done', '*'), 0); 35 window.setTimeout(() => window.postMessage('done', '*'), 0);
36 }, 0); 36 }, 0);
37 }, 0); 37 }, 0);
38 } 38 }
39 </script> 39 </script>
40 </body> 40 </body>
41 </html> 41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698