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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_uitest.cc

Issue 9693065: Run IDB layout test suite as browser tests instead of ui tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some style stuff Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 "base/file_util.h"
7 #include "base/test/test_timeouts.h"
8 #include "chrome/test/automation/tab_proxy.h"
9 #include "chrome/test/base/ui_test_utils.h"
10 #include "chrome/test/ui/ui_layout_test.h"
11 #include "content/public/common/content_switches.h"
12 #include "net/base/net_util.h"
13
14 static const char* kLayoutTestFileNames[] = {
15 // TODO(dgrogan): Put the other IDB layout tests here.
16 "prefetch-bugfix-108071.html",
17 "basics.html",
18 // "objectstore-basics.html", // Too big: crbug.com/33472
19 // "index-basics.html", // Too big.
20 };
21
22 static const char* kWorkerTestFileNames[] = {
23 "basics-workers.html",
24 "basics-shared-workers.html",
25 // "objectstore-basics-workers.html", // Too big.
26 };
27
28 class IndexedDBUILayoutTest : public UILayoutTest {
29 protected:
30 IndexedDBUILayoutTest()
31 : UILayoutTest(),
32 test_dir_(FilePath().
33 AppendASCII("storage").AppendASCII("indexeddb")) {
34 }
35
36 virtual ~IndexedDBUILayoutTest() { }
37
38 void AddJSTestResources() {
39 // Add other paths our tests require.
40 AddResourceForLayoutTest(
41 FilePath().AppendASCII("fast").AppendASCII("js"),
42 FilePath().AppendASCII("resources"));
43 AddResourceForLayoutTest(
44 FilePath().AppendASCII("fast").AppendASCII("filesystem"),
45 FilePath().AppendASCII("resources"));
46 }
47
48 FilePath test_dir_;
49 };
50
51 TEST_F(IndexedDBUILayoutTest, LayoutTests) {
52 const int port = kNoHttpPort;
53 InitializeForLayoutTest(test_dir_, FilePath(), port);
54 AddJSTestResources();
55 for (size_t i = 0; i < arraysize(kLayoutTestFileNames); ++i)
56 RunLayoutTest(kLayoutTestFileNames[i], port);
57 }
58
59 TEST_F(IndexedDBUILayoutTest, WorkerLayoutTests) {
60 const int port = kNoHttpPort;
61 InitializeForLayoutTest(test_dir_, FilePath(), port);
62 AddJSTestResources();
63 for (size_t i = 0; i < arraysize(kWorkerTestFileNames); ++i)
64 RunLayoutTest(kWorkerTestFileNames[i], port);
65 }
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_layout_browsertest.cc ('k') | content/renderer/dom_automation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698