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

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

Issue 23532024: Changes in webui to comply with the safe html changes. Now that Nodes can be (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « test/data/expected/escape3_test.html.txt ('k') | test/observe_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 src="packages/web_ui/testing/testing.js"></script> 11 <script src="packages/web_ui/testing/testing.js"></script>
12 </head> 12 </head>
13 <body> 13 <body>
14 <!-- Tests it is valid to switch text bindings by SafeHtml bindings and 14 <!-- Tests it is valid to use existing nodes as SafeHtml. -->
15 viceversa. -->
16 <div>text to text (expect &lt;span&gt;text1&lt;/span&gt;): {{w}}</div> 15 <div>text to text (expect &lt;span&gt;text1&lt;/span&gt;): {{w}}</div>
17 <div>text to html (expect html1 in a real span): {{x}}</div> 16 <div>text to html (expect html1 in a real span): {{x}}</div>
18 <div>html to text (expect &lt;span&gt;text2&lt;/span&gt;): {{y}}</div> 17 <div>html to text (expect &lt;span&gt;text2&lt;/span&gt;): {{y}}</div>
19 <div>html to html (expect html2 in a real span): {{z}}</div> 18 <div>html to html (expect html2 in a real span): {{z}}</div>
20 <script type="application/dart"> 19 <script type="application/dart">
21 import 'dart:async'; 20 import 'dart:async';
22 import 'dart:html'; 21 import 'dart:html';
23 import 'package:unittest/unittest.dart'; 22 import 'package:unittest/unittest.dart';
24 import 'package:web_ui/observe.dart'; 23 import 'package:web_ui/observe.dart';
25 import 'package:web_ui/safe_html.dart'; 24 import 'package:web_ui/safe_html.dart';
26 25
27 @observable var w = '<span>text0</span>'; 26 @observable var w = '<span>text0</span>';
28 @observable var x = '<span>text0</span>'; 27 @observable var x = '<span>text0</span>';
29 @observable var y = new SafeHtml.unsafe('<span>html0</span>'); 28 @observable var y = new Element.html('<span>html0</span>');
30 @observable var z = new SafeHtml.unsafe('<span>html0</span>'); 29 @observable var z = new Element.html('<span>html0</span>');
31 main() { 30 main() {
32 Timer.run(() { 31 Timer.run(() {
33 w = '<span>text1</span>'; 32 w = '<span>text1</span>';
34 x = new SafeHtml.unsafe('<div>html1</div>'); 33 x = new Element.html('<div>html1</div>');
35 y = '<span>text2</span>'; 34 y = '<span>text2</span>';
36 z = new SafeHtml.unsafe('<div>html2</div>'); 35 z = new Element.html('<div>html2</div>');
37 window.postMessage('done', '*'); 36 window.postMessage('done', '*');
38 }); 37 });
39 } 38 }
40 </script> 39 </script>
41 </body> 40 </body>
42 </html> 41 </html>
OLDNEW
« no previous file with comments | « test/data/expected/escape3_test.html.txt ('k') | test/observe_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698