OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <map> | 5 #include <map> |
6 #include <utility> | 6 #include <utility> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 pending_.clear(); | 110 pending_.clear(); |
111 } | 111 } |
112 | 112 |
113 // LoaderTest ------------------------------------------------------------------ | 113 // LoaderTest ------------------------------------------------------------------ |
114 | 114 |
115 class LoaderTest : public testing::Test { | 115 class LoaderTest : public testing::Test { |
116 public: | 116 public: |
117 LoaderTest() { | 117 LoaderTest() { |
118 build_settings_.SetBuildDir(SourceDir("//out/Debug/")); | 118 build_settings_.SetBuildDir(SourceDir("//out/Debug/")); |
119 } | 119 } |
120 virtual ~LoaderTest() { | |
121 } | |
122 | 120 |
123 protected: | 121 protected: |
124 Scheduler scheduler_; | 122 Scheduler scheduler_; |
125 BuildSettings build_settings_; | 123 BuildSettings build_settings_; |
126 MockInputFileManager mock_ifm_; | 124 MockInputFileManager mock_ifm_; |
127 }; | 125 }; |
128 | 126 |
129 } // namespace | 127 } // namespace |
130 | 128 |
131 // ----------------------------------------------------------------------------- | 129 // ----------------------------------------------------------------------------- |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 loader->Load(third_file, LocationRange(), second_tc); | 179 loader->Load(third_file, LocationRange(), second_tc); |
182 EXPECT_TRUE(mock_ifm_.HasOnePending(build_config)); | 180 EXPECT_TRUE(mock_ifm_.HasOnePending(build_config)); |
183 | 181 |
184 // Running the build config file should make our third file pending. | 182 // Running the build config file should make our third file pending. |
185 mock_ifm_.IssueAllPending(); | 183 mock_ifm_.IssueAllPending(); |
186 scheduler_.main_loop()->RunUntilIdle(); | 184 scheduler_.main_loop()->RunUntilIdle(); |
187 EXPECT_TRUE(mock_ifm_.HasTwoPending(second_file, third_file)); | 185 EXPECT_TRUE(mock_ifm_.HasTwoPending(second_file, third_file)); |
188 | 186 |
189 EXPECT_FALSE(scheduler_.is_failed()); | 187 EXPECT_FALSE(scheduler_.is_failed()); |
190 } | 188 } |
OLD | NEW |