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

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: Created 8 years, 11 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 // "index-basics.html", // Too big.
jsbell 2012/01/20 22:59:09 Add a link to the "stop using cookies to return te
dgrogan 2012/01/20 23:43:12 Done.
19 };
20
21 static const char* kWorkerTestFileNames[] = {
22 "basics-workers.html",
17 }; 23 };
18 24
19 class IndexedDBUILayoutTest : public UILayoutTest { 25 class IndexedDBUILayoutTest : public UILayoutTest {
20 protected: 26 protected:
21 IndexedDBUILayoutTest() 27 IndexedDBUILayoutTest()
22 : UILayoutTest(), 28 : UILayoutTest(),
23 test_dir_(FilePath(). 29 test_dir_(FilePath().
24 AppendASCII("storage").AppendASCII("indexeddb")) { 30 AppendASCII("storage").AppendASCII("indexeddb")) {
25 } 31 }
26 32
27 virtual ~IndexedDBUILayoutTest() { } 33 virtual ~IndexedDBUILayoutTest() { }
28 34
29 void AddJSTestResources() { 35 void AddJSTestResources() {
30 // Add other paths our tests require. 36 // Add other paths our tests require.
31 FilePath js_dir = FilePath(). 37 AddResourceForLayoutTest(
jsbell 2012/01/20 22:59:09 +1 - The new version is much more readable
32 AppendASCII("fast").AppendASCII("js"); 38 FilePath().AppendASCII("fast").AppendASCII("js"),
33 AddResourceForLayoutTest(js_dir, FilePath().AppendASCII("resources")); 39 FilePath().AppendASCII("resources"));
40 AddResourceForLayoutTest(
41 FilePath().AppendASCII("fast").AppendASCII("filesystem"),
42 FilePath().AppendASCII("resources"));
34 } 43 }
35 44
36 FilePath test_dir_; 45 FilePath test_dir_;
37 }; 46 };
38 47
39 TEST_F(IndexedDBUILayoutTest, LayoutTests) { 48 TEST_F(IndexedDBUILayoutTest, LayoutTests) {
40 const int port = kNoHttpPort; 49 const int port = kNoHttpPort;
41 InitializeForLayoutTest(test_dir_, FilePath(), port); 50 InitializeForLayoutTest(test_dir_, FilePath(), port);
42 AddJSTestResources(); 51 AddJSTestResources();
43 for (size_t i = 0; i < arraysize(kLayoutTestFileNames); ++i) 52 for (size_t i = 0; i < arraysize(kLayoutTestFileNames); ++i)
44 RunLayoutTest(kLayoutTestFileNames[i], port); 53 RunLayoutTest(kLayoutTestFileNames[i], port);
45 } 54 }
55
56 TEST_F(IndexedDBUILayoutTest, WorkerLayoutTests) {
57 const int port = kNoHttpPort;
58 InitializeForLayoutTest(test_dir_, FilePath(), port);
59 AddJSTestResources();
60 for (size_t i = 0; i < arraysize(kWorkerTestFileNames); ++i)
61 RunLayoutTest(kWorkerTestFileNames[i], port);
62 }
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