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

Side by Side Diff: pkg/polymer/test/build/index_page_builder_test.dart

Issue 573863003: simple index.html files for folders that contain entry points (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: show subdirectories as well Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 library polymer.test.build.index_page_builder_test;
5
6 import 'dart:async';
7 import 'package:unittest/compact_vm_config.dart';
8 import 'package:unittest/unittest.dart';
9 import 'package:polymer/src/build/common.dart';
10 import 'package:polymer/src/build/index_page_builder.dart';
11
12 import 'common.dart';
13
14 final phases = [[new IndexPageBuilder(new TransformOptions())]];
15
16 void main() {
17 useCompactVMConfiguration();
18
19 testPhases('outputs index pages', phases, {
20 'a|web/test.html': '<!DOCTYPE html><html></html>',
21 'a|web/test2.html': '<!DOCTYPE html><html></html>',
22 'a|web/foo/test3.html': '<!DOCTYPE html><html></html>',
23 'a|web/foo/bar/test4.html': '<!DOCTYPE html><html></html>',
24 }, {
25 'a|web/index.html': '<!DOCTYPE html><html><head></head><body>'
26 '<h1>Entry points</h1><ul>'
27 '<li><a href="foo/">foo/</a></li>'
28 '<li><a href="foo/bar/">foo/bar/</a></li>'
29 '<li><a href="test.html">test.html</a></li>'
30 '<li><a href="test2.html">test2.html</a></li>'
31 '</ul></body></html>',
32 'a|web/foo/index.html': '<!DOCTYPE html><html><head></head><body>'
33 '<h1>Entry points</h1><ul>'
34 '<li><a href="bar/">bar/</a></li>'
35 '<li><a href="test3.html">test3.html</a></li>'
36 '</ul></body></html>',
37 'a|web/foo/bar/index.html': '<!DOCTYPE html><html><head></head><body>'
38 '<h1>Entry points</h1><ul>'
39 '<li><a href="test4.html">test4.html</a></li>'
40 '</ul></body></html>',
41 });
42
43 testPhases('doesn\'t overwrite existing pages', phases, {
Siggi Cherem (dart-lang) 2014/09/16 19:40:50 let's add some additional tests: - A that mixes b
jakemac 2014/09/16 21:17:05 Including index.html since I am flattening everyth
44 'a|web/index.html': '<!DOCTYPE html><html></html>',
45 'a|web/test.html': '<!DOCTYPE html><html></html>',
46 'a|web/foo/index.html': '<!DOCTYPE html><html></html>',
47 'a|web/foo/test.html': '<!DOCTYPE html><html></html>',
48 'a|web/foo/bar/index.html': '<!DOCTYPE html><html></html>',
49 'a|web/foo/bar/test.html': '<!DOCTYPE html><html></html>',
50 }, {
51 'a|web/index.html': '<!DOCTYPE html><html></html>',
52 'a|web/foo/index.html': '<!DOCTYPE html><html></html>',
53 'a|web/foo/bar/index.html': '<!DOCTYPE html><html></html>',
54 });
55 }
56
OLDNEW
« pkg/polymer/lib/src/build/index_page_builder.dart ('K') | « pkg/polymer/lib/transformer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698