summaryrefslogtreecommitdiffstats
path: root/chrome/browser/appcache/appcache_ui_test.cc
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 00:48:13 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 00:48:13 +0000
commit0c6057464aef9db0315d1e938c825f8922f1770d (patch)
tree127236c0e2b1e86834a4967fa8654226528e265f /chrome/browser/appcache/appcache_ui_test.cc
parente4be2dd25b1883bad7bed358e52e04f01c6e6f78 (diff)
downloadchromium_src-0c6057464aef9db0315d1e938c825f8922f1770d.zip
chromium_src-0c6057464aef9db0315d1e938c825f8922f1770d.tar.gz
chromium_src-0c6057464aef9db0315d1e938c825f8922f1770d.tar.bz2
Split the layout tests run in the appcache ui tests into two groups, PHP dependent vs non-dependent. Also remove some tests that are racey from the layout tests run in these test cases.
BUG=54717 TEST=yes Review URL: http://codereview.chromium.org/4858003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/appcache/appcache_ui_test.cc')
-rw-r--r--chrome/browser/appcache/appcache_ui_test.cc90
1 files changed, 58 insertions, 32 deletions
diff --git a/chrome/browser/appcache/appcache_ui_test.cc b/chrome/browser/appcache/appcache_ui_test.cc
index a4814cf..521cfd6 100644
--- a/chrome/browser/appcache/appcache_ui_test.cc
+++ b/chrome/browser/appcache/appcache_ui_test.cc
@@ -6,16 +6,32 @@
#include "chrome/test/ui/ui_layout_test.h"
class AppCacheUITest : public UILayoutTest {
+ public:
+ void RunAppCacheTests(const char* tests[], int num_tests) {
+ FilePath http_test_dir;
+ http_test_dir = http_test_dir.AppendASCII("http");
+ http_test_dir = http_test_dir.AppendASCII("tests");
+
+ FilePath appcache_test_dir;
+ appcache_test_dir = appcache_test_dir.AppendASCII("appcache");
+ InitializeForLayoutTest(http_test_dir, appcache_test_dir, kHttpPort);
+
+ StartHttpServer(new_http_root_dir_);
+ for (int i = 0; i < num_tests; ++i)
+ RunLayoutTest(tests[i], kHttpPort);
+ StopHttpServer();
+ }
+
protected:
virtual ~AppCacheUITest() {}
};
// Flaky: http://crbug.com/54717
-TEST_F(AppCacheUITest, FLAKY_AppCacheLayoutTests) {
- static const char* kLayoutTestFiles[] = {
+// The tests that don't depend on PHP should be less flaky.
+TEST_F(AppCacheUITest, FLAKY_AppCacheLayoutTests_NoPHP) {
+ static const char* kNoPHPTests[] = {
"404-manifest.html",
"404-resource.html",
- "auth.html",
"cyrillic-uri.html",
"deferred-events-delete-while-raising.html",
"deferred-events.html",
@@ -24,22 +40,14 @@ TEST_F(AppCacheUITest, FLAKY_AppCacheLayoutTests) {
"different-origin-manifest.html",
"different-scheme.html",
"empty-manifest.html",
- "fallback.html",
"foreign-iframe-main.html",
- "main-resource-hash.html",
+ "insert-html-element-with-manifest.html",
+ "insert-html-element-with-manifest-2.html",
"manifest-containing-itself.html",
"manifest-parsing.html",
- "manifest-redirect-2.html",
- "manifest-redirect.html",
"manifest-with-empty-file.html",
- "navigating-away-while-cache-attempt-in-progress.html",
- "offline-access.html",
- "online-whitelist.html",
"progress-counter.html",
"reload.html",
- "remove-cache.html",
- "resource-redirect-2.html",
- "resource-redirect.html",
"simple.html",
"top-frame-1.html",
"top-frame-2.html",
@@ -50,28 +58,46 @@ TEST_F(AppCacheUITest, FLAKY_AppCacheLayoutTests) {
"wrong-signature-2.html",
"wrong-signature.html",
"xhr-foreign-resource.html",
+ };
- // TODO(michaeln): investigate these more closely
- // "crash-when-navigating-away-then-back.html",
- // "credential-url.html",
- // "different-https-origin-resource-main.html",
- // "fail-on-update.html",
- // "idempotent-update.html", not sure this is a valid test
- // "local-content.html",
- // "max-size.html", we use a different quota scheme
- // "update-cache.html", bug 38006
+ // This test is racey.
+ // https://bugs.webkit.org/show_bug.cgi?id=49104
+ // "foreign-fallback.html"
+
+ RunAppCacheTests(kNoPHPTests, arraysize(kNoPHPTests));
+}
+
+// Flaky: http://crbug.com/54717
+// Lighty/PHP is not reliable enough on windows.
+TEST_F(AppCacheUITest, FLAKY_AppCacheLayoutTests_PHP) {
+ static const char* kPHPTests[] = {
+ "auth.html",
+ "fallback.html",
+ "main-resource-hash.html",
+ "manifest-redirect.html",
+ "manifest-redirect-2.html",
+ "navigating-away-while-cache-attempt-in-progress.html",
+ "non-html.xhtml",
+ "offline-access.html",
+ "online-whitelist.html",
+ "resource-redirect.html",
+ "resource-redirect-2.html",
+ "update-cache.html",
};
- FilePath http_test_dir;
- http_test_dir = http_test_dir.AppendASCII("http");
- http_test_dir = http_test_dir.AppendASCII("tests");
+ // These tests are racey due to status polling on timers.
+ // https://bugs.webkit.org/show_bug.cgi?id=49104
+ // "fail-on-update.html",
+ // "fail-on-update2.html",
+ // "remove-cache.html",
- FilePath appcache_test_dir;
- appcache_test_dir = appcache_test_dir.AppendASCII("appcache");
- InitializeForLayoutTest(http_test_dir, appcache_test_dir, kHttpPort);
+ // TODO(michaeln): investigate these more closely
+ // "crash-when-navigating-away-then-back.html",
+ // "credential-url.html",
+ // "different-https-origin-resource-main.html",
+ // "idempotent-update.html", not sure this is a valid test
+ // "local-content.html",
+ // "max-size.html", we use a different quota scheme
- StartHttpServer(new_http_root_dir_);
- for (size_t i = 0; i < arraysize(kLayoutTestFiles); ++i)
- RunLayoutTest(kLayoutTestFiles[i], kHttpPort);
- StopHttpServer();
+ RunAppCacheTests(kPHPTests, arraysize(kPHPTests));
}