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

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

Issue 6677034: Add IndexedDB browser test that causes a crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more explicit js, limit use of expose-gc Created 9 years, 9 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) 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"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/common/chrome_switches.h"
12 #include "chrome/test/in_process_browser_test.h" 13 #include "chrome/test/in_process_browser_test.h"
13 #include "chrome/test/testing_profile.h" 14 #include "chrome/test/testing_profile.h"
14 #include "chrome/test/thread_test_helper.h" 15 #include "chrome/test/thread_test_helper.h"
15 #include "chrome/test/ui_test_utils.h" 16 #include "chrome/test/ui_test_utils.h"
16 #include "content/browser/in_process_webkit/indexed_db_context.h" 17 #include "content/browser/in_process_webkit/indexed_db_context.h"
17 #include "content/browser/in_process_webkit/webkit_context.h" 18 #include "content/browser/in_process_webkit/webkit_context.h"
18 #include "content/browser/tab_contents/tab_contents.h" 19 #include "content/browser/tab_contents/tab_contents.h"
19 20
20 // This browser test is aimed towards exercising the IndexedDB bindings and 21 // This browser test is aimed towards exercising the IndexedDB bindings and
21 // the actual implementation that lives in the browser side (in_process_webkit). 22 // the actual implementation that lives in the browser side (in_process_webkit).
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Make sure we wait until the destructor has run. 120 // Make sure we wait until the destructor has run.
120 scoped_refptr<ThreadTestHelper> helper( 121 scoped_refptr<ThreadTestHelper> helper(
121 new ThreadTestHelper(BrowserThread::WEBKIT)); 122 new ThreadTestHelper(BrowserThread::WEBKIT));
122 ASSERT_TRUE(helper->Run()); 123 ASSERT_TRUE(helper->Run());
123 124
124 // Because we specified https for scheme to be skipped the second file 125 // Because we specified https for scheme to be skipped the second file
125 // should survive and the first go into vanity. 126 // should survive and the first go into vanity.
126 ASSERT_FALSE(file_util::PathExists(temp_file_path_1)); 127 ASSERT_FALSE(file_util::PathExists(temp_file_path_1));
127 ASSERT_TRUE(file_util::PathExists(temp_file_path_2)); 128 ASSERT_TRUE(file_util::PathExists(temp_file_path_2));
128 } 129 }
130
131 class IndexedDBBrowserTestWithGCExposed : public IndexedDBBrowserTest {
132 public:
133 virtual void SetUpCommandLine(CommandLine* command_line) {
134 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc");
135 }
136 };
137
138 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed,
139 DatabaseCallbacksTest) {
140 SimpleTest(
141 testUrl(FilePath(FILE_PATH_LITERAL("database_callbacks_first.html"))));
142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698