OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 if (result != "pass") { | 52 if (result != "pass") { |
53 std::string js_result; | 53 std::string js_result; |
54 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString( | 54 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString( |
55 the_browser->GetSelectedTabContents()->render_view_host(), L"", | 55 the_browser->GetSelectedTabContents()->render_view_host(), L"", |
56 L"window.domAutomationController.send(getLog())", &js_result)); | 56 L"window.domAutomationController.send(getLog())", &js_result)); |
57 FAIL() << "Failed: " << js_result; | 57 FAIL() << "Failed: " << js_result; |
58 } | 58 } |
59 } | 59 } |
60 }; | 60 }; |
61 | 61 |
62 class IndexedDBSQLiteBrowserTest : public IndexedDBBrowserTest { | |
63 public: | |
64 virtual void SetUpCommandLine(CommandLine* command_line) { | |
65 command_line->AppendSwitch(switches::kSQLiteIndexedDatabase); | |
66 } | |
67 }; | |
68 | |
69 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CursorTest) { | 62 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CursorTest) { |
70 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("cursor_test.html")))); | 63 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("cursor_test.html")))); |
71 } | 64 } |
72 | 65 |
73 IN_PROC_BROWSER_TEST_F(IndexedDBSQLiteBrowserTest, CursorTest) { | |
74 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("cursor_test.html")))); | |
75 } | |
76 | |
77 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CursorTestIncognito) { | 66 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CursorTestIncognito) { |
78 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("cursor_test.html"))), | 67 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("cursor_test.html"))), |
79 true /* incognito */); | 68 true /* incognito */); |
80 } | 69 } |
81 | 70 |
82 // Flaky: http://crbug.com/70773 | 71 // Flaky: http://crbug.com/70773 |
83 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DISABLED_IndexTest) { | 72 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DISABLED_IndexTest) { |
84 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("index_test.html")))); | 73 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("index_test.html")))); |
85 } | 74 } |
86 | 75 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 virtual void SetUpCommandLine(CommandLine* command_line) { | 243 virtual void SetUpCommandLine(CommandLine* command_line) { |
255 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); | 244 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); |
256 } | 245 } |
257 }; | 246 }; |
258 | 247 |
259 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed, | 248 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed, |
260 DatabaseCallbacksTest) { | 249 DatabaseCallbacksTest) { |
261 SimpleTest( | 250 SimpleTest( |
262 testUrl(FilePath(FILE_PATH_LITERAL("database_callbacks_first.html")))); | 251 testUrl(FilePath(FILE_PATH_LITERAL("database_callbacks_first.html")))); |
263 } | 252 } |
OLD | NEW |