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

Unified Diff: content/browser/in_process_webkit/indexed_db_uitest.cc

Issue 9108004: IndexedDB: Run cursor-prefetch webkit layout test as ui test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/in_process_webkit/indexed_db_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 0000000000000000000000000000000000000000..cb49aec71b490fae9c08d962bd87e85baac050a8
--- /dev/null
+++ b/content/browser/in_process_webkit/indexed_db_uitest.cc
@@ -0,0 +1,56 @@
+// Copyright (c) 2011 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",
+ NULL
+};
+
+class IndexedDBUILayoutTest : public UILayoutTest {
+ protected:
+ IndexedDBUILayoutTest()
+ : UILayoutTest(),
+ test_dir_(FilePath().
+ AppendASCII("storage").AppendASCII("indexeddb")) {
+ }
+
+ virtual ~IndexedDBUILayoutTest() { }
+
+ virtual void SetUp() {
+ UILayoutTest::SetUp();
+ }
+
+ void AddJSTestResources() {
+ // Add other paths our tests require.
+ FilePath js_dir = FilePath().
+ AppendASCII("fast").AppendASCII("js");
+ AddResourceForLayoutTest(js_dir, FilePath().AppendASCII("resources"));
+ }
+
+ // Runs each test in an array of strings until it hits a NULL.
jsbell 2012/01/05 19:03:55 I see this pattern used in dom_storage_uitest.cc,
+ void RunTests(const char** files) {
+ while (*files) {
+ RunLayoutTest(*files, kNoHttpPort);
jsbell 2012/01/05 19:03:55 Possibly pass the port into this function, so we d
+ ++files;
+ }
+ }
+
+ FilePath test_dir_;
+};
+
+TEST_F(IndexedDBUILayoutTest, LayoutTests) {
+ InitializeForLayoutTest(test_dir_, FilePath(), kNoHttpPort);
jsbell 2012/01/05 19:03:55 e.g.: const int port = kNoHttpPort; InitializeForL
+ AddJSTestResources();
+ RunTests(kLayoutTestFileNames);
+}
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698