summaryrefslogtreecommitdiffstats
path: root/content/browser/appcache/appcache_browsertest.cc
blob: 030178f60b9b7a35bbd5a146ffd6e49ce64b2025 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/test/layout_browsertest.h"

namespace content {

class AppCacheLayoutTest : public InProcessBrowserLayoutTest {
 public:
  AppCacheLayoutTest() : InProcessBrowserLayoutTest(
      FilePath().AppendASCII("http").AppendASCII("tests"),
      FilePath().AppendASCII("appcache"),
      -1) {
  }

 protected:
  virtual ~AppCacheLayoutTest() {}
};

// Flaky and slow, hence disabled: http://crbug.com/54717
// The tests that don't depend on PHP should be less flaky.
IN_PROC_BROWSER_TEST_F(AppCacheLayoutTest, DISABLED_NoPHP) {
  static const char* kNoPHPTests[] = {
      "404-manifest.html",
      "404-resource.html",
      "cyrillic-uri.html",
      "deferred-events-delete-while-raising.html",
      "deferred-events.html",
      "destroyed-frame.html",
      "detached-iframe.html",
      "different-origin-manifest.html",
      "different-scheme.html",
      "empty-manifest.html",
      "foreign-iframe-main.html",
      "insert-html-element-with-manifest.html",
      "insert-html-element-with-manifest-2.html",
      "manifest-containing-itself.html",
      "manifest-parsing.html",
      "manifest-with-empty-file.html",
      "progress-counter.html",
      "reload.html",
      "simple.html",
      "top-frame-1.html",
      "top-frame-2.html",
      "top-frame-3.html",
      "top-frame-4.html",
      "whitelist-wildcard.html",
      "wrong-content-type.html",
      "wrong-signature-2.html",
      "wrong-signature.html",
      "xhr-foreign-resource.html",
  };

  // This test is racey.
  // https://bugs.webkit.org/show_bug.cgi?id=49104
  // "foreign-fallback.html"

  for (size_t i = 0; i < arraysize(kNoPHPTests); ++i)
    RunHttpLayoutTest(kNoPHPTests[i]);
}

// Flaky: http://crbug.com/54717
// Lighty/PHP is not reliable enough on windows.
IN_PROC_BROWSER_TEST_F(AppCacheLayoutTest, DISABLED_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",
      "remove-cache.html",
      "resource-redirect.html",
      "resource-redirect-2.html",
      "update-cache.html",
  };

  // This tests loads a data url which calls notifyDone, this just
  // doesn't work with the testRunner in this test harness.
  // "fail-on-update.html",

  // Flaky for reasons i don't yet see?
  // "fail-on-update2.html",

  // 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

  for (size_t i = 0; i < arraysize(kPHPTests); ++i)
    RunHttpLayoutTest(kPHPTests[i]);
}

}  // namespace content