| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "base/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 L"window.domAutomationController.send(getLog())", &js_result)); | 45 L"window.domAutomationController.send(getLog())", &js_result)); |
| 46 FAIL() << "Failed: " << js_result; | 46 FAIL() << "Failed: " << js_result; |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CursorTest) { | 51 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CursorTest) { |
| 52 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("cursor_test.html")))); | 52 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("cursor_test.html")))); |
| 53 } | 53 } |
| 54 | 54 |
| 55 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, IndexTest) { | 55 // Flaky. See http://crbug.com/70643. |
| 56 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, FLAKY_IndexTest) { |
| 56 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("index_test.html")))); | 57 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("index_test.html")))); |
| 57 } | 58 } |
| 58 | 59 |
| 59 // Flaky on windows, see http://crbug.com/67422 and http://crbug.com/69293. | 60 // Flaky on windows, see http://crbug.com/67422 and http://crbug.com/69293. |
| 60 #if defined(OS_WIN) | 61 #if defined(OS_WIN) |
| 61 #define MAYBE_KeyPathTest FLAKY_KeyPathTest | 62 #define MAYBE_KeyPathTest FLAKY_KeyPathTest |
| 62 #else | 63 #else |
| 63 #define MAYBE_KeyPathTest KeyPathTest | 64 #define MAYBE_KeyPathTest KeyPathTest |
| 64 #endif | 65 #endif |
| 65 | 66 |
| 66 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, MAYBE_KeyPathTest) { | 67 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, MAYBE_KeyPathTest) { |
| 67 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("key_path_test.html")))); | 68 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("key_path_test.html")))); |
| 68 } | 69 } |
| 69 | 70 |
| 70 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, TransactionGetTest) { | 71 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, TransactionGetTest) { |
| 71 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("transaction_get_test.html")))); | 72 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("transaction_get_test.html")))); |
| 72 } | 73 } |
| 73 | 74 |
| 74 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ObjectStoreTest) { | 75 // Flaky. See http://crbug.com/70643. |
| 76 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, FLAKY_ObjectStoreTest) { |
| 75 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("object_store_test.html")))); | 77 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("object_store_test.html")))); |
| 76 } | 78 } |
| 77 | 79 |
| 78 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DatabaseTest) { | 80 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DatabaseTest) { |
| 79 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("database_test.html")))); | 81 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("database_test.html")))); |
| 80 } | 82 } |
| 81 | 83 |
| 82 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, TransactionTest) { | 84 // Flaky. See http://crbug.com/70643. |
| 85 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, FLAKY_TransactionTest) { |
| 83 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("transaction_test.html")))); | 86 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("transaction_test.html")))); |
| 84 } | 87 } |
| 85 | 88 |
| 86 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DoesntHangTest) { | 89 // Flaky. See http://crbug.com/70643. |
| 90 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, FLAKY_DoesntHangTest) { |
| 87 SimpleTest(testUrl(FilePath( | 91 SimpleTest(testUrl(FilePath( |
| 88 FILE_PATH_LITERAL("transaction_run_forever.html")))); | 92 FILE_PATH_LITERAL("transaction_run_forever.html")))); |
| 89 ui_test_utils::CrashTab(browser()->GetSelectedTabContents()); | 93 ui_test_utils::CrashTab(browser()->GetSelectedTabContents()); |
| 90 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("transaction_test.html")))); | 94 SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("transaction_test.html")))); |
| 91 } | 95 } |
| 92 | 96 |
| 93 // In proc browser test is needed here because ClearLocalState indirectly calls | 97 // In proc browser test is needed here because ClearLocalState indirectly calls |
| 94 // WebKit's isMainThread through WebSecurityOrigin->SecurityOrigin. | 98 // WebKit's isMainThread through WebSecurityOrigin->SecurityOrigin. |
| 95 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ClearLocalState) { | 99 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ClearLocalState) { |
| 96 // Create test files. | 100 // Create test files. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 121 // Make sure we wait until the destructor has run. | 125 // Make sure we wait until the destructor has run. |
| 122 scoped_refptr<ThreadTestHelper> helper( | 126 scoped_refptr<ThreadTestHelper> helper( |
| 123 new ThreadTestHelper(BrowserThread::WEBKIT)); | 127 new ThreadTestHelper(BrowserThread::WEBKIT)); |
| 124 ASSERT_TRUE(helper->Run()); | 128 ASSERT_TRUE(helper->Run()); |
| 125 | 129 |
| 126 // Because we specified https for scheme to be skipped the second file | 130 // Because we specified https for scheme to be skipped the second file |
| 127 // should survive and the first go into vanity. | 131 // should survive and the first go into vanity. |
| 128 ASSERT_FALSE(file_util::PathExists(temp_file_path_1)); | 132 ASSERT_FALSE(file_util::PathExists(temp_file_path_1)); |
| 129 ASSERT_TRUE(file_util::PathExists(temp_file_path_2)); | 133 ASSERT_TRUE(file_util::PathExists(temp_file_path_2)); |
| 130 } | 134 } |
| OLD | NEW |