OLD | NEW |
---|---|
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/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 | 187 |
188 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed, | 188 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed, |
189 DatabaseCallbacksTest) { | 189 DatabaseCallbacksTest) { |
190 SimpleTest(GetTestUrl("indexeddb", "database_callbacks_first.html")); | 190 SimpleTest(GetTestUrl("indexeddb", "database_callbacks_first.html")); |
191 } | 191 } |
192 | 192 |
193 class IndexedDBBrowserTestWithVersion0Schema : public IndexedDBBrowserTest { | 193 class IndexedDBBrowserTestWithVersion0Schema : public IndexedDBBrowserTest { |
194 public: | 194 public: |
195 virtual void SetUpOnMainThread() { | 195 virtual void SetUpOnMainThread() { |
196 scoped_refptr<IndexedDBContext> context = | 196 scoped_refptr<IndexedDBContext> context = |
197 BrowserContext::GetIndexedDBContext( | 197 BrowserContext::GetDefaultStoragePartition( |
198 shell()->web_contents()->GetBrowserContext()); | 198 shell()->web_contents()->GetBrowserContext())-> |
199 GetIndexedDBContext(); | |
Charlie Reis
2012/09/15 00:55:58
nit: needs another 4 spaces
awong
2012/09/15 01:19:37
Done.
| |
199 BrowserThread::PostTask( | 200 BrowserThread::PostTask( |
200 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, | 201 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, |
201 base::Bind( | 202 base::Bind( |
202 &IndexedDBBrowserTestWithVersion0Schema::CopyLevelDBToProfile, | 203 &IndexedDBBrowserTestWithVersion0Schema::CopyLevelDBToProfile, |
203 shell(), | 204 shell(), |
204 context)); | 205 context)); |
205 scoped_refptr<base::ThreadTestHelper> helper( | 206 scoped_refptr<base::ThreadTestHelper> helper( |
206 new base::ThreadTestHelper(BrowserThread::GetMessageLoopProxyForThread( | 207 new base::ThreadTestHelper(BrowserThread::GetMessageLoopProxyForThread( |
207 BrowserThread::WEBKIT_DEPRECATED))); | 208 BrowserThread::WEBKIT_DEPRECATED))); |
208 ASSERT_TRUE(helper->Run()); | 209 ASSERT_TRUE(helper->Run()); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
277 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16); | 278 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16); |
278 | 279 |
279 base::KillProcess( | 280 base::KillProcess( |
280 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true); | 281 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true); |
281 shell()->Close(); | 282 shell()->Close(); |
282 | 283 |
283 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); | 284 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); |
284 } | 285 } |
285 | 286 |
286 } // namespace content | 287 } // namespace content |
OLD | NEW |