OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <queue> | 5 #include <queue> |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/synchronization/lock.h" | 8 #include "base/synchronization/lock.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "chrome/browser/device_orientation/data_fetcher.h" | 10 #include "content/browser/device_orientation/data_fetcher.h" |
11 #include "chrome/browser/device_orientation/orientation.h" | 11 #include "content/browser/device_orientation/orientation.h" |
12 #include "chrome/browser/device_orientation/provider.h" | 12 #include "content/browser/device_orientation/provider.h" |
13 #include "chrome/browser/device_orientation/provider_impl.h" | 13 #include "content/browser/device_orientation/provider_impl.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace device_orientation { | 16 namespace device_orientation { |
17 namespace { | 17 namespace { |
18 | 18 |
19 // Class for checking expectations on orientation updates from the Provider. | 19 // Class for checking expectations on orientation updates from the Provider. |
20 class UpdateChecker : public Provider::Observer { | 20 class UpdateChecker : public Provider::Observer { |
21 public: | 21 public: |
22 explicit UpdateChecker(int* expectations_count_ptr) | 22 explicit UpdateChecker(int* expectations_count_ptr) |
23 : expectations_count_ptr_(expectations_count_ptr) { | 23 : expectations_count_ptr_(expectations_count_ptr) { |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 checker_b->AddExpectation(third_orientation); | 364 checker_b->AddExpectation(third_orientation); |
365 MessageLoop::current()->Run(); | 365 MessageLoop::current()->Run(); |
366 | 366 |
367 provider_->RemoveObserver(checker_a.get()); | 367 provider_->RemoveObserver(checker_a.get()); |
368 provider_->RemoveObserver(checker_b.get()); | 368 provider_->RemoveObserver(checker_b.get()); |
369 } | 369 } |
370 | 370 |
371 } // namespace | 371 } // namespace |
372 | 372 |
373 } // namespace device_orientation | 373 } // namespace device_orientation |
OLD | NEW |