| 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/file_path.h" | 5 #include "base/file_path.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/scoped_temp_dir.h" | 7 #include "base/scoped_temp_dir.h" |
| 8 #include "base/test/thread_test_helper.h" | 8 #include "base/test/thread_test_helper.h" |
| 9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 { | 40 { |
| 41 TestingProfile profile; | 41 TestingProfile profile; |
| 42 WebKitContext *webkit_context = profile.GetWebKitContext(); | 42 WebKitContext *webkit_context = profile.GetWebKitContext(); |
| 43 webkit_context->dom_storage_context()-> | 43 webkit_context->dom_storage_context()-> |
| 44 set_data_path_for_testing(temp_dir.path()); | 44 set_data_path_for_testing(temp_dir.path()); |
| 45 webkit_context->set_clear_local_state_on_exit(true); | 45 webkit_context->set_clear_local_state_on_exit(true); |
| 46 } | 46 } |
| 47 // Make sure we wait until the destructor has run. | 47 // Make sure we wait until the destructor has run. |
| 48 scoped_refptr<base::ThreadTestHelper> helper( | 48 scoped_refptr<base::ThreadTestHelper> helper( |
| 49 new base::ThreadTestHelper( | 49 new base::ThreadTestHelper( |
| 50 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::WEBKIT))); | 50 BrowserThread::GetMessageLoopProxyForThread( |
| 51 BrowserThread::WEBKIT_DEPRECATED))); |
| 51 ASSERT_TRUE(helper->Run()); | 52 ASSERT_TRUE(helper->Run()); |
| 52 | 53 |
| 53 // Because we specified https for scheme to be skipped the second file | 54 // Because we specified https for scheme to be skipped the second file |
| 54 // should survive and the first go into vanity. | 55 // should survive and the first go into vanity. |
| 55 ASSERT_FALSE(file_util::PathExists(temp_file_path_1)); | 56 ASSERT_FALSE(file_util::PathExists(temp_file_path_1)); |
| 56 ASSERT_TRUE(file_util::PathExists(temp_file_path_2)); | 57 ASSERT_TRUE(file_util::PathExists(temp_file_path_2)); |
| 57 } | 58 } |
| OLD | NEW |