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

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

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
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/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 17 matching lines...) Expand all
28 28
29 using content::BrowserContext; 29 using content::BrowserContext;
30 using content::BrowserThread; 30 using content::BrowserThread;
31 using quota::QuotaManager; 31 using quota::QuotaManager;
32 using webkit_database::DatabaseUtil; 32 using webkit_database::DatabaseUtil;
33 33
34 // This browser test is aimed towards exercising the IndexedDB bindings and 34 // This browser test is aimed towards exercising the IndexedDB bindings and
35 // the actual implementation that lives in the browser side (in_process_webkit). 35 // the actual implementation that lives in the browser side (in_process_webkit).
36 class IndexedDBBrowserTest : public InProcessBrowserTest { 36 class IndexedDBBrowserTest : public InProcessBrowserTest {
37 public: 37 public:
38 IndexedDBBrowserTest() { 38 IndexedDBBrowserTest() {}
39 EnableDOMAutomation();
40 }
41 39
42 GURL GetTestURL(const FilePath& file_path) { 40 GURL GetTestURL(const FilePath& file_path) {
43 FilePath dir; 41 FilePath dir;
44 PathService::Get(content::DIR_TEST_DATA, &dir); 42 PathService::Get(content::DIR_TEST_DATA, &dir);
45 return net::FilePathToFileURL( 43 return net::FilePathToFileURL(
46 dir.Append(FILE_PATH_LITERAL("indexeddb")).Append(file_path)); 44 dir.Append(FILE_PATH_LITERAL("indexeddb")).Append(file_path));
47 } 45 }
48 46
49 void SimpleTest(const GURL& test_url, bool incognito = false) { 47 void SimpleTest(const GURL& test_url, bool incognito = false) {
50 // The test page will perform tests on IndexedDB, then navigate to either 48 // The test page will perform tests on IndexedDB, then navigate to either
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 virtual void SetUpCommandLine(CommandLine* command_line) { 179 virtual void SetUpCommandLine(CommandLine* command_line) {
182 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); 180 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc");
183 } 181 }
184 }; 182 };
185 183
186 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed, 184 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed,
187 DatabaseCallbacksTest) { 185 DatabaseCallbacksTest) {
188 SimpleTest( 186 SimpleTest(
189 GetTestURL(FilePath(FILE_PATH_LITERAL("database_callbacks_first.html")))); 187 GetTestURL(FilePath(FILE_PATH_LITERAL("database_callbacks_first.html"))));
190 } 188 }
OLDNEW
« no previous file with comments | « content/browser/fileapi/file_system_browsertest.cc ('k') | content/browser/renderer_host/render_process_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698