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

Side by Side Diff: chrome/browser/sessions/session_service_unittest.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 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/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0) {} 41 SessionServiceTest() : window_bounds(0, 1, 2, 3), sync_save_count_(0) {}
42 42
43 protected: 43 protected:
44 virtual void SetUp() { 44 virtual void SetUp() {
45 BrowserWithTestWindowTest::SetUp(); 45 BrowserWithTestWindowTest::SetUp();
46 std::string b = base::Int64ToString(base::Time::Now().ToInternalValue()); 46 std::string b = base::Int64ToString(base::Time::Now().ToInternalValue());
47 47
48 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 48 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
49 path_ = temp_dir_.path().Append(FILE_PATH_LITERAL("SessionTestDirs")); 49 path_ = temp_dir_.path().Append(FILE_PATH_LITERAL("SessionTestDirs"));
50 ASSERT_TRUE(file_util::CreateDirectory(path_)); 50 ASSERT_TRUE(base::CreateDirectory(path_));
51 path_ = path_.AppendASCII(b); 51 path_ = path_.AppendASCII(b);
52 52
53 SessionService* session_service = new SessionService(path_); 53 SessionService* session_service = new SessionService(path_);
54 helper_.SetService(session_service); 54 helper_.SetService(session_service);
55 55
56 service()->SetWindowType( 56 service()->SetWindowType(
57 window_id, Browser::TYPE_TABBED, SessionService::TYPE_NORMAL); 57 window_id, Browser::TYPE_TABBED, SessionService::TYPE_NORMAL);
58 service()->SetWindowBounds(window_id, 58 service()->SetWindowBounds(window_id,
59 window_bounds, 59 window_bounds,
60 ui::SHOW_STATE_NORMAL); 60 ui::SHOW_STATE_NORMAL);
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 1009
1010 ASSERT_EQ(1U, windows.size()); 1010 ASSERT_EQ(1U, windows.size());
1011 ASSERT_EQ(0, windows[0]->selected_tab_index); 1011 ASSERT_EQ(0, windows[0]->selected_tab_index);
1012 ASSERT_EQ(window_id.id(), windows[0]->window_id.id()); 1012 ASSERT_EQ(window_id.id(), windows[0]->window_id.id());
1013 ASSERT_EQ(1U, windows[0]->tabs.size()); 1013 ASSERT_EQ(1U, windows[0]->tabs.size());
1014 1014
1015 SessionTab* tab = windows[0]->tabs[0]; 1015 SessionTab* tab = windows[0]->tabs[0];
1016 helper_.AssertTabEquals(window_id, tab_id, 0, 0, 1, *tab); 1016 helper_.AssertTabEquals(window_id, tab_id, 0, 0, 1, *tab);
1017 helper_.AssertNavigationEquals(nav1, tab->navigations[0]); 1017 helper_.AssertNavigationEquals(nav1, tab->navigations[0]);
1018 } 1018 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_backend_unittest.cc ('k') | chrome/browser/shell_integration_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698