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

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

Issue 9269021: IndexedDB: Start running worker layout tests as ui tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add new workers test, but it's too big Created 8 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/test/test_timeouts.h" 7 #include "base/test/test_timeouts.h"
8 #include "chrome/test/automation/tab_proxy.h" 8 #include "chrome/test/automation/tab_proxy.h"
9 #include "chrome/test/base/ui_test_utils.h" 9 #include "chrome/test/base/ui_test_utils.h"
10 #include "chrome/test/ui/ui_layout_test.h" 10 #include "chrome/test/ui/ui_layout_test.h"
11 #include "content/public/common/content_switches.h" 11 #include "content/public/common/content_switches.h"
12 #include "net/base/net_util.h" 12 #include "net/base/net_util.h"
13 13
14 static const char* kLayoutTestFileNames[] = { 14 static const char* kLayoutTestFileNames[] = {
15 // TODO(dgrogan): Put the other IDB layout tests here. 15 // TODO(dgrogan): Put the other IDB layout tests here.
16 "prefetch-bugfix-108071.html", 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 // "objectstore-basics-workers.html", // Too big.
17 }; 25 };
18 26
19 class IndexedDBUILayoutTest : public UILayoutTest { 27 class IndexedDBUILayoutTest : public UILayoutTest {
20 protected: 28 protected:
21 IndexedDBUILayoutTest() 29 IndexedDBUILayoutTest()
22 : UILayoutTest(), 30 : UILayoutTest(),
23 test_dir_(FilePath(). 31 test_dir_(FilePath().
24 AppendASCII("storage").AppendASCII("indexeddb")) { 32 AppendASCII("storage").AppendASCII("indexeddb")) {
25 } 33 }
26 34
27 virtual ~IndexedDBUILayoutTest() { } 35 virtual ~IndexedDBUILayoutTest() { }
28 36
29 void AddJSTestResources() { 37 void AddJSTestResources() {
30 // Add other paths our tests require. 38 // Add other paths our tests require.
31 FilePath js_dir = FilePath(). 39 AddResourceForLayoutTest(
32 AppendASCII("fast").AppendASCII("js"); 40 FilePath().AppendASCII("fast").AppendASCII("js"),
33 AddResourceForLayoutTest(js_dir, FilePath().AppendASCII("resources")); 41 FilePath().AppendASCII("resources"));
42 AddResourceForLayoutTest(
43 FilePath().AppendASCII("fast").AppendASCII("filesystem"),
44 FilePath().AppendASCII("resources"));
34 } 45 }
35 46
36 FilePath test_dir_; 47 FilePath test_dir_;
37 }; 48 };
38 49
39 TEST_F(IndexedDBUILayoutTest, LayoutTests) { 50 TEST_F(IndexedDBUILayoutTest, LayoutTests) {
40 const int port = kNoHttpPort; 51 const int port = kNoHttpPort;
41 InitializeForLayoutTest(test_dir_, FilePath(), port); 52 InitializeForLayoutTest(test_dir_, FilePath(), port);
42 AddJSTestResources(); 53 AddJSTestResources();
43 for (size_t i = 0; i < arraysize(kLayoutTestFileNames); ++i) 54 for (size_t i = 0; i < arraysize(kLayoutTestFileNames); ++i)
44 RunLayoutTest(kLayoutTestFileNames[i], port); 55 RunLayoutTest(kLayoutTestFileNames[i], port);
45 } 56 }
57
58 TEST_F(IndexedDBUILayoutTest, WorkerLayoutTests) {
59 const int port = kNoHttpPort;
60 InitializeForLayoutTest(test_dir_, FilePath(), port);
61 AddJSTestResources();
62 for (size_t i = 0; i < arraysize(kWorkerTestFileNames); ++i)
63 RunLayoutTest(kWorkerTestFileNames[i], port);
64 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698