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

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

Issue 8082019: more content exports needed for unit_tests and browser_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert export of browser_accessibility_win for now Created 9 years, 2 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) 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 20 matching lines...) Expand all
31 FilePath temp_file_path_2 = domstorage_dir.Append(file_name_2); 31 FilePath temp_file_path_2 = domstorage_dir.Append(file_name_2);
32 32
33 ASSERT_EQ(1, file_util::WriteFile(temp_file_path_1, ".", 1)); 33 ASSERT_EQ(1, file_util::WriteFile(temp_file_path_1, ".", 1));
34 ASSERT_EQ(1, file_util::WriteFile(temp_file_path_2, "o", 1)); 34 ASSERT_EQ(1, file_util::WriteFile(temp_file_path_2, "o", 1));
35 35
36 // Create the scope which will ensure we run the destructor of the webkit 36 // Create the scope which will ensure we run the destructor of the webkit
37 // context which should trigger the clean up. 37 // context which should trigger the clean up.
38 { 38 {
39 TestingProfile profile; 39 TestingProfile profile;
40 WebKitContext *webkit_context = profile.GetWebKitContext(); 40 WebKitContext *webkit_context = profile.GetWebKitContext();
41 webkit_context->dom_storage_context()->set_data_path(temp_dir.path()); 41 webkit_context->dom_storage_context()->
42 set_data_path_for_testing(temp_dir.path());
42 webkit_context->set_clear_local_state_on_exit(true); 43 webkit_context->set_clear_local_state_on_exit(true);
43 } 44 }
44 // Make sure we wait until the destructor has run. 45 // Make sure we wait until the destructor has run.
45 scoped_refptr<base::ThreadTestHelper> helper( 46 scoped_refptr<base::ThreadTestHelper> helper(
46 new base::ThreadTestHelper( 47 new base::ThreadTestHelper(
47 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::WEBKIT))); 48 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::WEBKIT)));
48 ASSERT_TRUE(helper->Run()); 49 ASSERT_TRUE(helper->Run());
49 50
50 // Because we specified https for scheme to be skipped the second file 51 // Because we specified https for scheme to be skipped the second file
51 // should survive and the first go into vanity. 52 // should survive and the first go into vanity.
52 ASSERT_FALSE(file_util::PathExists(temp_file_path_1)); 53 ASSERT_FALSE(file_util::PathExists(temp_file_path_1));
53 ASSERT_TRUE(file_util::PathExists(temp_file_path_2)); 54 ASSERT_TRUE(file_util::PathExists(temp_file_path_2));
54 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698