Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <link rel="stylesheet" href="resources/base.css"> | |
| 11 <link rel="components" href="css_comp1.html"> | 12 <link rel="components" href="css_comp1.html"> |
| 13 <link rel="stylesheet" href="root.css"> | |
| 12 <script type="application/javascript" src="testing.js"></script> | 14 <script type="application/javascript" src="testing.js"></script> |
| 13 <title>CSS Polyfill Test</title> | 15 <title>CSS Polyfill Test</title> |
| 14 </head> | 16 </head> |
| 15 <body> | 17 <body> |
| 16 <style> | 18 <style> |
| 17 #box-1 { | 19 #box-1 { |
| 18 padding: 10px; | 20 padding: 10px; |
| 19 border: 1px solid black; | 21 border: 1px solid black; |
| 20 } | 22 } |
| 21 /* | 23 /* |
| 22 TODO(terry): .comp-1 is used in component even if the attribute | 24 TODO(terry): .comp-1 is used in component even if the attribute |
| 23 apply-author-styles not specified? How is this really | 25 apply-author-styles not specified? How is this really |
| 24 different then reset-style-inherifance. | 26 different then reset-style-inherifance. |
| 25 */ | 27 */ |
| 26 .comp-1 { | 28 .comp-1 { |
| 27 font: italic bold 16pt arial; | 29 font: italic bold 16pt arial; |
| 28 } | 30 } |
| 29 .comp-1-input { | 31 .comp-1-input { |
| 30 color: blue; | 32 color: blue; |
| 31 background-color: GreenYellow; | 33 background-color: GreenYellow; |
| 32 } | 34 } |
| 33 .comp-1-done { | 35 .comp-1-done { |
| 34 font: 32pt bold; | 36 font: 32pt bold; |
| 35 color: DarkViolet; | 37 color: DarkViolet; |
| 36 background-color: LightCyan; | 38 background-color: LightCyan; |
| 37 } | 39 } |
| 38 </style> | 40 </style> |
| 39 <div id="box-1"> | 41 <div id="box-1" class="main-glyph"> |
| 42 <div class="left-glyph"></div> | |
| 40 <input class="comp-1-input" value="Test AAA"> | 43 <input class="comp-1-input" value="Test AAA"> |
| 41 </div> | 44 </div> |
| 42 <input class="comp-1-done" value="Test BBB"> | 45 <input class="comp-1-done" value="Test BBB"> |
| 43 <x-comp1></x-comp1> | 46 <x-comp1></x-comp1> |
| 44 <x-comp1 type="flipper"></x-comp1> | 47 <x-comp1 type="flipper"></x-comp1> |
| 45 <script type="application/dart"> | 48 <script type="application/dart"> |
| 46 import 'dart:async'; | 49 import 'dart:async'; |
| 47 import 'dart:html'; | 50 import 'dart:html'; |
| 48 import 'package:unittest/unittest.dart'; | 51 import 'package:unittest/unittest.dart'; |
| 49 import 'package:web_ui/web_ui.dart'; | 52 import 'package:web_ui/web_ui.dart'; |
| 50 import 'package:web_ui/observe/html.dart'; | 53 import 'package:web_ui/observe/html.dart'; |
| 51 | 54 |
| 52 main() { | 55 main() { |
| 53 useShadowDom = false; | 56 useShadowDom = false; |
| 54 | 57 |
| 55 Timer.run(() { | 58 Timer.run(() { |
| 59 // Main file css_main_test.html location. | |
| 60 String baseDirectory = 'web_ui/test/data/input/'; | |
|
Siggi Cherem (dart-lang)
2013/03/11 21:13:11
remove the 'web_ui' segment. The 'web_ui' is not p
terry
2013/03/11 22:09:13
Okay, changed to /input/ and /input/resources/
On
| |
| 61 | |
| 62 // URI to image in base directory | |
| 63 var items = queryAll('#box-1'); | |
| 64 DivElement box1Elem = items[0]; | |
| 65 var image1 = box1Elem.getComputedStyle().backgroundImage; | |
| 66 expect(image1.endsWith('${baseDirectory}main.png)'), true); | |
| 67 | |
| 68 // URI to image in child directory web_ui/test/data/input/css_main_test.html | |
| 69 DivElement box2Elem = box1Elem.children[0]; | |
| 70 var image2 = box2Elem.getComputedStyle().backgroundImage; | |
| 71 expect(image2.endsWith('${baseDirectory}resources/glyph.png)'), true); | |
| 72 | |
| 56 window.postMessage('done', '*'); | 73 window.postMessage('done', '*'); |
| 57 }); | 74 }); |
| 58 } | 75 } |
| 59 </script> | 76 </script> |
| 60 </body> | 77 </body> |
| 61 </html> | 78 </html> |
| OLD | NEW |