OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/file_path.h" | |
6 #include "chrome/test/ui/ui_layout_test.h" | |
7 | |
8 class AppCacheUITest : public UILayoutTest { | |
9 public: | |
10 void RunAppCacheTests(const char* tests[], int num_tests) { | |
11 FilePath http_test_dir; | |
12 http_test_dir = http_test_dir.AppendASCII("http"); | |
13 http_test_dir = http_test_dir.AppendASCII("tests"); | |
14 | |
15 FilePath appcache_test_dir; | |
16 appcache_test_dir = appcache_test_dir.AppendASCII("appcache"); | |
17 InitializeForLayoutTest(http_test_dir, appcache_test_dir, kHttpPort); | |
18 | |
19 StartHttpServer(new_http_root_dir_); | |
20 for (int i = 0; i < num_tests; ++i) | |
21 RunLayoutTest(tests[i], kHttpPort); | |
22 StopHttpServer(); | |
23 } | |
24 | |
25 protected: | |
26 virtual ~AppCacheUITest() {} | |
27 }; | |
28 | |
29 // Flaky: http://crbug.com/54717 | |
30 // The tests that don't depend on PHP should be less flaky. | |
31 TEST_F(AppCacheUITest, FLAKY_AppCacheLayoutTests_NoPHP) { | |
32 static const char* kNoPHPTests[] = { | |
33 "404-manifest.html", | |
34 "404-resource.html", | |
35 "cyrillic-uri.html", | |
36 "deferred-events-delete-while-raising.html", | |
37 "deferred-events.html", | |
38 "destroyed-frame.html", | |
39 "detached-iframe.html", | |
40 "different-origin-manifest.html", | |
41 "different-scheme.html", | |
42 "empty-manifest.html", | |
43 "foreign-iframe-main.html", | |
44 "insert-html-element-with-manifest.html", | |
45 "insert-html-element-with-manifest-2.html", | |
46 "manifest-containing-itself.html", | |
47 "manifest-parsing.html", | |
48 "manifest-with-empty-file.html", | |
49 "progress-counter.html", | |
50 "reload.html", | |
51 "simple.html", | |
52 "top-frame-1.html", | |
53 "top-frame-2.html", | |
54 "top-frame-3.html", | |
55 "top-frame-4.html", | |
56 "whitelist-wildcard.html", | |
57 "wrong-content-type.html", | |
58 "wrong-signature-2.html", | |
59 "wrong-signature.html", | |
60 "xhr-foreign-resource.html", | |
61 }; | |
62 | |
63 // This test is racey. | |
64 // https://bugs.webkit.org/show_bug.cgi?id=49104 | |
65 // "foreign-fallback.html" | |
66 | |
67 RunAppCacheTests(kNoPHPTests, arraysize(kNoPHPTests)); | |
68 } | |
69 | |
70 // Flaky: http://crbug.com/54717 | |
71 // Lighty/PHP is not reliable enough on windows. | |
72 TEST_F(AppCacheUITest, FLAKY_AppCacheLayoutTests_PHP) { | |
73 static const char* kPHPTests[] = { | |
74 "auth.html", | |
75 "fallback.html", | |
76 "main-resource-hash.html", | |
77 "manifest-redirect.html", | |
78 "manifest-redirect-2.html", | |
79 "navigating-away-while-cache-attempt-in-progress.html", | |
80 "non-html.xhtml", | |
81 "offline-access.html", | |
82 "online-whitelist.html", | |
83 "remove-cache.html", | |
84 "resource-redirect.html", | |
85 "resource-redirect-2.html", | |
86 "update-cache.html", | |
87 }; | |
88 | |
89 // This tests loads a data url which calls notifyDone, this just | |
90 // doesn't work with the layoutTestController in this test harness. | |
91 // "fail-on-update.html", | |
92 | |
93 // Flaky for reasons i don't yet see? | |
94 // "fail-on-update2.html", | |
95 | |
96 // TODO(michaeln): investigate these more closely | |
97 // "crash-when-navigating-away-then-back.html", | |
98 // "credential-url.html", | |
99 // "different-https-origin-resource-main.html", | |
100 // "idempotent-update.html", not sure this is a valid test | |
101 // "local-content.html", | |
102 // "max-size.html", we use a different quota scheme | |
103 | |
104 RunAppCacheTests(kPHPTests, arraysize(kPHPTests)); | |
105 } | |
OLD | NEW |