summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-11 10:03:08 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-11 10:03:08 +0000
commit9569b218572ab58deb22546cde49d2bd8ea20c48 (patch)
tree30ebd7f1bebf60eef13a11c7bb29b38245256928
parent6e13b90a2485ecb04b4abf275ebfd9f0e1203572 (diff)
downloadchromium_src-9569b218572ab58deb22546cde49d2bd8ea20c48.zip
chromium_src-9569b218572ab58deb22546cde49d2bd8ea20c48.tar.gz
chromium_src-9569b218572ab58deb22546cde49d2bd8ea20c48.tar.bz2
IndexedDB: Run cursor-prefetch webkit layout test as ui test.
The test exercises a bug that is only triggered when run in multi-process chromium. The patch in https://bugs.webkit.org/show_bug.cgi?id=75596 has to be committed and rolled before this change can be committed. This ui test will eventually run all of the IDB layout tests. BUG=108071 TEST= Review URL: http://codereview.chromium.org/9108004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117196 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--DEPS3
-rw-r--r--chrome/chrome_tests.gypi1
-rw-r--r--content/browser/in_process_webkit/indexed_db_uitest.cc45
3 files changed, 49 insertions, 0 deletions
diff --git a/DEPS b/DEPS
index dd1bf00..ba4c475 100644
--- a/DEPS
+++ b/DEPS
@@ -218,6 +218,9 @@ deps = {
"src/chrome/test/data/layout_tests/LayoutTests/storage/domstorage":
Var("webkit_trunk") + "/LayoutTests/storage/domstorage@" +
Var("webkit_revision"),
+ "src/chrome/test/data/layout_tests/LayoutTests/storage/indexeddb":
+ Var("webkit_trunk") + "/LayoutTests/storage/indexeddb@" +
+ Var("webkit_revision"),
"src/chrome/test/data/layout_tests/LayoutTests/media":
Var("webkit_trunk") + "/LayoutTests/media@" +
Var("webkit_revision"),
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 5b5e287..4a840a6 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -838,6 +838,7 @@
'test/ui/sandbox_uitests.cc',
'../content/browser/appcache/appcache_ui_test.cc',
'../content/browser/in_process_webkit/dom_storage_uitest.cc',
+ '../content/browser/in_process_webkit/indexed_db_uitest.cc',
'../content/browser/renderer_host/resource_dispatcher_host_uitest.cc',
'../content/worker/test/worker_uitest.cc',
],
diff --git a/content/browser/in_process_webkit/indexed_db_uitest.cc b/content/browser/in_process_webkit/indexed_db_uitest.cc
new file mode 100644
index 0000000..99750c5
--- /dev/null
+++ b/content/browser/in_process_webkit/indexed_db_uitest.cc
@@ -0,0 +1,45 @@
+// 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 "base/file_path.h"
+#include "base/file_util.h"
+#include "base/test/test_timeouts.h"
+#include "chrome/test/automation/tab_proxy.h"
+#include "chrome/test/base/ui_test_utils.h"
+#include "chrome/test/ui/ui_layout_test.h"
+#include "content/public/common/content_switches.h"
+#include "net/base/net_util.h"
+
+static const char* kLayoutTestFileNames[] = {
+ // TODO(dgrogan): Put the other IDB layout tests here.
+ "prefetch-bugfix-108071.html",
+};
+
+class IndexedDBUILayoutTest : public UILayoutTest {
+ protected:
+ IndexedDBUILayoutTest()
+ : UILayoutTest(),
+ test_dir_(FilePath().
+ AppendASCII("storage").AppendASCII("indexeddb")) {
+ }
+
+ virtual ~IndexedDBUILayoutTest() { }
+
+ void AddJSTestResources() {
+ // Add other paths our tests require.
+ FilePath js_dir = FilePath().
+ AppendASCII("fast").AppendASCII("js");
+ AddResourceForLayoutTest(js_dir, FilePath().AppendASCII("resources"));
+ }
+
+ FilePath test_dir_;
+};
+
+TEST_F(IndexedDBUILayoutTest, LayoutTests) {
+ const int port = kNoHttpPort;
+ InitializeForLayoutTest(test_dir_, FilePath(), port);
+ AddJSTestResources();
+ for (size_t i = 0; i < arraysize(kLayoutTestFileNames); ++i)
+ RunLayoutTest(kLayoutTestFileNames[i], port);
+}