| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/android/data_usage/data_use_ui_tab_model.h" | 5 #include "chrome/browser/android/data_usage/data_use_ui_tab_model.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 tab_id, at_time, &actual_tracking_info); | 99 tab_id, at_time, &actual_tracking_info); |
| 100 EXPECT_NE(expected_label.empty(), tracking_info_valid); | 100 EXPECT_NE(expected_label.empty(), tracking_info_valid); |
| 101 if (tracking_info_valid) { | 101 if (tracking_info_valid) { |
| 102 EXPECT_EQ(expected_label, actual_tracking_info.label); | 102 EXPECT_EQ(expected_label, actual_tracking_info.label); |
| 103 EXPECT_EQ(expected_tag, actual_tracking_info.tag); | 103 EXPECT_EQ(expected_tag, actual_tracking_info.tag); |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 | 106 |
| 107 protected: | 107 protected: |
| 108 void SetUp() override { | 108 void SetUp() override { |
| 109 io_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( | 109 io_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( |
| 110 content::BrowserThread::IO); | 110 content::BrowserThread::IO); |
| 111 ui_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( | 111 ui_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( |
| 112 content::BrowserThread::UI); | 112 content::BrowserThread::UI); |
| 113 | 113 |
| 114 data_use_aggregator_.reset( | 114 data_use_aggregator_.reset( |
| 115 new data_usage::DataUseAggregator(nullptr, nullptr)); | 115 new data_usage::DataUseAggregator(nullptr, nullptr)); |
| 116 | 116 |
| 117 external_data_use_observer_.reset(new ExternalDataUseObserver( | 117 external_data_use_observer_.reset(new ExternalDataUseObserver( |
| 118 data_use_aggregator_.get(), io_task_runner_, ui_task_runner_)); | 118 data_use_aggregator_.get(), io_task_runner_, ui_task_runner_)); |
| 119 // Wait for |external_data_use_observer_| to create the Java object. | 119 // Wait for |external_data_use_observer_| to create the Java object. |
| 120 base::RunLoop().RunUntilIdle(); | 120 base::RunLoop().RunUntilIdle(); |
| 121 | 121 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 base::RunLoop().RunUntilIdle(); | 601 base::RunLoop().RunUntilIdle(); |
| 602 RegisterURLRegexes(std::vector<std::string>(url_regexes.size(), kFooPackage), | 602 RegisterURLRegexes(std::vector<std::string>(url_regexes.size(), kFooPackage), |
| 603 url_regexes, | 603 url_regexes, |
| 604 std::vector<std::string>(url_regexes.size(), kFooLabel)); | 604 std::vector<std::string>(url_regexes.size(), kFooLabel)); |
| 605 base::RunLoop().RunUntilIdle(); | 605 base::RunLoop().RunUntilIdle(); |
| 606 } | 606 } |
| 607 | 607 |
| 608 } // namespace android | 608 } // namespace android |
| 609 | 609 |
| 610 } // namespace chrome | 610 } // namespace chrome |
| OLD | NEW |